Chore: update typescript and tslib versions (#39389)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
This commit is contained in:
Ryan McKinley 2021-09-22 12:15:37 -07:00 committed by GitHub
parent f76a11c955
commit 1c64f7d3ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 38 additions and 43 deletions

View File

@ -213,8 +213,8 @@
"testing-library-selector": "^0.1.3", "testing-library-selector": "^0.1.3",
"ts-jest": "26.4.4", "ts-jest": "26.4.4",
"ts-node": "9.0.0", "ts-node": "9.0.0",
"tslib": "2.2.0", "tslib": "2.3.1",
"typescript": "4.3.4", "typescript": "4.4.3",
"wait-on": "6.0.0", "wait-on": "6.0.0",
"webpack": "5.51.1", "webpack": "5.51.1",
"webpack-bundle-analyzer": "4.4.2", "webpack-bundle-analyzer": "4.4.2",

View File

@ -55,7 +55,7 @@
"rollup-plugin-visualizer": "4.2.0", "rollup-plugin-visualizer": "4.2.0",
"sinon": "8.1.1", "sinon": "8.1.1",
"tinycolor2": "1.4.1", "tinycolor2": "1.4.1",
"typescript": "4.3.4" "typescript": "4.4.3"
}, },
"volta": { "volta": {
"extends": "../../package.json" "extends": "../../package.json"

View File

@ -43,7 +43,7 @@
"@grafana/tsconfig": "^1.0.0-rc1", "@grafana/tsconfig": "^1.0.0-rc1",
"commander": "5.0.0", "commander": "5.0.0",
"execa": "4.0.0", "execa": "4.0.0",
"typescript": "4.3.4", "typescript": "4.4.3",
"yaml": "^1.8.3" "yaml": "^1.8.3"
}, },
"volta": { "volta": {

View File

@ -55,7 +55,7 @@
"execa": "4.0.0", "execa": "4.0.0",
"resolve-as-bin": "2.1.0", "resolve-as-bin": "2.1.0",
"ts-loader": "6.2.1", "ts-loader": "6.2.1",
"typescript": "4.3.4", "typescript": "4.4.3",
"yaml": "^1.8.3" "yaml": "^1.8.3"
}, },
"volta": { "volta": {

View File

@ -44,7 +44,7 @@
"rollup-plugin-terser": "7.0.2", "rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "0.29.0", "rollup-plugin-typescript2": "0.29.0",
"rollup-plugin-visualizer": "4.2.0", "rollup-plugin-visualizer": "4.2.0",
"typescript": "4.3.4" "typescript": "4.4.3"
}, },
"types": "src/index.ts", "types": "src/index.ts",
"volta": { "volta": {

View File

@ -33,7 +33,7 @@
"rollup-plugin-terser": "7.0.2", "rollup-plugin-terser": "7.0.2",
"rollup-plugin-typescript2": "0.29.0", "rollup-plugin-typescript2": "0.29.0",
"rollup-plugin-visualizer": "4.2.0", "rollup-plugin-visualizer": "4.2.0",
"typescript": "4.3.4" "typescript": "4.4.3"
}, },
"volta": { "volta": {
"extends": "../../package.json" "extends": "../../package.json"

View File

@ -103,8 +103,8 @@
"ts-jest": "26.4.4", "ts-jest": "26.4.4",
"ts-loader": "6.2.1", "ts-loader": "6.2.1",
"ts-node": "9.0.0", "ts-node": "9.0.0",
"tslib": "2.2.0", "tslib": "2.3.1",
"typescript": "4.3.4", "typescript": "4.4.3",
"url-loader": "^2.0.1", "url-loader": "^2.0.1",
"webpack": "4.41.5" "webpack": "4.41.5"
}, },

View File

@ -1,6 +1,5 @@
import execa = require('execa'); import execa = require('execa');
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
// @ts-ignore
import * as path from 'path'; import * as path from 'path';
import chalk from 'chalk'; import chalk from 'chalk';
import { useSpinner } from '../utils/useSpinner'; import { useSpinner } from '../utils/useSpinner';

View File

@ -2,8 +2,6 @@ import { Task, TaskRunner } from './task';
import { pluginBuildRunner } from './plugin.build'; import { pluginBuildRunner } from './plugin.build';
import { getPluginJson } from '../../config/utils/pluginValidation'; import { getPluginJson } from '../../config/utils/pluginValidation';
import { getPluginId } from '../../config/utils/getPluginId'; import { getPluginId } from '../../config/utils/getPluginId';
// @ts-ignore
import execa = require('execa'); import execa = require('execa');
import path = require('path'); import path = require('path');
import fs from 'fs-extra'; import fs from 'fs-extra';

View File

