From 3018d18497e1eb8aef2ee53e870eea26b5436b04 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Mon, 17 Feb 2020 09:20:05 +0100 Subject: [PATCH 01/17] update package.json to v3.8 --- examples/bfetch_explorer/package.json | 2 +- examples/demo_search/package.json | 2 +- examples/embeddable_examples/package.json | 2 +- examples/embeddable_explorer/package.json | 2 +- examples/search_explorer/package.json | 2 +- examples/state_containers_examples/package.json | 2 +- package.json | 4 ++-- packages/kbn-analytics/package.json | 2 +- packages/kbn-config-schema/package.json | 2 +- packages/kbn-dev-utils/package.json | 2 +- packages/kbn-i18n/package.json | 2 +- packages/kbn-pm/package.json | 2 +- test/plugin_functional/plugins/core_plugin_a/package.json | 2 +- test/plugin_functional/plugins/core_plugin_b/package.json | 2 +- .../plugins/core_plugin_legacy/package.json | 2 +- .../plugins/kbn_tp_bfetch_explorer/package.json | 2 +- .../plugins/kbn_tp_embeddable_explorer/package.json | 2 +- .../plugins/kbn_tp_sample_panel_action/package.json | 2 +- .../plugins/management_test_plugin/package.json | 2 +- x-pack/legacy/plugins/apm/cypress/package.json | 2 +- x-pack/package.json | 2 +- yarn.lock | 8 ++++---- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/bfetch_explorer/package.json b/examples/bfetch_explorer/package.json index ea5a1b1848613b..5e8fb394bd7f53 100644 --- a/examples/bfetch_explorer/package.json +++ b/examples/bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/examples/demo_search/package.json b/examples/demo_search/package.json index d29ad55b32db2d..52f91e0f30e57d 100644 --- a/examples/demo_search/package.json +++ b/examples/demo_search/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/examples/embeddable_examples/package.json b/examples/embeddable_examples/package.json index 055ee6d7315123..c943280c79649a 100644 --- a/examples/embeddable_examples/package.json +++ b/examples/embeddable_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/examples/embeddable_explorer/package.json b/examples/embeddable_explorer/package.json index 771c5c9be9c06e..944d953204bd36 100644 --- a/examples/embeddable_explorer/package.json +++ b/examples/embeddable_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/examples/search_explorer/package.json b/examples/search_explorer/package.json index cae20a6664f8aa..ec079ffc935c4a 100644 --- a/examples/search_explorer/package.json +++ b/examples/search_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/examples/state_containers_examples/package.json b/examples/state_containers_examples/package.json index b309494a366628..b84740a56eecab 100644 --- a/examples/state_containers_examples/package.json +++ b/examples/state_containers_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/package.json b/package.json index e801f75b976f8f..e8a3c5d5841b79 100644 --- a/package.json +++ b/package.json @@ -84,7 +84,7 @@ "**/@types/react-router": "^5.1.3", "**/@types/hapi": "^17.0.18", "**/@types/angular": "^1.6.56", - "**/typescript": "3.7.2", + "**/typescript": "3.8.1-rc", "**/graphql-toolkit/lodash": "^4.17.13", "**/isomorphic-git/**/base64-js": "^1.2.1", "**/image-diff/gm/debug": "^2.6.9", @@ -480,7 +480,7 @@ "supertest": "^3.1.0", "supertest-as-promised": "^4.0.2", "tree-kill": "^1.2.2", - "typescript": "3.7.2", + "typescript": "3.8.1-rc", "typings-tester": "^0.3.2", "vinyl-fs": "^3.0.3", "xml2js": "^0.4.22", diff --git a/packages/kbn-analytics/package.json b/packages/kbn-analytics/package.json index 9eefa16aaca017..d5b405ba6518d2 100644 --- a/packages/kbn-analytics/package.json +++ b/packages/kbn-analytics/package.json @@ -17,6 +17,6 @@ "@babel/cli": "^7.5.5", "@kbn/dev-utils": "1.0.0", "@kbn/babel-preset": "1.0.0", - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/packages/kbn-config-schema/package.json b/packages/kbn-config-schema/package.json index 71c0ae4bff1f9d..f4f37a7e096a29 100644 --- a/packages/kbn-config-schema/package.json +++ b/packages/kbn-config-schema/package.json @@ -10,7 +10,7 @@ "kbn:bootstrap": "yarn build" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" }, "peerDependencies": { "joi": "^13.5.2", diff --git a/packages/kbn-dev-utils/package.json b/packages/kbn-dev-utils/package.json index bea153d0a672bc..3f18e261416b1e 100644 --- a/packages/kbn-dev-utils/package.json +++ b/packages/kbn-dev-utils/package.json @@ -22,7 +22,7 @@ "tslib": "^1.9.3" }, "devDependencies": { - "typescript": "3.7.2", + "typescript": "3.8.1-rc", "@kbn/expect": "1.0.0", "chance": "1.0.18" } diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index bbc5126da1dce0..6c9d4c23c29787 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -21,7 +21,7 @@ "del": "^5.1.0", "getopts": "^2.2.4", "supports-color": "^7.0.0", - "typescript": "3.7.2" + "typescript": "3.8.1-rc" }, "dependencies": { "intl-format-cache": "^2.1.0", diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json index 444d46307b0593..985bc1e012f42b 100644 --- a/packages/kbn-pm/package.json +++ b/packages/kbn-pm/package.json @@ -61,7 +61,7 @@ "strip-ansi": "^4.0.0", "strong-log-transformer": "^2.1.0", "tempy": "^0.3.0", - "typescript": "3.7.2", + "typescript": "3.8.1-rc", "unlazy-loader": "^0.1.3", "webpack": "^4.41.5", "webpack-cli": "^3.3.10", diff --git a/test/plugin_functional/plugins/core_plugin_a/package.json b/test/plugin_functional/plugins/core_plugin_a/package.json index 060ae49f43e8ae..9f1cba489f13cd 100644 --- a/test/plugin_functional/plugins/core_plugin_a/package.json +++ b/test/plugin_functional/plugins/core_plugin_a/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/core_plugin_b/package.json b/test/plugin_functional/plugins/core_plugin_b/package.json index 3eb878b9ed5dc4..b00fb6dc71a2a3 100644 --- a/test/plugin_functional/plugins/core_plugin_b/package.json +++ b/test/plugin_functional/plugins/core_plugin_b/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/core_plugin_legacy/package.json b/test/plugin_functional/plugins/core_plugin_legacy/package.json index 5f784c7b836a5f..f0261adda8211d 100644 --- a/test/plugin_functional/plugins/core_plugin_legacy/package.json +++ b/test/plugin_functional/plugins/core_plugin_legacy/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json index e396489a1ffc46..2567b06f3a1a5c 100644 --- a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index d4e4c6bf2fee0b..8e8caf4b5c5270 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 3ade079419a55a..334779e3fea040 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/test/plugin_functional/plugins/management_test_plugin/package.json b/test/plugin_functional/plugins/management_test_plugin/package.json index 656d92e9eb1f78..e8e38b9099e1ef 100644 --- a/test/plugin_functional/plugins/management_test_plugin/package.json +++ b/test/plugin_functional/plugins/management_test_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.1-rc" } } diff --git a/x-pack/legacy/plugins/apm/cypress/package.json b/x-pack/legacy/plugins/apm/cypress/package.json index 59f76ba250ad79..139a24b49276c1 100644 --- a/x-pack/legacy/plugins/apm/cypress/package.json +++ b/x-pack/legacy/plugins/apm/cypress/package.json @@ -15,7 +15,7 @@ "js-yaml": "^3.13.1", "p-limit": "^2.2.1", "ts-loader": "^6.1.0", - "typescript": "3.7.2", + "typescript": "3.8.1-rc", "webpack": "^4.41.5" } } diff --git a/x-pack/package.json b/x-pack/package.json index e3bc8aa36373d1..d0250ebc51ca13 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -163,7 +163,7 @@ "tmp": "0.1.0", "tree-kill": "^1.2.2", "ts-loader": "^6.0.4", - "typescript": "3.7.2", + "typescript": "3.8.1-rc", "vinyl-fs": "^3.0.3", "whatwg-fetch": "^3.0.0", "xml-crypto": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index 33cb366e72f002..e48afbb01735a2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29875,10 +29875,10 @@ typescript-fsa@^2.0.0, typescript-fsa@^2.5.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-2.5.0.tgz#1baec01b5e8f5f34c322679d1327016e9e294faf" integrity sha1-G67AG16PXzTDImedEycBbp4pT68= -typescript@3.5.3, typescript@3.7.2, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb" - integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ== +typescript@3.5.3, typescript@3.8.1-rc, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: + version "3.8.1-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.1-rc.tgz#f94333c14da70927ccd887be2e91be652a9a09f6" + integrity sha512-aOIe066DyZn2uYIiND6fXMUUJ70nxwu/lKhA92QuQzXyC86fr0ywo1qvO8l2m0EnDcfjprYPuFRgNgDj7U2GlQ== typings-tester@^0.3.2: version "0.3.2" From 4bab0a5276b574f48cdab4b271ee8b1d574d89d5 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Mon, 17 Feb 2020 09:28:53 +0100 Subject: [PATCH 02/17] fix security types --- .../management/api_keys/api_keys_grid/api_keys_grid_page.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx index 779a2302cfadf9..f747794b1acf2e 100644 --- a/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx +++ b/x-pack/plugins/security/public/management/api_keys/api_keys_grid/api_keys_grid_page.tsx @@ -22,6 +22,7 @@ import { EuiTitle, EuiToolTip, EuiInMemoryTableProps, + EuiBasicTableColumn, } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -357,7 +358,7 @@ export class APIKeysGridPage extends Component { private getColumnConfig = () => { const { isAdmin } = this.state; - let config = [ + let config: Array> = [ { field: 'name', name: i18n.translate('xpack.security.management.apiKeys.table.nameColumnName', { @@ -393,7 +394,6 @@ export class APIKeysGridPage extends Component { defaultMessage: 'Created', }), sortable: true, - // @ts-ignore render: (creationDateMs: number) => moment(creationDateMs).format(DATE_FORMAT), }, { @@ -402,7 +402,6 @@ export class APIKeysGridPage extends Component { defaultMessage: 'Expires', }), sortable: true, - // @ts-ignore render: (expirationDateMs: number) => { if (expirationDateMs === undefined) { return ( From b9016ffd68e00c30d5c2155726fcac182e76af08 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Mon, 17 Feb 2020 09:29:59 +0100 Subject: [PATCH 03/17] fix eui types. TODO: update types in the library --- src/core/public/chrome/ui/header/header_badge.tsx | 2 +- .../data/public/ui/shard_failure_modal/shard_failure_modal.tsx | 2 +- src/plugins/share/public/components/url_panel_content.tsx | 2 +- .../components/analytics_list/action_start.tsx | 2 +- .../analytics_management/components/analytics_list/actions.tsx | 2 +- .../siem/public/components/navigation/tab_navigation/index.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/public/chrome/ui/header/header_badge.tsx b/src/core/public/chrome/ui/header/header_badge.tsx index 4e529ad9a410b7..15f87aeb3b5a1f 100644 --- a/src/core/public/chrome/ui/header/header_badge.tsx +++ b/src/core/public/chrome/ui/header/header_badge.tsx @@ -66,7 +66,7 @@ export class HeaderBadge extends Component {
)} - onClose()} fill data-test-sub="closeShardFailureModal"> + onClose()} fill data-test-subj="closeShardFailureModal"> { fullWidth onClick={copy} disabled={this.state.isCreatingShortUrl || this.state.url === ''} - data-share-url={this.state.url} + data-share-url={(this.state.url as unknown) as undefined} data-test-subj="copyShareUrlButton" size="s" > diff --git a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_start.tsx b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_start.tsx index 40664a1413845f..26dc333a54741e 100644 --- a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_start.tsx +++ b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_start.tsx @@ -54,7 +54,7 @@ export const StartAction: FC = ({ item }) => { iconType="play" onClick={openModal} aria-label={buttonStartText} - data-test-sub="mlAnalyticsJobStartButton" + data-test-subj="mlAnalyticsJobStartButton" > {buttonStartText} diff --git a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx index eb87bfd96c149f..ce99e0714c0bc4 100644 --- a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx +++ b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/actions.tsx @@ -80,7 +80,7 @@ export const getActions = () => { iconType="stop" onClick={() => stopAnalytics(item)} aria-label={buttonStopText} - data-test-sub="mlAnalyticsJobStopButton" + data-test-subj="mlAnalyticsJobStopButton" > {buttonStopText} diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx b/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx index cebf9b90656ca3..b49dcf69bf2fca 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx @@ -25,7 +25,7 @@ const TabNavigationItemComponent = ({ return ( Date: Mon, 17 Feb 2020 09:30:32 +0100 Subject: [PATCH 04/17] fix http headers definition --- .../plugins/ml/public/application/services/http_service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/legacy/plugins/ml/public/application/services/http_service.ts b/x-pack/legacy/plugins/ml/public/application/services/http_service.ts index 73a30dbcd71b2d..c3dc703d97bba4 100644 --- a/x-pack/legacy/plugins/ml/public/application/services/http_service.ts +++ b/x-pack/legacy/plugins/ml/public/application/services/http_service.ts @@ -18,7 +18,6 @@ export interface HttpOptions { function getResultHeaders(headers: HeadersInit): HeadersInit { return { - asSystemRequest: false, 'Content-Type': 'application/json', 'kbn-version': getXSRF(), ...headers, From c62c8df7d42c0a20b3fe4e0fef6a8225012b9d3d Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Mon, 17 Feb 2020 09:31:36 +0100 Subject: [PATCH 05/17] add explicit types --- .../apm/public/components/shared/charts/MetricsChart/index.tsx | 2 +- .../infra/public/components/waffle/waffle_accounts_controls.tsx | 2 +- .../infra/public/components/waffle/waffle_region_controls.tsx | 2 +- .../server/lib/search_strategies/rollup_search_capabilities.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/apm/public/components/shared/charts/MetricsChart/index.tsx b/x-pack/legacy/plugins/apm/public/components/shared/charts/MetricsChart/index.tsx index 30dcc99af31b9a..0a073ba8973c92 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/charts/MetricsChart/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/charts/MetricsChart/index.tsx @@ -59,7 +59,7 @@ function getYTickFormatter(chart: GenericMetricsChart) { case 'bytes': { const max = Math.max( ...chart.series.map(({ data }) => - Math.max(...data.map(({ y }) => y || 0)) + Math.max(...data.map(({ y }: { y: number }) => y || 0)) ) ); return getFixedByteFormatter(max); diff --git a/x-pack/legacy/plugins/infra/public/components/waffle/waffle_accounts_controls.tsx b/x-pack/legacy/plugins/infra/public/components/waffle/waffle_accounts_controls.tsx index 56c3a205b05d48..bc6789879d380d 100644 --- a/x-pack/legacy/plugins/infra/public/components/waffle/waffle_accounts_controls.tsx +++ b/x-pack/legacy/plugins/infra/public/components/waffle/waffle_accounts_controls.tsx @@ -24,7 +24,7 @@ interface Props { export const WaffleAccountsControls = (props: Props) => { const { accountId, options } = props; - const [isOpen, setIsOpen] = useState(); + const [isOpen, setIsOpen] = useState(); const showPopover = useCallback(() => { setIsOpen(true); diff --git a/x-pack/legacy/plugins/infra/public/components/waffle/waffle_region_controls.tsx b/x-pack/legacy/plugins/infra/public/components/waffle/waffle_region_controls.tsx index 52377bf4b8296e..ee0450d246df7b 100644 --- a/x-pack/legacy/plugins/infra/public/components/waffle/waffle_region_controls.tsx +++ b/x-pack/legacy/plugins/infra/public/components/waffle/waffle_region_controls.tsx @@ -23,7 +23,7 @@ interface Props { export const WaffleRegionControls = (props: Props) => { const { region, options } = props; - const [isOpen, setIsOpen] = useState(); + const [isOpen, setIsOpen] = useState(); const showPopover = useCallback(() => { setIsOpen(true); diff --git a/x-pack/legacy/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.ts b/x-pack/legacy/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.ts index 5a57129aa60395..79d41a943b3b15 100644 --- a/x-pack/legacy/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.ts +++ b/x-pack/legacy/plugins/rollup/server/lib/search_strategies/rollup_search_capabilities.ts @@ -21,7 +21,7 @@ export const getRollupSearchCapabilities = (DefaultSearchCapabilities: any) => } public get dateHistogram() { - const [dateHistogram] = Object.values(this.availableMetrics.date_histogram); + const [dateHistogram] = Object.values(this.availableMetrics.date_histogram); return dateHistogram; } From 6c8c24980ab0304d69a7512859d9a5e33ea21c97 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Mon, 17 Feb 2020 09:32:07 +0100 Subject: [PATCH 06/17] add explicit types in timelion --- .../public/components/panel.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx b/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx index 3b42fa7dfcbb88..d9320e26a21d76 100644 --- a/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx +++ b/src/legacy/core_plugins/vis_type_timelion/public/components/panel.tsx @@ -70,18 +70,18 @@ const emptyCaption = '
'; function Panel({ interval, seriesList, renderComplete }: PanelProps) { const kibana = useKibana(); const [chart, setChart] = useState(() => cloneDeep(seriesList.list)); - const [canvasElem, setCanvasElem] = useState(); - const [chartElem, setChartElem] = useState(); + const [canvasElem, setCanvasElem] = useState(); + const [chartElem, setChartElem] = useState(); const [originalColorMap, setOriginalColorMap] = useState(() => new Map()); const [highlightedSeries, setHighlightedSeries] = useState(null); - const [focusedSeries, setFocusedSeries] = useState(); - const [plot, setPlot] = useState(); + const [focusedSeries, setFocusedSeries] = useState(); + const [plot, setPlot] = useState(); // Used to toggle the series, and for displaying values on hover - const [legendValueNumbers, setLegendValueNumbers] = useState(); - const [legendCaption, setLegendCaption] = useState(); + const [legendValueNumbers, setLegendValueNumbers] = useState>(); + const [legendCaption, setLegendCaption] = useState>(); const canvasRef = useCallback(node => { if (node !== null) { @@ -97,7 +97,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { useEffect( () => () => { - $(chartElem) + $(chartElem!) .off('plotselected') .off('plothover') .off('mouseleave'); @@ -156,11 +156,11 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { caption.html(emptyCaption); setLegendCaption(caption); - const canvasNode = $(canvasElem); + const canvasNode = $(canvasElem!); canvasNode.find('div.legend table').append(caption); setLegendValueNumbers(canvasNode.find('.ngLegendValueNumber')); - const legend = $(canvasElem).find('.ngLegendValue'); + const legend = $(canvasElem!).find('.ngLegendValue'); if (legend) { legend.click(toggleSeries); legend.focus(focusSeries); @@ -254,12 +254,12 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { (pos: Position) => { unhighlightSeries(); - const axes = plot.getAxes(); - if (pos.x < axes.xaxis.min || pos.x > axes.xaxis.max) { + const axes = plot!.getAxes(); + if (pos.x < axes.xaxis.min! || pos.x > axes.xaxis.max!) { return; } - const dataset = plot.getData(); + const dataset = plot!.getData(); if (legendCaption) { legendCaption.text( moment(pos.x).format(get(dataset, '[0]._global.legend.timeFormat', DEFAULT_TIME_FORMAT)) @@ -267,7 +267,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { } for (let i = 0; i < dataset.length; ++i) { const series = dataset[i]; - const useNearestPoint = series.lines.show && !series.lines.steps; + const useNearestPoint = series.lines!.show && !series.lines!.steps; const precision = get(series, '_meta.precision', 2); if (series._hide) { @@ -289,12 +289,12 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { if (y != null && legendValueNumbers) { let label = y.toFixed(precision); - if (series.yaxis.tickFormatter) { - label = series.yaxis.tickFormatter(Number(label), series.yaxis); + if (series.yaxis!.tickFormatter) { + label = series.yaxis!.tickFormatter(Number(label), series.yaxis); } legendValueNumbers.eq(i).text(`(${label})`); } else { - legendValueNumbers.eq(i).empty(); + legendValueNumbers!.eq(i).empty(); } } }, @@ -314,7 +314,7 @@ function Panel({ interval, seriesList, renderComplete }: PanelProps) { if (legendCaption) { legendCaption.html(emptyCaption); } - each(legendValueNumbers, (num: Node) => { + each(legendValueNumbers!, (num: Node) => { $(num).empty(); }); }, [legendCaption, legendValueNumbers]); From f2829928d5bfd045b6b665d695dbde9683dd43a5 Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 17 Feb 2020 14:34:51 +0100 Subject: [PATCH 07/17] add @babel/plugin-proposal-export-namespace-from --- packages/kbn-babel-preset/common_preset.js | 4 ++++ packages/kbn-babel-preset/package.json | 1 + src/core/index.ts | 6 ++---- src/dev/i18n/extractors/code.js | 1 + yarn.lock | 20 ++++++++++++++++++++ 5 files changed, 28 insertions(+), 4 deletions(-) diff --git a/packages/kbn-babel-preset/common_preset.js b/packages/kbn-babel-preset/common_preset.js index ea099aeda74081..bbdd9381951840 100644 --- a/packages/kbn-babel-preset/common_preset.js +++ b/packages/kbn-babel-preset/common_preset.js @@ -28,6 +28,10 @@ const plugins = [ // See https://github.com/babel/proposals/issues/12 for progress require.resolve('@babel/plugin-proposal-class-properties'), + // Proposal is on stage 4 (https://github.com/tc39/proposal-export-ns-from) + // Need this since we are using TypeScript 3.8+ + require.resolve('@babel/plugin-proposal-export-namespace-from'), + // Optional Chaining proposal is stage 3 (https://github.com/tc39/proposal-optional-chaining) // Need this since we are using TypeScript 3.7+ require.resolve('@babel/plugin-proposal-optional-chaining'), diff --git a/packages/kbn-babel-preset/package.json b/packages/kbn-babel-preset/package.json index 0acafbae59afd3..a070c2551f60aa 100644 --- a/packages/kbn-babel-preset/package.json +++ b/packages/kbn-babel-preset/package.json @@ -5,6 +5,7 @@ "license": "Apache-2.0", "dependencies": { "@babel/plugin-proposal-class-properties": "^7.5.1", + "@babel/plugin-proposal-export-namespace-from": "^7.8.3", "@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4", "@babel/plugin-proposal-optional-chaining": "^7.6.0", "@babel/plugin-syntax-dynamic-import": "^7.2.0", diff --git a/src/core/index.ts b/src/core/index.ts index 23db81469f5bc5..20ca83e3f45824 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -16,7 +16,5 @@ * specific language governing permissions and limitations * under the License. */ -import * as Public from './public'; -import * as Server from './server'; - -export { Public, Server }; +export * as Public from './public'; +export * as Server from './server'; diff --git a/src/dev/i18n/extractors/code.js b/src/dev/i18n/extractors/code.js index 6439f8ceff332d..c7fac29d9f917e 100644 --- a/src/dev/i18n/extractors/code.js +++ b/src/dev/i18n/extractors/code.js @@ -76,6 +76,7 @@ export function* extractCodeMessages(buffer, reporter) { 'dynamicImport', 'nullishCoalescingOperator', 'optionalChaining', + 'exportNamespaceFrom', ], }); } catch (error) { diff --git a/yarn.lock b/yarn.lock index e48afbb01735a2..659ffa2646f9e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -354,6 +354,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-plugin-utils@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670" + integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ== + "@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351" @@ -564,6 +569,14 @@ "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-syntax-dynamic-import" "^7.7.4" +"@babel/plugin-proposal-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.8.3.tgz#63ad57265d0e3912afd666eb44ce26fa8cd2c774" + integrity sha512-WKK+9jz6TWUTX1uej9/EUVOmM1sK7aHv6bZyxbUV3NJjbiIZRqJITeXGMo7D631J72PEnIORh5VOlFCSlrLicg== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/plugin-proposal-json-strings@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" @@ -680,6 +693,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-export-namespace-from@^7.8.3": + version "7.8.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz#028964a9ba80dbc094c915c487ad7c4e7a66465a" + integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== + dependencies: + "@babel/helper-plugin-utils" "^7.8.3" + "@babel/plugin-syntax-flow@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.2.0.tgz#a765f061f803bc48f240c26f8747faf97c26bf7c" From c561ee43a6f73158a19d79b27b24936d6cbdb574 Mon Sep 17 00:00:00 2001 From: restrry Date: Thu, 20 Feb 2020 11:04:21 +0100 Subject: [PATCH 08/17] fix and mute errors --- .../public/dashboard/np_ready/lib/migrate_app_state.ts | 2 +- .../vis_type_metric/public/metric_vis_type.test.ts | 2 +- .../apm/public/components/app/ServiceMap/cytoscapeOptions.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/lib/migrate_app_state.ts b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/lib/migrate_app_state.ts index 0cd958ced0eb1c..b22d0944972a1b 100644 --- a/src/legacy/core_plugins/kibana/public/dashboard/np_ready/lib/migrate_app_state.ts +++ b/src/legacy/core_plugins/kibana/public/dashboard/np_ready/lib/migrate_app_state.ts @@ -38,7 +38,7 @@ import { migratePanelsTo730 } from '../../migrations/migrate_to_730_panels'; * Once we hit a major version, we can remove support for older style URLs and get rid of this logic. */ export function migrateAppState( - appState: { [key: string]: unknown } & DashboardAppState, + appState: { [key: string]: any } & DashboardAppState, kibanaVersion: string ): DashboardAppState { if (!appState.panels) { diff --git a/src/legacy/core_plugins/vis_type_metric/public/metric_vis_type.test.ts b/src/legacy/core_plugins/vis_type_metric/public/metric_vis_type.test.ts index 67b5d018f46388..b06488736e7a5e 100644 --- a/src/legacy/core_plugins/vis_type_metric/public/metric_vis_type.test.ts +++ b/src/legacy/core_plugins/vis_type_metric/public/metric_vis_type.test.ts @@ -61,7 +61,7 @@ describe('metric_vis - createMetricVisTypeDefinition', () => { // @ts-ignore vis = new visualizationsStart.Vis(stubIndexPattern, { type: 'metric', - aggs: [{ id: '1', type: 'top_hits', schema: 'metric', params: { field: 'ip' } }], + aggs: [{ id: '1', type: 'top_hits', schema: 'metric', params: { field: 'ip' } }] as any, }); vis.params.dimensions = { diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts index f87f59f64ec709..f16044c986519c 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts @@ -45,6 +45,7 @@ const style: cytoscape.Stylesheet[] = [ isService(el) ? '80%' : '40%', 'background-width': (el: cytoscape.NodeSingular) => isService(el) ? '80%' : '40%', + // @ts-ignore no function allowed 'border-color': (el: cytoscape.NodeSingular) => el.hasClass('primary') ? theme.euiColorSecondary @@ -54,17 +55,21 @@ const style: cytoscape.Stylesheet[] = [ // theme.euiFontFamily doesn't work here for some reason, so we're just // specifying a subset of the fonts for the label text. 'font-family': 'Inter UI, Segoe UI, Helvetica, Arial, sans-serif', + // @ts-ignore no strings allowed 'font-size': theme.euiFontSizeXS, height: nodeHeight, label: 'data(label)', + // @ts-ignore no strings allowed 'min-zoomed-font-size': theme.euiSizeL, 'overlay-opacity': 0, + // @ts-ignore no function allowed shape: (el: cytoscape.NodeSingular) => isService(el) ? 'ellipse' : 'diamond', 'text-background-color': theme.euiColorLightestShade, 'text-background-opacity': 0, 'text-background-padding': theme.paddingSizes.xs, 'text-background-shape': 'roundrectangle', + // @ts-ignore no strings allowed 'text-margin-y': theme.paddingSizes.s, 'text-max-width': '200px', 'text-valign': 'bottom', From 82fcfdcbca8688d16e3bac3654dd1c74b942445a Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 08:52:03 +0100 Subject: [PATCH 09/17] use TS stable version --- examples/bfetch_explorer/package.json | 2 +- examples/demo_search/package.json | 2 +- examples/embeddable_examples/package.json | 2 +- examples/embeddable_explorer/package.json | 2 +- examples/search_explorer/package.json | 2 +- examples/state_containers_examples/package.json | 2 +- package.json | 4 ++-- packages/kbn-analytics/package.json | 2 +- packages/kbn-config-schema/package.json | 2 +- packages/kbn-dev-utils/package.json | 2 +- packages/kbn-i18n/package.json | 2 +- packages/kbn-pm/package.json | 2 +- test/plugin_functional/plugins/core_plugin_a/package.json | 2 +- test/plugin_functional/plugins/core_plugin_b/package.json | 2 +- .../plugins/core_plugin_legacy/package.json | 2 +- .../plugins/kbn_tp_bfetch_explorer/package.json | 2 +- .../plugins/kbn_tp_embeddable_explorer/package.json | 2 +- .../plugins/kbn_tp_sample_panel_action/package.json | 2 +- .../plugins/management_test_plugin/package.json | 2 +- x-pack/legacy/plugins/apm/cypress/package.json | 2 +- x-pack/package.json | 2 +- yarn.lock | 8 ++++---- 22 files changed, 26 insertions(+), 26 deletions(-) diff --git a/examples/bfetch_explorer/package.json b/examples/bfetch_explorer/package.json index 5e8fb394bd7f53..ba1f2dce83f434 100644 --- a/examples/bfetch_explorer/package.json +++ b/examples/bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/examples/demo_search/package.json b/examples/demo_search/package.json index 52f91e0f30e57d..27a0533ba9e7d8 100644 --- a/examples/demo_search/package.json +++ b/examples/demo_search/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/examples/embeddable_examples/package.json b/examples/embeddable_examples/package.json index c943280c79649a..0ca26387080a8a 100644 --- a/examples/embeddable_examples/package.json +++ b/examples/embeddable_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/examples/embeddable_explorer/package.json b/examples/embeddable_explorer/package.json index 944d953204bd36..bd959cc8baa0ec 100644 --- a/examples/embeddable_explorer/package.json +++ b/examples/embeddable_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/examples/search_explorer/package.json b/examples/search_explorer/package.json index ec079ffc935c4a..22426fd863240e 100644 --- a/examples/search_explorer/package.json +++ b/examples/search_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/examples/state_containers_examples/package.json b/examples/state_containers_examples/package.json index b84740a56eecab..8569af4855d559 100644 --- a/examples/state_containers_examples/package.json +++ b/examples/state_containers_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/package.json b/package.json index 1acf65747b3a28..2aa24d065773fa 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "**/@types/hapi": "^17.0.18", "**/@types/angular": "^1.6.56", "**/@types/hoist-non-react-statics": "^3.3.1", - "**/typescript": "3.8.1-rc", + "**/typescript": "3.8.2", "**/graphql-toolkit/lodash": "^4.17.13", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-git/**/base64-js": "^1.2.1", @@ -479,7 +479,7 @@ "supertest": "^3.1.0", "supertest-as-promised": "^4.0.2", "tree-kill": "^1.2.2", - "typescript": "3.8.1-rc", + "typescript": "3.8.2", "typings-tester": "^0.3.2", "vinyl-fs": "^3.0.3", "xml2js": "^0.4.22", diff --git a/packages/kbn-analytics/package.json b/packages/kbn-analytics/package.json index d5b405ba6518d2..1058aef942c29f 100644 --- a/packages/kbn-analytics/package.json +++ b/packages/kbn-analytics/package.json @@ -17,6 +17,6 @@ "@babel/cli": "^7.5.5", "@kbn/dev-utils": "1.0.0", "@kbn/babel-preset": "1.0.0", - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/packages/kbn-config-schema/package.json b/packages/kbn-config-schema/package.json index f4f37a7e096a29..5e984d8a3908e1 100644 --- a/packages/kbn-config-schema/package.json +++ b/packages/kbn-config-schema/package.json @@ -10,7 +10,7 @@ "kbn:bootstrap": "yarn build" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" }, "peerDependencies": { "joi": "^13.5.2", diff --git a/packages/kbn-dev-utils/package.json b/packages/kbn-dev-utils/package.json index 3f18e261416b1e..8afc551362204f 100644 --- a/packages/kbn-dev-utils/package.json +++ b/packages/kbn-dev-utils/package.json @@ -22,7 +22,7 @@ "tslib": "^1.9.3" }, "devDependencies": { - "typescript": "3.8.1-rc", + "typescript": "3.8.2", "@kbn/expect": "1.0.0", "chance": "1.0.18" } diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index 6c9d4c23c29787..10123e5d475d96 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -21,7 +21,7 @@ "del": "^5.1.0", "getopts": "^2.2.4", "supports-color": "^7.0.0", - "typescript": "3.8.1-rc" + "typescript": "3.8.2" }, "dependencies": { "intl-format-cache": "^2.1.0", diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json index 985bc1e012f42b..db3ff62d7d1b6e 100644 --- a/packages/kbn-pm/package.json +++ b/packages/kbn-pm/package.json @@ -61,7 +61,7 @@ "strip-ansi": "^4.0.0", "strong-log-transformer": "^2.1.0", "tempy": "^0.3.0", - "typescript": "3.8.1-rc", + "typescript": "3.8.2", "unlazy-loader": "^0.1.3", "webpack": "^4.41.5", "webpack-cli": "^3.3.10", diff --git a/test/plugin_functional/plugins/core_plugin_a/package.json b/test/plugin_functional/plugins/core_plugin_a/package.json index 9f1cba489f13cd..899f56b3c088cc 100644 --- a/test/plugin_functional/plugins/core_plugin_a/package.json +++ b/test/plugin_functional/plugins/core_plugin_a/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/core_plugin_b/package.json b/test/plugin_functional/plugins/core_plugin_b/package.json index b00fb6dc71a2a3..dadde9b8d00bc0 100644 --- a/test/plugin_functional/plugins/core_plugin_b/package.json +++ b/test/plugin_functional/plugins/core_plugin_b/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/core_plugin_legacy/package.json b/test/plugin_functional/plugins/core_plugin_legacy/package.json index f0261adda8211d..e3ed9563ac15af 100644 --- a/test/plugin_functional/plugins/core_plugin_legacy/package.json +++ b/test/plugin_functional/plugins/core_plugin_legacy/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json index 2567b06f3a1a5c..001ad213bbb3d3 100644 --- a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index 8e8caf4b5c5270..013525dcc79ec6 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 334779e3fea040..4cc8a4cea85039 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/test/plugin_functional/plugins/management_test_plugin/package.json b/test/plugin_functional/plugins/management_test_plugin/package.json index e8e38b9099e1ef..0f4007dd50c0ef 100644 --- a/test/plugin_functional/plugins/management_test_plugin/package.json +++ b/test/plugin_functional/plugins/management_test_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.1-rc" + "typescript": "3.8.2" } } diff --git a/x-pack/legacy/plugins/apm/cypress/package.json b/x-pack/legacy/plugins/apm/cypress/package.json index 139a24b49276c1..1c5c350181d2bc 100644 --- a/x-pack/legacy/plugins/apm/cypress/package.json +++ b/x-pack/legacy/plugins/apm/cypress/package.json @@ -15,7 +15,7 @@ "js-yaml": "^3.13.1", "p-limit": "^2.2.1", "ts-loader": "^6.1.0", - "typescript": "3.8.1-rc", + "typescript": "3.8.2", "webpack": "^4.41.5" } } diff --git a/x-pack/package.json b/x-pack/package.json index 1839c2911bc8a2..1485ccca96210c 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -165,7 +165,7 @@ "tmp": "0.1.0", "tree-kill": "^1.2.2", "ts-loader": "^6.0.4", - "typescript": "3.8.1-rc", + "typescript": "3.8.2", "vinyl-fs": "^3.0.3", "whatwg-fetch": "^3.0.0", "xml-crypto": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index b6eb90cf6317a9..f370c0ee248feb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29955,10 +29955,10 @@ typescript-fsa@^3.0.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-3.0.0.tgz#3ad1cb915a67338e013fc21f67c9b3e0e110c912" integrity sha512-xiXAib35i0QHl/+wMobzPibjAH5TJLDj+qGq5jwVLG9qR4FUswZURBw2qihBm0m06tHoyb3FzpnJs1GRhRwVag== -typescript@3.5.3, typescript@3.8.1-rc, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: - version "3.8.1-rc" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.1-rc.tgz#f94333c14da70927ccd887be2e91be652a9a09f6" - integrity sha512-aOIe066DyZn2uYIiND6fXMUUJ70nxwu/lKhA92QuQzXyC86fr0ywo1qvO8l2m0EnDcfjprYPuFRgNgDj7U2GlQ== +typescript@3.5.3, typescript@3.8.2, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: + version "3.8.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a" + integrity sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ== typings-tester@^0.3.2: version "0.3.2" From 1ab989437b054dabea66259db342484be9f430b3 Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 09:19:25 +0100 Subject: [PATCH 10/17] declare SO type explicitly --- x-pack/plugins/alerting/server/alerts_client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/alerting/server/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client.ts index 9a56781aa1d7d8..8ed5734101419d 100644 --- a/x-pack/plugins/alerting/server/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client.ts @@ -533,7 +533,7 @@ export class AlertsClient { alertId: string; alertInstanceId: string; }) { - const { attributes, version } = await this.savedObjectsClient.get('alert', alertId); + const { attributes, version } = await this.savedObjectsClient.get('alert', alertId); const mutedInstanceIds = attributes.mutedInstanceIds || []; if (!attributes.muteAll && !mutedInstanceIds.includes(alertInstanceId)) { mutedInstanceIds.push(alertInstanceId); @@ -556,7 +556,7 @@ export class AlertsClient { alertId: string; alertInstanceId: string; }) { - const { attributes, version } = await this.savedObjectsClient.get('alert', alertId); + const { attributes, version } = await this.savedObjectsClient.get('alert', alertId); const mutedInstanceIds = attributes.mutedInstanceIds || []; if (!attributes.muteAll && mutedInstanceIds.includes(alertInstanceId)) { await this.savedObjectsClient.update( From 1c25e1343bb878eba86af1162144c2363d99804e Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 10:23:00 +0100 Subject: [PATCH 11/17] use a common property data-test-subj as testid --- .../shard_failure_modal.test.tsx.snap | 2 +- x-pack/dev-tools/jest/setup/setup_test.js | 6 ++++++ .../components/shared/KeyValueTable/index.tsx | 4 ++-- .../custom_selection_table.js | 4 ++-- .../analytics_list/action_delete.test.tsx | 21 ++++++++----------- .../__snapshots__/calendar_form.test.js.snap | 2 +- .../edit/calendar_form/calendar_form.js | 2 +- .../__snapshots__/events_table.test.js.snap | 4 ++-- .../edit/events_table/events_table.js | 6 +++--- .../edit/import_modal/import_modal.test.js | 2 +- .../calendars/edit/new_calendar.test.js | 6 +++--- .../ml/public/application/util/test_utils.ts | 18 ---------------- .../endpoint/view/alerts/index.test.tsx | 2 +- .../endpoint/view/alerts/index.tsx | 7 +++---- .../resolver/view/use_camera.test.tsx | 2 +- 15 files changed, 36 insertions(+), 52 deletions(-) delete mode 100644 x-pack/legacy/plugins/ml/public/application/util/test_utils.ts diff --git a/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap b/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap index f7f3d1c1fbd0c2..2afd07679d74c4 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap +++ b/src/plugins/data/public/ui/shard_failure_modal/__snapshots__/shard_failure_modal.test.tsx.snap @@ -174,7 +174,7 @@ exports[`ShardFailureModal renders matching snapshot given valid properties 1`] diff --git a/x-pack/dev-tools/jest/setup/setup_test.js b/x-pack/dev-tools/jest/setup/setup_test.js index f54be89f309556..390d4c7a26c856 100644 --- a/x-pack/dev-tools/jest/setup/setup_test.js +++ b/x-pack/dev-tools/jest/setup/setup_test.js @@ -11,3 +11,9 @@ import 'jest-styled-components'; import '@testing-library/jest-dom/extend-expect'; +// eslint-disable-next-line import/no-extraneous-dependencies +import * as testingLibraryDom from '@testing-library/dom'; + +testingLibraryDom.configure({ + testIdAttribute: 'data-test-subj', +}); diff --git a/x-pack/legacy/plugins/apm/public/components/shared/KeyValueTable/index.tsx b/x-pack/legacy/plugins/apm/public/components/shared/KeyValueTable/index.tsx index b58f142f1abaad..e8ed39bf9ac335 100644 --- a/x-pack/legacy/plugins/apm/public/components/shared/KeyValueTable/index.tsx +++ b/x-pack/legacy/plugins/apm/public/components/shared/KeyValueTable/index.tsx @@ -28,9 +28,9 @@ export function KeyValueTable({ {keyValuePairs.map(({ key, value }) => ( - {key} + {key} - + diff --git a/x-pack/legacy/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js b/x-pack/legacy/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js index c6667ef1df55e5..a7edb7184df005 100644 --- a/x-pack/legacy/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js +++ b/x-pack/legacy/plugins/ml/public/application/components/job_selector/custom_selection_table/custom_selection_table.js @@ -256,7 +256,7 @@ export function CustomSelectionTable({ {!singleSelection && ( toggleItem(item.id)} type="inList" @@ -265,7 +265,7 @@ export function CustomSelectionTable({ {singleSelection && ( toggleItem(item.id)} disabled={timeseriesOnly && item.isSingleMetricViewerJob === false} diff --git a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_delete.test.tsx b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_delete.test.tsx index 08cc54ec39c6f2..4035e825004650 100644 --- a/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_delete.test.tsx +++ b/x-pack/legacy/plugins/ml/public/application/data_frame_analytics/pages/analytics_management/components/analytics_list/action_delete.test.tsx @@ -8,7 +8,6 @@ import React from 'react'; import { render } from '@testing-library/react'; import * as CheckPrivilige from '../../../../../privilege/check_privilege'; -import { queryByTestSubj } from '../../../../../util/test_utils'; import { DeleteAction } from './action_delete'; @@ -20,25 +19,23 @@ jest.mock('../../../../../privilege/check_privilege', () => ({ })); describe('DeleteAction', () => { - test('When canDeleteDataFrameAnalytics permission is false, button should be disabled.', () => { - const { container } = render(); - expect(queryByTestSubj(container, 'mlAnalyticsJobDeleteButton')).toHaveAttribute('disabled'); + test('When canDeleteDataFrameAnalytics permission is false, button should be disabled.', async () => { + const result = render(); + expect(await result.findByTestId('mlAnalyticsJobDeleteButton')).toHaveAttribute('disabled'); }); - test('When canDeleteDataFrameAnalytics permission is true, button should not be disabled.', () => { + test('When canDeleteDataFrameAnalytics permission is true, button should not be disabled.', async () => { const mock = jest.spyOn(CheckPrivilige, 'checkPermission'); mock.mockImplementation(p => p === 'canDeleteDataFrameAnalytics'); - const { container } = render(); + const result = render(); - expect(queryByTestSubj(container, 'mlAnalyticsJobDeleteButton')).not.toHaveAttribute( - 'disabled' - ); + expect(await result.findByTestId('mlAnalyticsJobDeleteButton')).not.toHaveAttribute('disabled'); mock.mockRestore(); }); - test('When job is running, delete button should be disabled.', () => { - const { container } = render( + test('When job is running, delete button should be disabled.', async () => { + const result = render( { /> ); - expect(queryByTestSubj(container, 'mlAnalyticsJobDeleteButton')).toHaveAttribute('disabled'); + expect(await result.findByTestId('mlAnalyticsJobDeleteButton')).toHaveAttribute('disabled'); }); }); diff --git a/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/calendar_form/__snapshots__/calendar_form.test.js.snap b/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/calendar_form/__snapshots__/calendar_form.test.js.snap index 0e7db62e44b51b..ea9b7ef7090e56 100644 --- a/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/calendar_form/__snapshots__/calendar_form.test.js.snap +++ b/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/calendar_form/__snapshots__/calendar_form.test.js.snap @@ -189,7 +189,7 @@ exports[`CalendarForm Renders calendar form 1`] = ` grow={false} > , ( { onDeleteClick(event.event_id); @@ -106,7 +106,7 @@ export const EventsTable = ({ { instance.setState(testState); wrapper.update(); expect(wrapper.state('selectedEvents').length).toBe(2); - const deleteButton = wrapper.find('[data-testid="event_delete"]'); + const deleteButton = wrapper.find('[data-test-subj="event_delete"]'); const button = deleteButton.find('EuiButtonEmpty').first(); button.simulate('click'); diff --git a/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/new_calendar.test.js b/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/new_calendar.test.js index 8dc174040f9c86..421d58822e0236 100644 --- a/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/new_calendar.test.js +++ b/x-pack/legacy/plugins/ml/public/application/settings/calendars/edit/new_calendar.test.js @@ -117,7 +117,7 @@ describe('NewCalendar', () => { test('Import modal shown on Import Events button click', () => { const wrapper = mountWithIntl(); - const importButton = wrapper.find('[data-testid="ml_import_events"]'); + const importButton = wrapper.find('[data-test-subj="ml_import_events"]'); const button = importButton.find('EuiButton'); button.simulate('click'); @@ -127,7 +127,7 @@ describe('NewCalendar', () => { test('New event modal shown on New event button click', () => { const wrapper = mountWithIntl(); - const importButton = wrapper.find('[data-testid="ml_new_event"]'); + const importButton = wrapper.find('[data-test-subj="ml_new_event"]'); const button = importButton.find('EuiButton'); button.simulate('click'); @@ -154,7 +154,7 @@ describe('NewCalendar', () => { const wrapper = mountWithIntl(); - const buttons = wrapper.find('[data-testid="ml_save_calendar_button"]'); + const buttons = wrapper.find('[data-test-subj="ml_save_calendar_button"]'); const saveButton = buttons.find('EuiButton'); expect(saveButton.prop('isDisabled')).toBe(true); diff --git a/x-pack/legacy/plugins/ml/public/application/util/test_utils.ts b/x-pack/legacy/plugins/ml/public/application/util/test_utils.ts deleted file mode 100644 index 5c020840182e57..00000000000000 --- a/x-pack/legacy/plugins/ml/public/application/util/test_utils.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { queryHelpers } from '@testing-library/react'; - -/** - * 'react-testing-library provides 'queryByTestId()' to get - * elements with a 'data-testid' attribut. This custom method - * supports querying for the Kibana style 'data-test-subj' attribute. - * @param {HTMLElement} container The wrapping HTML element. - * @param {Matcher} id The 'data-test-subj' id. - * @returns {HTMLElement | null} - */ - -export const queryByTestSubj = queryHelpers.queryByAttribute.bind(null, 'data-test-subj'); diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx index 37847553d512ad..731a1cf5065f0f 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx @@ -25,7 +25,7 @@ describe('when on the alerting page', () => { /** * @testing-library/react provides `queryByTestId`, but that uses the data attribute - * 'data-testid' whereas our FTR and EUI's tests all use 'data-test-subj'. While @testing-library/react + * 'data-testid' whereas our FTR and EUI's tesxts all use 'data-test-subj'. While @testing-library/react * could be configured to use 'data-test-subj', it is not currently configured that way. * * This provides an equivalent function to `queryByTestId` but that uses our 'data-test-subj' attribute. diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx index 6f88727575557d..c0ace0f0971f6b 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.tsx @@ -136,7 +136,7 @@ export const AlertIndex = memo(() => { if (columnId === 'alert_type') { return ( {i18n.translate( @@ -203,7 +203,7 @@ export const AlertIndex = memo(() => { return ( <> {hasSelectedAlert && ( - +

@@ -216,7 +216,7 @@ export const AlertIndex = memo(() => { )} - + { renderCellValue={renderCellValue} pagination={pagination} data-test-subj="alertListGrid" - data-testid="alertListGrid" /> diff --git a/x-pack/plugins/endpoint/public/embeddables/resolver/view/use_camera.test.tsx b/x-pack/plugins/endpoint/public/embeddables/resolver/view/use_camera.test.tsx index f4abb51f062f2a..1b8157b68af925 100644 --- a/x-pack/plugins/endpoint/public/embeddables/resolver/view/use_camera.test.tsx +++ b/x-pack/plugins/endpoint/public/embeddables/resolver/view/use_camera.test.tsx @@ -35,7 +35,7 @@ describe('useCamera on an unpainted element', () => { const camera = useCamera(); const { ref, onMouseDown } = camera; projectionMatrix = camera.projectionMatrix; - return
; + return
; }; simulator = sideEffectSimulator(); From 3e1e35365c1dd518301897eb8c5c2ce9f1a16388 Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 10:44:55 +0100 Subject: [PATCH 12/17] fix undefined usestate --- .../app/sections/clone_transform/clone_transform_section.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/transform/public/app/sections/clone_transform/clone_transform_section.tsx b/x-pack/legacy/plugins/transform/public/app/sections/clone_transform/clone_transform_section.tsx index de96a4de329623..a8925e9050ea17 100644 --- a/x-pack/legacy/plugins/transform/public/app/sections/clone_transform/clone_transform_section.tsx +++ b/x-pack/legacy/plugins/transform/public/app/sections/clone_transform/clone_transform_section.tsx @@ -77,7 +77,7 @@ export const CloneTransformSection: FC = ({ match }) => { const transformId = match.params.transformId; const [transformConfig, setTransformConfig] = useState(); - const [errorMessage, setErrorMessage] = useState(); + const [errorMessage, setErrorMessage] = useState(); const [isInitialized, setIsInitialized] = useState(false); const [savedObjectId, setSavedObjectId] = useState(undefined); From 5fe5d5ce919694c18099a7c9d138840e8008fbd2 Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 13:49:22 +0100 Subject: [PATCH 13/17] rebuild dist-pm --- packages/kbn-pm/dist/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index 451db9750ada75..c4d031046e6c71 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -40053,9 +40053,9 @@ function getFlags(argv, options) { } exports.getFlags = getFlags; function getHelp(options) { - var _a, _b; + var _a; const usage = options.usage || `node ${path_1.relative(process.cwd(), process.argv[1])}`; - const optionHelp = (dedent_1.default(((_b = (_a = options) === null || _a === void 0 ? void 0 : _a.flags) === null || _b === void 0 ? void 0 : _b.help) || '') + + const optionHelp = (dedent_1.default(((_a = options === null || options === void 0 ? void 0 : options.flags) === null || _a === void 0 ? void 0 : _a.help) || '') + '\n' + dedent_1.default ` --verbose, -v Log verbosely @@ -40458,7 +40458,7 @@ class KbnClientRequester { const url = url_1.default.resolve(this.pickUrl(), options.path); const description = options.description || `${options.method} ${url}`; let attempt = 0; - const maxAttempts = (_a = options.retries, (_a !== null && _a !== void 0 ? _a : DEFAULT_MAX_ATTEMPTS)); + const maxAttempts = (_a = options.retries) !== null && _a !== void 0 ? _a : DEFAULT_MAX_ATTEMPTS; while (true) { attempt += 1; try { From 9d8c1705b3a417a506e88557fe6dbe0eecb3404e Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 24 Feb 2020 13:50:39 +0100 Subject: [PATCH 14/17] fix typo --- .../public/applications/endpoint/view/alerts/index.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx index 731a1cf5065f0f..37847553d512ad 100644 --- a/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx +++ b/x-pack/plugins/endpoint/public/applications/endpoint/view/alerts/index.test.tsx @@ -25,7 +25,7 @@ describe('when on the alerting page', () => { /** * @testing-library/react provides `queryByTestId`, but that uses the data attribute - * 'data-testid' whereas our FTR and EUI's tesxts all use 'data-test-subj'. While @testing-library/react + * 'data-testid' whereas our FTR and EUI's tests all use 'data-test-subj'. While @testing-library/react * could be configured to use 'data-test-subj', it is not currently configured that way. * * This provides an equivalent function to `queryByTestId` but that uses our 'data-test-subj' attribute. From 33d3f9381b0eb847e27e7c893be640ddf308b1ce Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 2 Mar 2020 14:02:37 +0100 Subject: [PATCH 15/17] update to 3.8.3 --- examples/bfetch_explorer/package.json | 2 +- examples/demo_search/package.json | 2 +- examples/embeddable_examples/package.json | 2 +- examples/embeddable_explorer/package.json | 2 +- examples/search_explorer/package.json | 2 +- examples/state_containers_examples/package.json | 2 +- examples/ui_action_examples/package.json | 2 +- examples/ui_actions_explorer/package.json | 2 +- package.json | 4 ++-- packages/kbn-analytics/package.json | 2 +- packages/kbn-config-schema/package.json | 2 +- packages/kbn-dev-utils/package.json | 2 +- packages/kbn-i18n/package.json | 2 +- packages/kbn-pm/package.json | 2 +- .../plugins/core_app_status/package.json | 2 +- test/plugin_functional/plugins/core_plugin_a/package.json | 2 +- .../plugins/core_plugin_appleave/package.json | 2 +- test/plugin_functional/plugins/core_plugin_b/package.json | 2 +- .../plugins/core_plugin_chromeless/package.json | 2 +- .../plugins/core_plugin_legacy/package.json | 2 +- .../plugins/core_provider_plugin/package.json | 2 +- .../plugins/kbn_tp_bfetch_explorer/package.json | 2 +- .../plugins/kbn_tp_embeddable_explorer/package.json | 2 +- .../plugins/kbn_tp_sample_panel_action/package.json | 2 +- test/plugin_functional/plugins/legacy_plugin/package.json | 2 +- .../plugins/management_test_plugin/package.json | 2 +- .../plugins/rendering_plugin/package.json | 2 +- .../plugins/ui_settings_plugin/package.json | 2 +- x-pack/legacy/plugins/apm/e2e/package.json | 2 +- x-pack/package.json | 2 +- yarn.lock | 8 ++++---- 31 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/bfetch_explorer/package.json b/examples/bfetch_explorer/package.json index ba1f2dce83f434..b15a0b3b6ada33 100644 --- a/examples/bfetch_explorer/package.json +++ b/examples/bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/demo_search/package.json b/examples/demo_search/package.json index 27a0533ba9e7d8..befd3b7e703fa6 100644 --- a/examples/demo_search/package.json +++ b/examples/demo_search/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/embeddable_examples/package.json b/examples/embeddable_examples/package.json index 0ca26387080a8a..c7cf18e4f84c15 100644 --- a/examples/embeddable_examples/package.json +++ b/examples/embeddable_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/embeddable_explorer/package.json b/examples/embeddable_explorer/package.json index bd959cc8baa0ec..54608a7b3b63cb 100644 --- a/examples/embeddable_explorer/package.json +++ b/examples/embeddable_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/search_explorer/package.json b/examples/search_explorer/package.json index 46d2611b5a54ad..d1842dacca3dd6 100644 --- a/examples/search_explorer/package.json +++ b/examples/search_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/state_containers_examples/package.json b/examples/state_containers_examples/package.json index 8569af4855d559..db9b2dc094c675 100644 --- a/examples/state_containers_examples/package.json +++ b/examples/state_containers_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/examples/ui_action_examples/package.json b/examples/ui_action_examples/package.json index 3d1201ad68b3bf..83143a8c06c62f 100644 --- a/examples/ui_action_examples/package.json +++ b/examples/ui_action_examples/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/examples/ui_actions_explorer/package.json b/examples/ui_actions_explorer/package.json index d13bf860286808..3554ba664ebd4e 100644 --- a/examples/ui_actions_explorer/package.json +++ b/examples/ui_actions_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/package.json b/package.json index 0270d92c97dff0..16baad82c35daa 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "**/@types/hapi": "^17.0.18", "**/@types/angular": "^1.6.56", "**/@types/hoist-non-react-statics": "^3.3.1", - "**/typescript": "3.8.2", + "**/typescript": "3.8.3", "**/graphql-toolkit/lodash": "^4.17.13", "**/hoist-non-react-statics": "^3.3.2", "**/isomorphic-git/**/base64-js": "^1.2.1", @@ -479,7 +479,7 @@ "supertest": "^3.1.0", "supertest-as-promised": "^4.0.2", "tree-kill": "^1.2.2", - "typescript": "3.8.2", + "typescript": "3.8.3", "typings-tester": "^0.3.2", "vinyl-fs": "^3.0.3", "xml2js": "^0.4.22", diff --git a/packages/kbn-analytics/package.json b/packages/kbn-analytics/package.json index 1058aef942c29f..437bead1b5ad82 100644 --- a/packages/kbn-analytics/package.json +++ b/packages/kbn-analytics/package.json @@ -17,6 +17,6 @@ "@babel/cli": "^7.5.5", "@kbn/dev-utils": "1.0.0", "@kbn/babel-preset": "1.0.0", - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/packages/kbn-config-schema/package.json b/packages/kbn-config-schema/package.json index 5e984d8a3908e1..dbc90990b853e1 100644 --- a/packages/kbn-config-schema/package.json +++ b/packages/kbn-config-schema/package.json @@ -10,7 +10,7 @@ "kbn:bootstrap": "yarn build" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" }, "peerDependencies": { "joi": "^13.5.2", diff --git a/packages/kbn-dev-utils/package.json b/packages/kbn-dev-utils/package.json index 8afc551362204f..528da874ccf2a8 100644 --- a/packages/kbn-dev-utils/package.json +++ b/packages/kbn-dev-utils/package.json @@ -22,7 +22,7 @@ "tslib": "^1.9.3" }, "devDependencies": { - "typescript": "3.8.2", + "typescript": "3.8.3", "@kbn/expect": "1.0.0", "chance": "1.0.18" } diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index 10123e5d475d96..d8591e01963bd1 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -21,7 +21,7 @@ "del": "^5.1.0", "getopts": "^2.2.4", "supports-color": "^7.0.0", - "typescript": "3.8.2" + "typescript": "3.8.3" }, "dependencies": { "intl-format-cache": "^2.1.0", diff --git a/packages/kbn-pm/package.json b/packages/kbn-pm/package.json index db3ff62d7d1b6e..19bd563ef5125f 100644 --- a/packages/kbn-pm/package.json +++ b/packages/kbn-pm/package.json @@ -61,7 +61,7 @@ "strip-ansi": "^4.0.0", "strong-log-transformer": "^2.1.0", "tempy": "^0.3.0", - "typescript": "3.8.2", + "typescript": "3.8.3", "unlazy-loader": "^0.1.3", "webpack": "^4.41.5", "webpack-cli": "^3.3.10", diff --git a/test/plugin_functional/plugins/core_app_status/package.json b/test/plugin_functional/plugins/core_app_status/package.json index 61655487c6acbc..b7fce33e24cfc0 100644 --- a/test/plugin_functional/plugins/core_app_status/package.json +++ b/test/plugin_functional/plugins/core_app_status/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_plugin_a/package.json b/test/plugin_functional/plugins/core_plugin_a/package.json index 899f56b3c088cc..f991efec3a0d90 100644 --- a/test/plugin_functional/plugins/core_plugin_a/package.json +++ b/test/plugin_functional/plugins/core_plugin_a/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_plugin_appleave/package.json b/test/plugin_functional/plugins/core_plugin_appleave/package.json index e0488655a17235..62b6fbffb8204a 100644 --- a/test/plugin_functional/plugins/core_plugin_appleave/package.json +++ b/test/plugin_functional/plugins/core_plugin_appleave/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_plugin_b/package.json b/test/plugin_functional/plugins/core_plugin_b/package.json index dadde9b8d00bc0..0c9d343a0d382b 100644 --- a/test/plugin_functional/plugins/core_plugin_b/package.json +++ b/test/plugin_functional/plugins/core_plugin_b/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_plugin_chromeless/package.json b/test/plugin_functional/plugins/core_plugin_chromeless/package.json index eff6c1e1f142a0..7b7968b3a5f9cb 100644 --- a/test/plugin_functional/plugins/core_plugin_chromeless/package.json +++ b/test/plugin_functional/plugins/core_plugin_chromeless/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_plugin_legacy/package.json b/test/plugin_functional/plugins/core_plugin_legacy/package.json index e3ed9563ac15af..2f3c87827da487 100644 --- a/test/plugin_functional/plugins/core_plugin_legacy/package.json +++ b/test/plugin_functional/plugins/core_plugin_legacy/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/core_provider_plugin/package.json b/test/plugin_functional/plugins/core_provider_plugin/package.json index 941503b934cbbd..fa7cfed84af870 100644 --- a/test/plugin_functional/plugins/core_provider_plugin/package.json +++ b/test/plugin_functional/plugins/core_provider_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json index 001ad213bbb3d3..f3381c13211234 100644 --- a/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_bfetch_explorer/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json index 013525dcc79ec6..20785105bdad71 100644 --- a/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json +++ b/test/plugin_functional/plugins/kbn_tp_embeddable_explorer/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json index 4cc8a4cea85039..bbf8fb4bb7fe93 100644 --- a/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/kbn_tp_sample_panel_action/package.json @@ -17,6 +17,6 @@ }, "devDependencies": { "@kbn/plugin-helpers": "9.0.2", - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/legacy_plugin/package.json b/test/plugin_functional/plugins/legacy_plugin/package.json index b04d8688b3d396..a9f4665b47ce33 100644 --- a/test/plugin_functional/plugins/legacy_plugin/package.json +++ b/test/plugin_functional/plugins/legacy_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.7.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/management_test_plugin/package.json b/test/plugin_functional/plugins/management_test_plugin/package.json index 0f4007dd50c0ef..45a24570c859d4 100644 --- a/test/plugin_functional/plugins/management_test_plugin/package.json +++ b/test/plugin_functional/plugins/management_test_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.8.2" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/rendering_plugin/package.json b/test/plugin_functional/plugins/rendering_plugin/package.json index 9ab6eccbe31be7..6c263ddbc32081 100644 --- a/test/plugin_functional/plugins/rendering_plugin/package.json +++ b/test/plugin_functional/plugins/rendering_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/test/plugin_functional/plugins/ui_settings_plugin/package.json b/test/plugin_functional/plugins/ui_settings_plugin/package.json index 6a0d5999412ff0..6ee91db802e243 100644 --- a/test/plugin_functional/plugins/ui_settings_plugin/package.json +++ b/test/plugin_functional/plugins/ui_settings_plugin/package.json @@ -12,6 +12,6 @@ "build": "rm -rf './target' && tsc" }, "devDependencies": { - "typescript": "3.5.3" + "typescript": "3.8.3" } } diff --git a/x-pack/legacy/plugins/apm/e2e/package.json b/x-pack/legacy/plugins/apm/e2e/package.json index e3b0269f20796f..74a510888f949e 100644 --- a/x-pack/legacy/plugins/apm/e2e/package.json +++ b/x-pack/legacy/plugins/apm/e2e/package.json @@ -18,7 +18,7 @@ "js-yaml": "^3.13.1", "p-limit": "^2.2.1", "ts-loader": "^6.1.0", - "typescript": "3.8.2", + "typescript": "3.8.3", "webpack": "^4.41.5" } } diff --git a/x-pack/package.json b/x-pack/package.json index 3cafef0379cc81..d142056aa6ae28 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -166,7 +166,7 @@ "tmp": "0.1.0", "tree-kill": "^1.2.2", "ts-loader": "^6.0.4", - "typescript": "3.8.2", + "typescript": "3.8.3", "vinyl-fs": "^3.0.3", "whatwg-fetch": "^3.0.0", "xml-crypto": "^1.4.0", diff --git a/yarn.lock b/yarn.lock index d6dfe000286d16..953eb72a78bfac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29890,10 +29890,10 @@ typescript-fsa@^3.0.0: resolved "https://registry.yarnpkg.com/typescript-fsa/-/typescript-fsa-3.0.0.tgz#3ad1cb915a67338e013fc21f67c9b3e0e110c912" integrity sha512-xiXAib35i0QHl/+wMobzPibjAH5TJLDj+qGq5jwVLG9qR4FUswZURBw2qihBm0m06tHoyb3FzpnJs1GRhRwVag== -typescript@3.5.3, typescript@3.8.2, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: - version "3.8.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a" - integrity sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ== +typescript@3.8.3, typescript@^3.0.1, typescript@^3.0.3, typescript@^3.2.2, typescript@^3.3.3333, typescript@^3.4.5, typescript@~3.7.2: + version "3.8.3" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061" + integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w== typings-tester@^0.3.2: version "0.3.2" From 822b5bd0768400da6ab3f504a4ddfaa3c73be892 Mon Sep 17 00:00:00 2001 From: restrry Date: Mon, 2 Mar 2020 14:22:36 +0100 Subject: [PATCH 16/17] remove unnecessary ts directives --- src/core/public/chrome/ui/header/header_badge.tsx | 2 +- src/plugins/share/public/components/url_panel_content.tsx | 2 +- .../apm/public/components/app/ServiceMap/cytoscapeOptions.ts | 3 +-- .../siem/public/components/navigation/tab_navigation/index.tsx | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/public/chrome/ui/header/header_badge.tsx b/src/core/public/chrome/ui/header/header_badge.tsx index 15f87aeb3b5a1f..4e529ad9a410b7 100644 --- a/src/core/public/chrome/ui/header/header_badge.tsx +++ b/src/core/public/chrome/ui/header/header_badge.tsx @@ -66,7 +66,7 @@ export class HeaderBadge extends Component {
{ fullWidth onClick={copy} disabled={this.state.isCreatingShortUrl || this.state.url === ''} - data-share-url={(this.state.url as unknown) as undefined} + data-share-url={this.state.url} data-test-subj="copyShareUrlButton" size="s" > diff --git a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts index eb855da821b93a..fe6c9819a31080 100644 --- a/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts +++ b/x-pack/legacy/plugins/apm/public/components/app/ServiceMap/cytoscapeOptions.ts @@ -38,14 +38,13 @@ const style: cytoscape.Stylesheet[] = [ // The DefinitelyTyped definitions don't specify that a function can be // used here. // - // @ts-ignore 'background-image': (el: cytoscape.NodeSingular) => iconForNode(el) ?? defaultIcon, 'background-height': (el: cytoscape.NodeSingular) => isService(el) ? '85%' : '40%', 'background-width': (el: cytoscape.NodeSingular) => - // @ts-ignore no function allowed isService(el) ? '80%' : '40%', + // @ts-ignore no function allowed 'border-color': (el: cytoscape.NodeSingular) => el.hasClass('primary') || el.selected() ? theme.euiColorPrimary diff --git a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx b/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx index b49dcf69bf2fca..cebf9b90656ca3 100644 --- a/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx +++ b/x-pack/legacy/plugins/siem/public/components/navigation/tab_navigation/index.tsx @@ -25,7 +25,7 @@ const TabNavigationItemComponent = ({ return ( Date: Mon, 2 Mar 2020 14:28:16 +0100 Subject: [PATCH 17/17] fix ml type error --- x-pack/plugins/ml/server/lib/ml_telemetry/ml_telemetry.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/server/lib/ml_telemetry/ml_telemetry.ts b/x-pack/plugins/ml/server/lib/ml_telemetry/ml_telemetry.ts index 8cf24213961b18..e31ebd3a84776d 100644 --- a/x-pack/plugins/ml/server/lib/ml_telemetry/ml_telemetry.ts +++ b/x-pack/plugins/ml/server/lib/ml_telemetry/ml_telemetry.ts @@ -40,7 +40,10 @@ export async function incrementFileDataVisualizerIndexCreationCount( savedObjectsClient: SavedObjectsClientContract ): Promise { try { - const { attributes } = await savedObjectsClient.get('telemetry', 'telemetry'); + const { attributes } = await savedObjectsClient.get<{ enabled: boolean }>( + 'telemetry', + 'telemetry' + ); if (attributes.enabled === false) { return;