@ -2,8 +2,6 @@ import { Task, TaskRunner } from './task';
import { bundlePlugin as bundleFn, PluginBundleOptions } from './plugin/bundle'; import { bundlePlugin as bundleFn, PluginBundleOptions } from './plugin/bundle';
import { useSpinner } from '../utils/useSpinner'; import { useSpinner } from '../utils/useSpinner';
import { lintPlugin } from './plugin.build'; import { lintPlugin } from './plugin.build';
// @ts-ignore
import execa = require('execa'); import execa = require('execa');
import path = require('path'); import path = require('path');
@ -15,7 +13,7 @@ const yarnlink = () =>
try { try {
// Make sure we are not using package.json defined toolkit // Make sure we are not using package.json defined toolkit
await execa('yarn', ['remove', '@grafana/toolkit']); await execa('yarn', ['remove', '@grafana/toolkit']);
} catch (e) { } catch (e: any) {
console.log('\n', e.message, '\n'); console.log('\n', e.message, '\n');
} }
await execa('yarn', ['link', '@grafana/toolkit']); await execa('yarn', ['link', '@grafana/toolkit']);

View File

@ -5,8 +5,6 @@ import { getPluginId } from '../../config/utils/getPluginId';
import { getCiFolder } from '../../plugins/env'; import { getCiFolder } from '../../plugins/env';
import { useSpinner } from '../utils/useSpinner'; import { useSpinner } from '../utils/useSpinner';
import path = require('path'); import path = require('path');
// @ts-ignore
import execa = require('execa'); import execa = require('execa');
interface Command extends Array<any> {} interface Command extends Array<any> {}
@ -120,7 +118,7 @@ const prepareRelease = ({ dryrun, verbose }: any) =>
console.log('skipping empty line'); console.log('skipping empty line');
} }
} }
} catch (ex) { } catch (ex: any) {
const err: string = ex.message; const err: string = ex.message;
if (opts['okOnError'] && Array.isArray(opts['okOnError'])) { if (opts['okOnError'] && Array.isArray(opts['okOnError'])) {
let trueError = true; let trueError = true;

View File

@ -18,7 +18,7 @@ const bundleManagedPluginsRunner: TaskRunner<BundeManagedOptions> = async () =>
console.log(`[${scope}]: ${plugin} building...`); console.log(`[${scope}]: ${plugin} building...`);
await execa('yarn', ['build'], { cwd: `${MANAGED_PLUGINS_PATH}/${scope}/${plugin}` }); await execa('yarn', ['build'], { cwd: `${MANAGED_PLUGINS_PATH}/${scope}/${plugin}` });
console.log(`[${scope}]: ${plugin} bundled`); console.log(`[${scope}]: ${plugin} bundled`);
} catch (e) { } catch (e: any) {
console.log(e.stdout); console.log(e.stdout);
} }
} }

View File

@ -3,8 +3,6 @@ import { getPluginJson } from '../../config/utils/pluginValidation';
import { getCiFolder } from '../../plugins/env'; import { getCiFolder } from '../../plugins/env';
import path = require('path'); import path = require('path');
import fs = require('fs'); import fs = require('fs');
// @ts-ignore
// import execa = require('execa');
import GithubClient from './githubClient'; import GithubClient from './githubClient';
import { AxiosResponse } from 'axios'; import { AxiosResponse } from 'axios';
@ -79,7 +77,7 @@ class GitHubRelease {
if (latestRelease.data.tag_name === `v${pluginInfo.version}`) { if (latestRelease.data.tag_name === `v${pluginInfo.version}`) {
await this.git.client.delete(`releases/${latestRelease.data.id}`); await this.git.client.delete(`releases/${latestRelease.data.id}`);
} }
} catch (reason) { } catch (reason: any) {
if (reason.response.status !== 404) { if (reason.response.status !== 404) {
// 404 just means no release found. Not an error. Anything else though, re throw the error // 404 just means no release found. Not an error. Anything else though, re throw the error
throw reason; throw reason;
@ -102,7 +100,7 @@ class GitHubRelease {
`https://uploads.github.com/repos/${this.username}/${this.repository}/releases/${newReleaseResponse.data.id}/assets` `https://uploads.github.com/repos/${this.username}/${this.repository}/releases/${newReleaseResponse.data.id}/assets`
); );
await Promise.all(publishPromises); await Promise.all(publishPromises);
} catch (reason) { } catch (reason: any) {
console.error(reason.data?.message ?? reason.response.data ?? reason); console.error(reason.data?.message ?? reason.response.data ?? reason);
// Rethrow the error so that we can trigger a non-zero exit code to circle-ci // Rethrow the error so that we can trigger a non-zero exit code to circle-ci
throw reason; throw reason;

View File

@ -6,7 +6,7 @@ export const useSpinner = async (label: string, fn: () => Promise<any>, killProc
try { try {
await fn(); await fn();
spinner.succeed(); spinner.succeed();
} catch (err) { } catch (err: any) {
spinner.fail(err.message || err); spinner.fail(err.message || err);
if (err.stdout) { if (err.stdout) {

View File

@ -274,7 +274,7 @@ export const loadWebpackConfig: WebpackConfigurationGetter = async (options) =>
); );
} }
return (configGetter as CustomWebpackConfigurationGetter)(baseConfig, options); return (configGetter as CustomWebpackConfigurationGetter)(baseConfig, options);
} catch (err) { } catch (err: any) {
if (err.code === 'ENOENT') { if (err.code === 'ENOENT') {
return baseConfig; return baseConfig;
} }

View File

@ -75,7 +75,7 @@ export async function signManifest(manifest: ManifestInfo): Promise<string> {
} }
return info.data; return info.data;
} catch (err) { } catch (err: any) {
if ((err.response && err.response.data) || err.response.data.message) { if ((err.response && err.response.data) || err.response.data.message) {
throw new Error('Error signing manifest: ' + err.response.data.message); throw new Error('Error signing manifest: ' + err.response.data.message);
} }

View File

@ -4,7 +4,8 @@
"module": "commonjs", "module": "commonjs",
"outDir": "dist/src", "outDir": "dist/src",
"rootDirs": ["."], "rootDirs": ["."],
"typeRoots": ["node_modules/@types"] "typeRoots": ["node_modules/@types"],
"useUnknownInCatchVariables": false
}, },
"exclude": ["dist", "node_modules"], "exclude": ["dist", "node_modules"],
"extends": "@grafana/tsconfig", "extends": "@grafana/tsconfig",

View File

@ -124,7 +124,7 @@
"rollup-plugin-visualizer": "4.2.0", "rollup-plugin-visualizer": "4.2.0",
"storybook-dark-mode": "1.0.8", "storybook-dark-mode": "1.0.8",
"ts-loader": "8.0.11", "ts-loader": "8.0.11",
"typescript": "4.3.4", "typescript": "4.4.3",
"webpack-filter-warnings-plugin": "1.2.1" "webpack-filter-warnings-plugin": "1.2.1"
}, },
"types": "src/index.ts", "types": "src/index.ts",

View File

@ -1,4 +1,6 @@
export class SelectionReference { import { VirtualElement } from '@popperjs/core/lib/types';
export class SelectionReference implements VirtualElement {
getBoundingClientRect() { getBoundingClientRect() {
const selection = window.getSelection(); const selection = window.getSelection();
const node = selection && selection.anchorNode; const node = selection && selection.anchorNode;
@ -15,7 +17,7 @@ export class SelectionReference {
right: 0, right: 0,
width: 0, width: 0,
height: 0, height: 0,
}; } as DOMRect;
} }
get clientWidth() { get clientWidth() {

View File

@ -11,7 +11,7 @@
"devDependencies": { "devDependencies": {
"@wojtekmaj/enzyme-adapter-react-17": "0.6.2", "@wojtekmaj/enzyme-adapter-react-17": "0.6.2",
"enzyme": "3.11.0", "enzyme": "3.11.0",
"typescript": "4.3.4" "typescript": "4.4.3"
}, },
"dependencies": { "dependencies": {
"@emotion/css": "11.1.3", "@emotion/css": "11.1.3",

View File

@ -20,14 +20,14 @@ const operators = ['=', '!=', '=~', '!=~'];
const FilterButton = React.forwardRef<HTMLButtonElement, CustomControlProps<string>>( const FilterButton = React.forwardRef<HTMLButtonElement, CustomControlProps<string>>(
({ value, isOpen, invalid, ...rest }, ref) => { ({ value, isOpen, invalid, ...rest }, ref) => {
return <Button ref={ref} {...rest} variant="secondary" icon="plus"></Button>; return <Button {...rest} ref={ref} variant="secondary" icon="plus"></Button>;
} }
); );
FilterButton.displayName = 'FilterButton'; FilterButton.displayName = 'FilterButton';
const OperatorButton = React.forwardRef<HTMLButtonElement, CustomControlProps<string>>(({ value, ...rest }, ref) => { const OperatorButton = React.forwardRef<HTMLButtonElement, CustomControlProps<string>>(({ value, ...rest }, ref) => {
return ( return (
<Button ref={ref} {...rest} variant="secondary"> <Button {...rest} ref={ref} variant="secondary">
<span className="query-segment-operator">{value?.label}</span> <span className="query-segment-operator">{value?.label}</span>
</Button> </Button>
); );

View File

@ -12,7 +12,8 @@
"typeRoots": ["node_modules/@types", "public/app/types"], "typeRoots": ["node_modules/@types", "public/app/types"],
"allowJs": true, "allowJs": true,
"strictNullChecks": true, "strictNullChecks": true,
"resolveJsonModule": true "resolveJsonModule": true,
"useUnknownInCatchVariables": false
}, },
"extends": "@grafana/tsconfig/base.json", "extends": "@grafana/tsconfig/base.json",
"include": [ "include": [

View File

@ -23384,21 +23384,16 @@ tslib@2.0.1:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e"
integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==
tslib@2.2.0: tslib@2.3.1, tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0:
version "2.2.0" version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w== integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
version "1.14.1" version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
tslib@~2.1.0: tslib@~2.1.0:
version "2.1.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
@ -23529,6 +23524,11 @@ typescript@4.3.4:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc"
integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew== integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==
typescript@4.4.3:
version "4.4.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==
typescript@~3.9.7: typescript@~3.9.7:
version "3.9.7" version "3.9.7"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"