From 0614fa21adee6ff3e461f28ef869eba62def6d13 Mon Sep 17 00:00:00 2001 From: Miki Date: Mon, 13 Nov 2023 09:57:31 -0800 Subject: [PATCH] Bump typescript and axios * axios needed a bump due to CVE-2023-45857 which was not compatible with typescript 4.0.2 * typescript was bumped to 4.6.4 Signed-off-by: Miki --- package.json | 4 ++-- packages/osd-ace/package.json | 2 +- packages/osd-analytics/package.json | 2 +- packages/osd-apm-config-loader/package.json | 2 +- packages/osd-babel-preset/common_preset.js | 4 ++-- packages/osd-config-schema/package.json | 2 +- packages/osd-config/package.json | 2 +- packages/osd-cross-platform/package.json | 2 +- packages/osd-cross-platform/src/repo_root.ts | 2 +- packages/osd-dev-utils/package.json | 4 ++-- .../src/osd_client/osd_client_requester.ts | 2 +- packages/osd-i18n/package.json | 2 +- packages/osd-logging/package.json | 2 +- packages/osd-monaco/package.json | 2 +- packages/osd-opensearch-archiver/src/cli.ts | 2 +- packages/osd-plugin-helpers/package.json | 2 +- packages/osd-pm/package.json | 2 +- packages/osd-std/package.json | 2 +- .../package.json | 2 +- packages/osd-telemetry-tools/package.json | 2 +- .../src/failed_tests_reporter/github_api.ts | 6 +++--- .../lib/lifecycle_phase.ts | 11 +++++----- packages/osd-ui-shared-deps/package.json | 4 ++-- packages/osd-ui-shared-deps/webpack.config.js | 11 ++++++++++ packages/osd-utils/package.json | 2 +- .../application/application_service.test.ts | 2 +- .../application_service.test.tsx | 8 ++++---- .../application/ui/app_container.test.tsx | 2 +- src/core/public/chrome/chrome_service.test.ts | 7 +++++-- src/core/public/chrome/chrome_service.tsx | 2 +- .../recently_accessed_service.test.ts | 2 -- src/core/public/context/context_service.ts | 2 +- src/core/public/core_app/core_app.ts | 4 ++-- .../public/doc_links/doc_links_service.ts | 2 +- .../fatal_errors/fatal_errors_service.tsx | 2 +- src/core/public/http/fetch.ts | 2 ++ .../injected_metadata_service.ts | 10 ++++++---- .../integrations/integrations_service.ts | 2 +- .../notifications/notifications_service.ts | 4 ++-- .../public/rendering/rendering_service.tsx | 2 +- .../public/ui_settings/ui_settings_api.ts | 2 +- .../public/ui_settings/ui_settings_client.ts | 2 +- .../public/ui_settings/ui_settings_service.ts | 2 +- src/core/server/context/context_service.ts | 2 +- src/core/server/http/http_service.ts | 2 +- .../server/http/router/response_adapter.ts | 4 +++- .../logging/appenders/file/file_appender.ts | 2 +- src/core/server/logging/logging_service.ts | 2 +- src/core/server/metrics/metrics_service.ts | 2 +- .../opensearch/client/cluster_client.test.ts | 8 ++++---- .../server/opensearch/opensearch_service.ts | 4 ++-- src/core/server/status/status_service.ts | 2 +- .../common/of.test.ts | 4 ++-- .../plugins/osd_tp_run_pipeline/package.json | 2 +- .../plugins/app_link_test/package.json | 2 +- .../plugins/core_app_status/package.json | 2 +- .../plugins/core_plugin_a/package.json | 2 +- .../plugins/core_plugin_appleave/package.json | 2 +- .../plugins/core_plugin_b/package.json | 2 +- .../core_plugin_chromeless/package.json | 2 +- .../core_plugin_route_timeouts/package.json | 2 +- .../core_plugin_static_assets/package.json | 2 +- .../plugins/core_provider_plugin/package.json | 2 +- .../package.json | 2 +- .../plugins/data_search/package.json | 2 +- .../doc_views_links_plugin/package.json | 2 +- .../plugins/doc_views_plugin/package.json | 2 +- .../plugins/index_patterns/package.json | 2 +- .../management_test_plugin/package.json | 2 +- .../opensearch_client_plugin/package.json | 2 +- .../osd_sample_panel_action/package.json | 2 +- .../plugins/osd_top_nav/package.json | 2 +- .../osd_tp_custom_visualizations/package.json | 2 +- .../plugins/rendering_plugin/package.json | 2 +- .../plugins/ui_settings_plugin/package.json | 2 +- tsconfig.base.json | 1 + yarn.lock | 20 ++++++------------- 77 files changed, 124 insertions(+), 112 deletions(-) diff --git a/package.json b/package.json index cfb328ebb831..f994071d5d33 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "**/node-jose": "^2.2.0", "**/nth-check": "^2.0.1", "**/trim": "^0.0.3", - "**/typescript": "4.0.2", + "**/typescript": "4.6.4", "**/unset-value": "^2.0.1", "**/jest-config": "npm:@amoo-miki/jest-config@27.5.1", "**/jest-jasmine2": "npm:@amoo-miki/jest-jasmine2@27.5.1", @@ -453,7 +453,7 @@ "topojson-client": "3.0.0", "tough-cookie": "^4.1.3", "tree-kill": "^1.2.2", - "typescript": "4.0.2", + "typescript": "4.6.4", "ui-select": "0.19.8", "vega": "^5.23.0", "vega-interpreter": "npm:@amoo-miki/vega-forced-csp-compliant-interpreter@1.0.6", diff --git a/packages/osd-ace/package.json b/packages/osd-ace/package.json index ae6c3126e99f..fca28f6b92c3 100644 --- a/packages/osd-ace/package.json +++ b/packages/osd-ace/package.json @@ -13,7 +13,7 @@ "@osd/dev-utils": "1.0.0", "@osd/babel-preset": "1.0.0", "raw-loader": "^4.0.2", - "typescript": "4.0.2", + "typescript": "4.6.4", "webpack": "npm:@amoo-miki/webpack@4.46.0-rc.2" }, "@osd/pm": { diff --git a/packages/osd-analytics/package.json b/packages/osd-analytics/package.json index 73fdd2b102cb..68312fe62f91 100644 --- a/packages/osd-analytics/package.json +++ b/packages/osd-analytics/package.json @@ -17,6 +17,6 @@ "@babel/cli": "^7.22.9", "@osd/dev-utils": "1.0.0", "@osd/babel-preset": "1.0.0", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/packages/osd-apm-config-loader/package.json b/packages/osd-apm-config-loader/package.json index fc06ff025e8a..7e78b6971370 100644 --- a/packages/osd-apm-config-loader/package.json +++ b/packages/osd-apm-config-loader/package.json @@ -17,7 +17,7 @@ "lodash": "^4.17.21" }, "devDependencies": { - "typescript": "4.0.2", + "typescript": "4.6.4", "tsd": "^0.21.0" } } diff --git a/packages/osd-babel-preset/common_preset.js b/packages/osd-babel-preset/common_preset.js index 493c67afbcb1..dc324f6efd35 100644 --- a/packages/osd-babel-preset/common_preset.js +++ b/packages/osd-babel-preset/common_preset.js @@ -29,8 +29,8 @@ */ const plugins = [ - '@babel/plugin-transform-class-properties', - '@babel/plugin-transform-private-methods', + require.resolve('@babel/plugin-transform-class-properties'), + require.resolve('@babel/plugin-transform-private-methods'), require.resolve('babel-plugin-add-module-exports'), // Optional Chaining proposal is stage 4 (https://github.com/tc39/proposal-optional-chaining) diff --git a/packages/osd-config-schema/package.json b/packages/osd-config-schema/package.json index c88afe609e1f..0a504f957596 100644 --- a/packages/osd-config-schema/package.json +++ b/packages/osd-config-schema/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@osd/cross-platform": "1.0.0", "tsd": "^0.21.0", - "typescript": "4.0.2" + "typescript": "4.6.4" }, "peerDependencies": { "lodash": "^4.17.21", diff --git a/packages/osd-config/package.json b/packages/osd-config/package.json index f6d363c9c386..12993474e5fa 100644 --- a/packages/osd-config/package.json +++ b/packages/osd-config/package.json @@ -24,7 +24,7 @@ "devDependencies": { "@osd/dev-utils": "1.0.0", "@osd/utility-types": "1.0.0", - "typescript": "4.0.2", + "typescript": "4.6.4", "tsd": "^0.21.0" } } diff --git a/packages/osd-cross-platform/package.json b/packages/osd-cross-platform/package.json index 1af90b00a98f..18175b112f2e 100644 --- a/packages/osd-cross-platform/package.json +++ b/packages/osd-cross-platform/package.json @@ -9,7 +9,7 @@ "osd:bootstrap": "yarn build" }, "devDependencies": { - "typescript": "4.0.2", + "typescript": "4.6.4", "tsd": "^0.21.0" } } diff --git a/packages/osd-cross-platform/src/repo_root.ts b/packages/osd-cross-platform/src/repo_root.ts index a7ffc19a7f7c..ea2975d19eb5 100644 --- a/packages/osd-cross-platform/src/repo_root.ts +++ b/packages/osd-cross-platform/src/repo_root.ts @@ -41,7 +41,7 @@ const readOpenSearchDashboardsPkgJson = (dir: string) => { return json; } } catch (error) { - if (error && error.code === 'ENOENT') { + if (error?.code === 'ENOENT') { return; } diff --git a/packages/osd-dev-utils/package.json b/packages/osd-dev-utils/package.json index a361388647c5..16eccaf5af86 100644 --- a/packages/osd-dev-utils/package.json +++ b/packages/osd-dev-utils/package.json @@ -15,7 +15,7 @@ "dependencies": { "@babel/core": "^7.22.9", "@osd/utils": "1.0.0", - "axios": "^0.27.2", + "axios": "^1.6.1", "chalk": "^4.1.0", "cheerio": "0.22.0", "dedent": "^0.7.0", @@ -37,6 +37,6 @@ "@osd/expect": "1.0.0", "@types/vinyl": "^2.0.4", "chance": "1.0.18", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/packages/osd-dev-utils/src/osd_client/osd_client_requester.ts b/packages/osd-dev-utils/src/osd_client/osd_client_requester.ts index 807ec64b0e5a..1519497705bb 100644 --- a/packages/osd-dev-utils/src/osd_client/osd_client_requester.ts +++ b/packages/osd-dev-utils/src/osd_client/osd_client_requester.ts @@ -36,7 +36,7 @@ import { ToolingLog } from '../tooling_log'; const isConcliftOnGetError = (error: any) => { return ( - isAxiosResponseError(error) && error.config.method === 'GET' && error.response.status === 409 + isAxiosResponseError(error) && error.config?.method === 'GET' && error.response.status === 409 ); }; diff --git a/packages/osd-i18n/package.json b/packages/osd-i18n/package.json index ca15c98cf0fb..73cdf2fe4a29 100644 --- a/packages/osd-i18n/package.json +++ b/packages/osd-i18n/package.json @@ -16,7 +16,7 @@ "del": "^6.1.1", "getopts": "^2.2.5", "supports-color": "^7.0.0", - "typescript": "4.0.2" + "typescript": "4.6.4" }, "dependencies": { "intl-format-cache": "^2.1.0", diff --git a/packages/osd-logging/package.json b/packages/osd-logging/package.json index 1d8374ced5ee..2db1d1a33d0a 100644 --- a/packages/osd-logging/package.json +++ b/packages/osd-logging/package.json @@ -13,6 +13,6 @@ "@osd/std": "1.0.0" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/packages/osd-monaco/package.json b/packages/osd-monaco/package.json index ae9cfaddc53a..5bf4ae2fd4db 100644 --- a/packages/osd-monaco/package.json +++ b/packages/osd-monaco/package.json @@ -21,7 +21,7 @@ "del": "^6.1.1", "raw-loader": "^4.0.2", "supports-color": "^7.0.0", - "typescript": "4.0.2", + "typescript": "4.6.4", "webpack": "npm:@amoo-miki/webpack@4.46.0-rc.2", "webpack-cli": "^4.9.2" } diff --git a/packages/osd-opensearch-archiver/src/cli.ts b/packages/osd-opensearch-archiver/src/cli.ts index e8606ed26645..78df5a2c6407 100644 --- a/packages/osd-opensearch-archiver/src/cli.ts +++ b/packages/osd-opensearch-archiver/src/cli.ts @@ -239,7 +239,7 @@ export function runCli() { output: process.stdout, }); - await new Promise((resolveInput) => { + await new Promise((resolveInput) => { rl.question(`Press enter when you're done`, () => { rl.close(); resolveInput(); diff --git a/packages/osd-plugin-helpers/package.json b/packages/osd-plugin-helpers/package.json index 595065322aec..ae40531a6154 100644 --- a/packages/osd-plugin-helpers/package.json +++ b/packages/osd-plugin-helpers/package.json @@ -31,6 +31,6 @@ "@types/gulp-zip": "^4.0.1", "@types/inquirer": "^7.3.1", "extract-zip": "^2.0.1", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/packages/osd-pm/package.json b/packages/osd-pm/package.json index 94b2c327274d..5a64e872cf4a 100644 --- a/packages/osd-pm/package.json +++ b/packages/osd-pm/package.json @@ -59,7 +59,7 @@ "strip-ansi": "^6.0.0", "strong-log-transformer": "^2.1.0", "tempy": "^0.3.0", - "typescript": "4.0.2", + "typescript": "4.6.4", "unlazy-loader": "^0.1.3", "webpack": "npm:@amoo-miki/webpack@4.46.0-rc.2", "webpack-cli": "^4.9.2", diff --git a/packages/osd-std/package.json b/packages/osd-std/package.json index 3b1bea69bf8d..360ecf6686bb 100644 --- a/packages/osd-std/package.json +++ b/packages/osd-std/package.json @@ -12,7 +12,7 @@ }, "devDependencies": { "@osd/utility-types": "1.0.0", - "typescript": "4.0.2", + "typescript": "4.6.4", "tsd": "^0.21.0" }, "@osd/pm": { diff --git a/packages/osd-stylelint-plugin-stylelint/package.json b/packages/osd-stylelint-plugin-stylelint/package.json index 49947331fb59..8e852ab35759 100644 --- a/packages/osd-stylelint-plugin-stylelint/package.json +++ b/packages/osd-stylelint-plugin-stylelint/package.json @@ -17,7 +17,7 @@ "stylelint": "^14.5.2" }, "devDependencies": { - "typescript": "4.0.2", + "typescript": "4.6.4", "tsd": "^0.21.0" } } diff --git a/packages/osd-telemetry-tools/package.json b/packages/osd-telemetry-tools/package.json index b697f7012df3..47f6d127f8dd 100644 --- a/packages/osd-telemetry-tools/package.json +++ b/packages/osd-telemetry-tools/package.json @@ -20,6 +20,6 @@ "normalize-path": "^3.0.0", "@types/lodash": "^4.14.170", "moment": "^2.24.0", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/packages/osd-test/src/failed_tests_reporter/github_api.ts b/packages/osd-test/src/failed_tests_reporter/github_api.ts index c9df43472585..d6be81e0cfe4 100644 --- a/packages/osd-test/src/failed_tests_reporter/github_api.ts +++ b/packages/osd-test/src/failed_tests_reporter/github_api.ts @@ -28,7 +28,7 @@ * under the License. */ -import Axios, { AxiosRequestConfig, AxiosInstance } from 'axios'; +import Axios, { AxiosRequestConfig, AxiosInstance, AxiosHeaderValue } from 'axios'; import parseLinkHeader from 'parse-link-header'; import { ToolingLog, isAxiosResponseError, isAxiosRequestError } from '@osd/dev-utils'; @@ -206,7 +206,7 @@ export class GithubApi { ): Promise<{ status: number; statusText: string; - headers: Record; + headers: Record; data: T; }> { const executeRequest = !this.dryRun || options.safeForDryRun; @@ -231,7 +231,7 @@ export class GithubApi { const githubApiFailed = isAxiosResponseError(error) && error.response.status >= 500; const errorResponseLog = isAxiosResponseError(error) && - `[${error.config.method} ${error.config.url}] ${error.response.status} ${error.response.statusText} Error`; + `[${error.config?.method} ${error.config?.url}] ${error.response.status} ${error.response.statusText} Error`; if ((unableToReachGithub || githubApiFailed) && attempt < maxAttempts) { const waitMs = 1000 * attempt; diff --git a/packages/osd-test/src/functional_test_runner/lib/lifecycle_phase.ts b/packages/osd-test/src/functional_test_runner/lib/lifecycle_phase.ts index 02106a4b1dd1..f39f5ee6420b 100644 --- a/packages/osd-test/src/functional_test_runner/lib/lifecycle_phase.ts +++ b/packages/osd-test/src/functional_test_runner/lib/lifecycle_phase.ts @@ -44,16 +44,17 @@ export class LifecyclePhase { private readonly beforeSubj = new Rx.Subject(); public readonly before$ = this.beforeSubj.asObservable(); - private readonly afterSubj = this.options.singular - ? new Rx.ReplaySubject(1) - : new Rx.Subject(); - public readonly after$ = this.afterSubj.asObservable(); + private readonly afterSubj: Rx.Subject; + public readonly after$: Rx.Observable; constructor( private readonly options: { singular?: boolean; } = {} - ) {} + ) { + this.afterSubj = this.options.singular ? new Rx.ReplaySubject(1) : new Rx.Subject(); + this.after$ = this.afterSubj.asObservable(); + } public add(fn: (...args: Args) => Promise | void) { this.handlers.push(fn); diff --git a/packages/osd-ui-shared-deps/package.json b/packages/osd-ui-shared-deps/package.json index ca6028d56acc..995c56887612 100644 --- a/packages/osd-ui-shared-deps/package.json +++ b/packages/osd-ui-shared-deps/package.json @@ -16,7 +16,7 @@ "@osd/i18n": "1.0.0", "@osd/monaco": "1.0.0", "abortcontroller-polyfill": "^1.4.0", - "axios": "^0.27.2", + "axios": "^1.6.1", "compression-webpack-plugin": "npm:@amoo-miki/compression-webpack-plugin@4.0.1-rc.1", "core-js": "^3.6.5", "custom-event-polyfill": "^0.3.0", @@ -51,4 +51,4 @@ "val-loader": "^2.1.2", "webpack": "npm:@amoo-miki/webpack@4.46.0-rc.2" } -} \ No newline at end of file +} diff --git a/packages/osd-ui-shared-deps/webpack.config.js b/packages/osd-ui-shared-deps/webpack.config.js index d9bfd81af523..80e7aeef9c44 100644 --- a/packages/osd-ui-shared-deps/webpack.config.js +++ b/packages/osd-ui-shared-deps/webpack.config.js @@ -131,6 +131,17 @@ exports.getWebpackConfig = ({ dev = false } = {}) => ({ }, ], }, + { + test: /worker_proxy_service\.js$/, + exclude: /node_modules/, + use: { + loader: 'babel-loader', + options: { + babelrc: false, + presets: [require.resolve('@osd/babel-preset/webpack_preset')], + }, + }, + }, ], }, diff --git a/packages/osd-utils/package.json b/packages/osd-utils/package.json index 1d632cffbf69..d8b73f5408b8 100644 --- a/packages/osd-utils/package.json +++ b/packages/osd-utils/package.json @@ -15,6 +15,6 @@ "load-json-file": "^6.2.0" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/src/core/public/application/application_service.test.ts b/src/core/public/application/application_service.test.ts index c03afbba2767..691ba64cf00a 100644 --- a/src/core/public/application/application_service.test.ts +++ b/src/core/public/application/application_service.test.ts @@ -708,7 +708,7 @@ describe('#start()', () => { // Create an app and a promise that allows us to control when the app completes mounting const createWaitingApp = (props: Partial): [App, () => void] => { let finishMount: () => void; - const mountPromise = new Promise((resolve) => (finishMount = resolve)); + const mountPromise = new Promise((resolve) => (finishMount = resolve)); const app = { id: 'some-id', title: 'some-title', diff --git a/src/core/public/application/integration_tests/application_service.test.tsx b/src/core/public/application/integration_tests/application_service.test.tsx index 1b659c0dec5f..9d53d99c9d8c 100644 --- a/src/core/public/application/integration_tests/application_service.test.tsx +++ b/src/core/public/application/integration_tests/application_service.test.tsx @@ -77,7 +77,7 @@ describe('ApplicationService', () => { const { register } = service.setup(setupDeps); let resolveMount: () => void; - const promise = new Promise((resolve) => { + const promise = new Promise((resolve) => { resolveMount = resolve; }); @@ -111,7 +111,7 @@ describe('ApplicationService', () => { const { register } = service.setup(setupDeps); let resolveMount: () => void; - const promise = new Promise((resolve) => { + const promise = new Promise((resolve) => { resolveMount = resolve; }); @@ -453,7 +453,7 @@ describe('ApplicationService', () => { const { register } = service.setup(setupDeps); let resolveMount: () => void; - const promise = new Promise((resolve) => { + const promise = new Promise((resolve) => { resolveMount = resolve; }); @@ -491,7 +491,7 @@ describe('ApplicationService', () => { const { register } = service.setup(setupDeps); let resolveMount: () => void; - const promise = new Promise((resolve) => { + const promise = new Promise((resolve) => { resolveMount = resolve; }); diff --git a/src/core/public/application/ui/app_container.test.tsx b/src/core/public/application/ui/app_container.test.tsx index e9e2caed02e0..3e658fa25665 100644 --- a/src/core/public/application/ui/app_container.test.tsx +++ b/src/core/public/application/ui/app_container.test.tsx @@ -50,7 +50,7 @@ describe('AppContainer', () => { }); const flushPromises = async () => { - await new Promise(async (resolve) => { + await new Promise(async (resolve) => { setImmediate(() => resolve()); }); }; diff --git a/src/core/public/chrome/chrome_service.test.ts b/src/core/public/chrome/chrome_service.test.ts index f11b0f3965e6..e91056ed7766 100644 --- a/src/core/public/chrome/chrome_service.test.ts +++ b/src/core/public/chrome/chrome_service.test.ts @@ -43,9 +43,12 @@ import { ChromeService } from './chrome_service'; import { getAppInfo } from '../application/utils'; class FakeApp implements App { - public title = `${this.id} App`; + public title: string; public mount = () => () => {}; - constructor(public id: string, public chromeless?: boolean) {} + + constructor(public id: string, public chromeless?: boolean) { + this.title = `${this.id} App`; + } } const store = new Map(); const originalLocalStorage = window.localStorage; diff --git a/src/core/public/chrome/chrome_service.tsx b/src/core/public/chrome/chrome_service.tsx index d094d86360ef..37ac2ba508a1 100644 --- a/src/core/public/chrome/chrome_service.tsx +++ b/src/core/public/chrome/chrome_service.tsx @@ -89,7 +89,7 @@ interface ConstructorParams { browserSupportsCsp: boolean; } -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; docLinks: DocLinksStart; http: HttpStart; diff --git a/src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts b/src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts index 7046d5efc236..90e72af35652 100644 --- a/src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts +++ b/src/core/public/chrome/recently_accessed/recently_accessed_service.test.ts @@ -69,11 +69,9 @@ describe('RecentlyAccessed#start()', () => { // @ts-expect-error to allow redeclaring a readonly prop delete window.localStorage; - // @ts-expect-error window.localStorage = new LocalStorageMock(); }); beforeEach(() => localStorage.clear()); - // @ts-expect-error afterAll(() => (window.localStorage = originalLocalStorage)); const getStart = async () => { diff --git a/src/core/public/context/context_service.ts b/src/core/public/context/context_service.ts index 5071288a1405..433e96c48d8b 100644 --- a/src/core/public/context/context_service.ts +++ b/src/core/public/context/context_service.ts @@ -32,7 +32,7 @@ import { PluginOpaqueId } from '../../server'; import { IContextContainer, ContextContainer, HandlerFunction } from '../../utils/context'; import { CoreContext } from '../core_system'; -interface StartDeps { +export interface StartDeps { pluginDependencies: ReadonlyMap; } diff --git a/src/core/public/core_app/core_app.ts b/src/core/public/core_app/core_app.ts index fcbcc5de5655..e1e91b775374 100644 --- a/src/core/public/core_app/core_app.ts +++ b/src/core/public/core_app/core_app.ts @@ -43,14 +43,14 @@ import type { InjectedMetadataSetup } from '../injected_metadata'; import { renderApp as renderErrorApp, setupUrlOverflowDetection } from './errors'; import { renderApp as renderStatusApp } from './status'; -interface SetupDeps { +export interface SetupDeps { application: InternalApplicationSetup; http: HttpSetup; injectedMetadata: InjectedMetadataSetup; notifications: NotificationsSetup; } -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; http: HttpStart; notifications: NotificationsStart; diff --git a/src/core/public/doc_links/doc_links_service.ts b/src/core/public/doc_links/doc_links_service.ts index 0acf4524ab14..d73a663a64b3 100644 --- a/src/core/public/doc_links/doc_links_service.ts +++ b/src/core/public/doc_links/doc_links_service.ts @@ -32,7 +32,7 @@ import { deepFreeze } from '@osd/std'; import { parse } from 'semver'; import { InjectedMetadataSetup } from '../injected_metadata'; -interface StartDeps { +export interface StartDeps { injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/public/fatal_errors/fatal_errors_service.tsx b/src/core/public/fatal_errors/fatal_errors_service.tsx index 59a23171ed17..73159ff20e4d 100644 --- a/src/core/public/fatal_errors/fatal_errors_service.tsx +++ b/src/core/public/fatal_errors/fatal_errors_service.tsx @@ -38,7 +38,7 @@ import { InjectedMetadataSetup } from '../injected_metadata'; import { FatalErrorsScreen } from './fatal_errors_screen'; import { FatalErrorInfo, getErrorInfo } from './get_error_info'; -interface Deps { +export interface Deps { i18n: I18nStart; injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/public/http/fetch.ts b/src/core/public/http/fetch.ts index 767d58643003..3dc89c63cb39 100644 --- a/src/core/public/http/fetch.ts +++ b/src/core/public/http/fetch.ts @@ -212,6 +212,8 @@ export class Fetch { } private shorthand(method: string): HttpHandler { + // ToDo: find why 'TResponseBody' of HttpHandler is not assignable to type 'HttpResponse' + // @ts-expect-error return (pathOrOptions: string | HttpFetchOptionsWithPath, options?: HttpFetchOptions) => { const optionsWithPath = validateFetchArguments(pathOrOptions, options); return this.fetch({ ...optionsWithPath, method }); diff --git a/src/core/public/injected_metadata/injected_metadata_service.ts b/src/core/public/injected_metadata/injected_metadata_service.ts index f4c6a7f7b91a..6be782c3673c 100644 --- a/src/core/public/injected_metadata/injected_metadata_service.ts +++ b/src/core/public/injected_metadata/injected_metadata_service.ts @@ -88,11 +88,13 @@ export interface InjectedMetadataParams { * @internal */ export class InjectedMetadataService { - private state = deepFreeze( - this.params.injectedMetadata - ) as InjectedMetadataParams['injectedMetadata']; + private state: InjectedMetadataParams['injectedMetadata']; - constructor(private readonly params: InjectedMetadataParams) {} + constructor(private readonly params: InjectedMetadataParams) { + this.state = deepFreeze( + this.params.injectedMetadata + ) as InjectedMetadataParams['injectedMetadata']; + } public start(): InjectedMetadataStart { return this.setup(); diff --git a/src/core/public/integrations/integrations_service.ts b/src/core/public/integrations/integrations_service.ts index df92f0b76d95..4c133eff82ba 100644 --- a/src/core/public/integrations/integrations_service.ts +++ b/src/core/public/integrations/integrations_service.ts @@ -34,7 +34,7 @@ import { CoreService } from '../../types'; import { MomentService } from './moment'; import { StylesService } from './styles'; -interface Deps { +export interface Deps { uiSettings: IUiSettingsClient; } diff --git a/src/core/public/notifications/notifications_service.ts b/src/core/public/notifications/notifications_service.ts index fcdf746f2ae6..3f3d2bdf3ac2 100644 --- a/src/core/public/notifications/notifications_service.ts +++ b/src/core/public/notifications/notifications_service.ts @@ -36,11 +36,11 @@ import { ToastsService, ToastsSetup, ToastsStart } from './toasts'; import { IUiSettingsClient } from '../ui_settings'; import { OverlayStart } from '../overlays'; -interface SetupDeps { +export interface SetupDeps { uiSettings: IUiSettingsClient; } -interface StartDeps { +export interface StartDeps { i18n: I18nStart; overlays: OverlayStart; targetDomElement: HTMLElement; diff --git a/src/core/public/rendering/rendering_service.tsx b/src/core/public/rendering/rendering_service.tsx index ffb147bc39fc..83168bb745e5 100644 --- a/src/core/public/rendering/rendering_service.tsx +++ b/src/core/public/rendering/rendering_service.tsx @@ -37,7 +37,7 @@ import { InternalApplicationStart } from '../application'; import { OverlayStart } from '../overlays'; import { AppWrapper, AppContainer } from './app_containers'; -interface StartDeps { +export interface StartDeps { application: InternalApplicationStart; chrome: InternalChromeStart; overlays: OverlayStart; diff --git a/src/core/public/ui_settings/ui_settings_api.ts b/src/core/public/ui_settings/ui_settings_api.ts index d8a68ac035a2..62e06cf571c4 100644 --- a/src/core/public/ui_settings/ui_settings_api.ts +++ b/src/core/public/ui_settings/ui_settings_api.ts @@ -66,7 +66,7 @@ export class UiSettingsApi { * before sending the next request */ public batchSet(key: string, value: any) { - return new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { const prev = this.pendingChanges || NOOP_CHANGES; this.pendingChanges = { diff --git a/src/core/public/ui_settings/ui_settings_client.ts b/src/core/public/ui_settings/ui_settings_client.ts index d2015468befa..a234551c4bf5 100644 --- a/src/core/public/ui_settings/ui_settings_client.ts +++ b/src/core/public/ui_settings/ui_settings_client.ts @@ -198,7 +198,7 @@ You can use \`IUiSettingsClient.get("${key}", defaultValue)\`, which will just r this.setLocally(key, newVal); try { - const { settings } = await this.api.batchSet(key, newVal); + const { settings } = (await this.api.batchSet(key, newVal)) || {}; this.cache = defaultsDeep({}, defaults, settings); this.saved$.next({ key, newValue: newVal, oldValue: initialVal }); return true; diff --git a/src/core/public/ui_settings/ui_settings_service.ts b/src/core/public/ui_settings/ui_settings_service.ts index 9c677ff1c990..10c6b9ed784a 100644 --- a/src/core/public/ui_settings/ui_settings_service.ts +++ b/src/core/public/ui_settings/ui_settings_service.ts @@ -37,7 +37,7 @@ import { UiSettingsApi } from './ui_settings_api'; import { UiSettingsClient } from './ui_settings_client'; import { IUiSettingsClient } from './types'; -interface UiSettingsServiceDeps { +export interface UiSettingsServiceDeps { http: HttpSetup; injectedMetadata: InjectedMetadataSetup; } diff --git a/src/core/server/context/context_service.ts b/src/core/server/context/context_service.ts index fd8ede37a832..2ec1234b754a 100644 --- a/src/core/server/context/context_service.ts +++ b/src/core/server/context/context_service.ts @@ -32,7 +32,7 @@ import { PluginOpaqueId } from '../../server'; import { IContextContainer, ContextContainer, HandlerFunction } from '../../utils/context'; import { CoreContext } from '../core_context'; -interface SetupDeps { +export interface SetupDeps { pluginDependencies: ReadonlyMap; } diff --git a/src/core/server/http/http_service.ts b/src/core/server/http/http_service.ts index 8627557c7332..ed1da8754721 100644 --- a/src/core/server/http/http_service.ts +++ b/src/core/server/http/http_service.ts @@ -56,7 +56,7 @@ import { import { RequestHandlerContext } from '../../server'; import { registerCoreHandlers } from './lifecycle_handlers'; -interface SetupDeps { +export interface SetupDeps { context: ContextSetup; } diff --git a/src/core/server/http/router/response_adapter.ts b/src/core/server/http/router/response_adapter.ts index 08dcaf1e9c60..f61d1f93c301 100644 --- a/src/core/server/http/router/response_adapter.ts +++ b/src/core/server/http/router/response_adapter.ts @@ -117,7 +117,9 @@ export class HapiResponseAdapter { private toRedirect( opensearchDashboardsResponse: OpenSearchDashboardsResponse ) { - const { headers } = opensearchDashboardsResponse.options; + const { + headers, + }: { headers?: Record } = opensearchDashboardsResponse.options; if (!headers || typeof headers.location !== 'string') { throw new Error("expected 'location' header to be set"); } diff --git a/src/core/server/logging/appenders/file/file_appender.ts b/src/core/server/logging/appenders/file/file_appender.ts index 87959641e9fb..9d00d26fe654 100644 --- a/src/core/server/logging/appenders/file/file_appender.ts +++ b/src/core/server/logging/appenders/file/file_appender.ts @@ -82,7 +82,7 @@ export class FileAppender implements DisposableAppender { * Disposes `FileAppender`. Waits for the underlying file stream to be completely flushed and closed. */ public async dispose() { - await new Promise((resolve) => { + await new Promise((resolve) => { if (this.outputStream === undefined) { return resolve(); } diff --git a/src/core/server/logging/logging_service.ts b/src/core/server/logging/logging_service.ts index 7459d4b1790c..80a67f1265f8 100644 --- a/src/core/server/logging/logging_service.ts +++ b/src/core/server/logging/logging_service.ts @@ -68,7 +68,7 @@ export interface InternalLoggingServiceSetup { configure(contextParts: string[], config$: Observable): void; } -interface SetupDeps { +export interface SetupDeps { loggingSystem: ILoggingSystem; } diff --git a/src/core/server/metrics/metrics_service.ts b/src/core/server/metrics/metrics_service.ts index 62e1c9706309..4181d40e4bce 100644 --- a/src/core/server/metrics/metrics_service.ts +++ b/src/core/server/metrics/metrics_service.ts @@ -38,7 +38,7 @@ import { InternalMetricsServiceSetup, InternalMetricsServiceStart, OpsMetrics } import { OpsMetricsCollector } from './ops_metrics_collector'; import { opsConfig, OpsConfigType } from './ops_config'; -interface MetricsServiceSetupDeps { +export interface MetricsServiceSetupDeps { http: InternalHttpServiceSetup; } diff --git a/src/core/server/opensearch/client/cluster_client.test.ts b/src/core/server/opensearch/client/cluster_client.test.ts index 046939072710..c188426e8517 100644 --- a/src/core/server/opensearch/client/cluster_client.test.ts +++ b/src/core/server/opensearch/client/cluster_client.test.ts @@ -530,7 +530,7 @@ describe('ClusterClient', () => { let closeScopedClientWithLongNumeralsSupport: () => void; internalClient.close.mockReturnValue( - new Promise((resolve) => { + new Promise((resolve) => { closeInternalClient = resolve; }).then(() => { expect(clusterClientClosed).toBe(false); @@ -538,7 +538,7 @@ describe('ClusterClient', () => { }) ); scopedClient.close.mockReturnValue( - new Promise((resolve) => { + new Promise((resolve) => { closeScopedClient = resolve; }).then(() => { expect(clusterClientClosed).toBe(false); @@ -546,7 +546,7 @@ describe('ClusterClient', () => { }) ); internalClientWithLongNumeralsSupport.close.mockReturnValue( - new Promise((resolve) => { + new Promise((resolve) => { closeInternalClientWithLongNumeralsSupport = resolve; }).then(() => { expect(clusterClientClosed).toBe(false); @@ -554,7 +554,7 @@ describe('ClusterClient', () => { }) ); scopedClientWithLongNumeralsSupport.close.mockReturnValue( - new Promise((resolve) => { + new Promise((resolve) => { closeScopedClientWithLongNumeralsSupport = resolve; }).then(() => { expect(clusterClientClosed).toBe(false); diff --git a/src/core/server/opensearch/opensearch_service.ts b/src/core/server/opensearch/opensearch_service.ts index bab3e7ede9f3..6881ce06a0d5 100644 --- a/src/core/server/opensearch/opensearch_service.ts +++ b/src/core/server/opensearch/opensearch_service.ts @@ -48,11 +48,11 @@ import { InternalOpenSearchServiceSetup, InternalOpenSearchServiceStart } from ' import { pollOpenSearchNodesVersion } from './version_check/ensure_opensearch_version'; import { calculateStatus$ } from './status'; -interface SetupDeps { +export interface SetupDeps { http: InternalHttpServiceSetup; } -interface StartDeps { +export interface StartDeps { auditTrail: AuditTrailStart; } diff --git a/src/core/server/status/status_service.ts b/src/core/server/status/status_service.ts index 10547e510fa6..d243aa4f5045 100644 --- a/src/core/server/status/status_service.ts +++ b/src/core/server/status/status_service.ts @@ -48,7 +48,7 @@ import { ServiceStatus, CoreStatus, InternalStatusServiceSetup } from './types'; import { getSummaryStatus } from './get_summary_status'; import { PluginsStatusService } from './plugins_status'; -interface SetupDeps { +export interface SetupDeps { opensearch: Pick; environment: InternalEnvironmentServiceSetup; pluginDependencies: ReadonlyMap; diff --git a/src/plugins/opensearch_dashboards_utils/common/of.test.ts b/src/plugins/opensearch_dashboards_utils/common/of.test.ts index 499f831042e4..66280559d9b0 100644 --- a/src/plugins/opensearch_dashboards_utils/common/of.test.ts +++ b/src/plugins/opensearch_dashboards_utils/common/of.test.ts @@ -32,7 +32,7 @@ import { of } from './of'; describe('of()', () => { describe('when promise resolves', () => { - const promise = new Promise((resolve) => resolve()).then(() => 123); + const promise = new Promise((resolve) => resolve()).then(() => 123); test('first member of 3-tuple is the promise value', async () => { const [result] = await of(promise); @@ -51,7 +51,7 @@ describe('of()', () => { }); describe('when promise rejects', () => { - const promise = new Promise((resolve) => resolve()).then(() => { + const promise = new Promise((resolve) => resolve()).then(() => { // eslint-disable-next-line no-throw-literal throw 123; }); diff --git a/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json b/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json index ac1c773e617d..24cbf4d37ac7 100644 --- a/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json +++ b/test/interpreter_functional/plugins/osd_tp_run_pipeline/package.json @@ -16,6 +16,6 @@ "@osd/plugin-helpers": "1.0.0", "react": "^16.14.0", "react-dom": "^16.12.0", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/app_link_test/package.json b/test/plugin_functional/plugins/app_link_test/package.json index c8be073d8c3c..ea2d96f1d5b2 100644 --- a/test/plugin_functional/plugins/app_link_test/package.json +++ b/test/plugin_functional/plugins/app_link_test/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_app_status/package.json b/test/plugin_functional/plugins/core_app_status/package.json index 95b0daea15c4..c3434e67856b 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_a/package.json b/test/plugin_functional/plugins/core_plugin_a/package.json index 2f831305b1e1..01b15760965c 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_appleave/package.json b/test/plugin_functional/plugins/core_plugin_appleave/package.json index 19a7cd5d3494..0955d9b8228d 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_b/package.json b/test/plugin_functional/plugins/core_plugin_b/package.json index 12f9699d0a05..063b71fa30a6 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_chromeless/package.json b/test/plugin_functional/plugins/core_plugin_chromeless/package.json index 3eb544b8d0c3..a07ffd1bd982 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json b/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json index d1991597424f..72e686e9fae4 100644 --- a/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json +++ b/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_plugin_static_assets/package.json b/test/plugin_functional/plugins/core_plugin_static_assets/package.json index 72b66daa5682..87ef8169fec6 100644 --- a/test/plugin_functional/plugins/core_plugin_static_assets/package.json +++ b/test/plugin_functional/plugins/core_plugin_static_assets/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/core_provider_plugin/package.json b/test/plugin_functional/plugins/core_provider_plugin/package.json index 7e1ebbf6a0da..8b1d0c8ccc4f 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/dashboard_listing_test_plugin/package.json b/test/plugin_functional/plugins/dashboard_listing_test_plugin/package.json index 0b593604a2ad..f0e094b06207 100644 --- a/test/plugin_functional/plugins/dashboard_listing_test_plugin/package.json +++ b/test/plugin_functional/plugins/dashboard_listing_test_plugin/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/data_search/package.json b/test/plugin_functional/plugins/data_search/package.json index fd29f04b17df..4310d5caacd7 100644 --- a/test/plugin_functional/plugins/data_search/package.json +++ b/test/plugin_functional/plugins/data_search/package.json @@ -10,6 +10,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/doc_views_links_plugin/package.json b/test/plugin_functional/plugins/doc_views_links_plugin/package.json index fdd7e77e30b8..97676f626f73 100644 --- a/test/plugin_functional/plugins/doc_views_links_plugin/package.json +++ b/test/plugin_functional/plugins/doc_views_links_plugin/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/doc_views_plugin/package.json b/test/plugin_functional/plugins/doc_views_plugin/package.json index 27cc089d2398..8b63074fc453 100644 --- a/test/plugin_functional/plugins/doc_views_plugin/package.json +++ b/test/plugin_functional/plugins/doc_views_plugin/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/index_patterns/package.json b/test/plugin_functional/plugins/index_patterns/package.json index b5d5bb239645..c280a15227e5 100644 --- a/test/plugin_functional/plugins/index_patterns/package.json +++ b/test/plugin_functional/plugins/index_patterns/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/management_test_plugin/package.json b/test/plugin_functional/plugins/management_test_plugin/package.json index ab3107b24b93..b5d127ace4b7 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": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/opensearch_client_plugin/package.json b/test/plugin_functional/plugins/opensearch_client_plugin/package.json index 0770ca4334c7..b8625f000e02 100644 --- a/test/plugin_functional/plugins/opensearch_client_plugin/package.json +++ b/test/plugin_functional/plugins/opensearch_client_plugin/package.json @@ -10,6 +10,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/osd_sample_panel_action/package.json b/test/plugin_functional/plugins/osd_sample_panel_action/package.json index 36101d4524f8..6497593e2dc2 100644 --- a/test/plugin_functional/plugins/osd_sample_panel_action/package.json +++ b/test/plugin_functional/plugins/osd_sample_panel_action/package.json @@ -14,6 +14,6 @@ "devDependencies": { "@elastic/eui": "npm:@opensearch-project/oui@1.3.0", "react": "^16.14.0", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/osd_top_nav/package.json b/test/plugin_functional/plugins/osd_top_nav/package.json index bceb4a94defd..3ecc8ab3856d 100644 --- a/test/plugin_functional/plugins/osd_top_nav/package.json +++ b/test/plugin_functional/plugins/osd_top_nav/package.json @@ -12,7 +12,7 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json b/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json index b1592d36ee3f..1d2731c4751c 100644 --- a/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json +++ b/test/plugin_functional/plugins/osd_tp_custom_visualizations/package.json @@ -15,6 +15,6 @@ "@elastic/eui": "npm:@opensearch-project/oui@1.3.0", "@osd/plugin-helpers": "1.0.0", "react": "^16.14.0", - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/rendering_plugin/package.json b/test/plugin_functional/plugins/rendering_plugin/package.json index f9a3a284bc41..b14ec75fe8b4 100644 --- a/test/plugin_functional/plugins/rendering_plugin/package.json +++ b/test/plugin_functional/plugins/rendering_plugin/package.json @@ -12,6 +12,6 @@ "build": "../../../../scripts/use_node ../../../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/test/plugin_functional/plugins/ui_settings_plugin/package.json b/test/plugin_functional/plugins/ui_settings_plugin/package.json index c290ee995d13..6d5d75b421ce 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": "../../../../scripts/use_node ../../scripts/remove.js './target' && tsc" }, "devDependencies": { - "typescript": "4.0.2" + "typescript": "4.6.4" } } diff --git a/tsconfig.base.json b/tsconfig.base.json index 5d4321fac3b0..981ed82dd77a 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -50,6 +50,7 @@ "downlevelIteration": true, // import tslib helpers rather than inlining helpers for iteration or spreading, for instance "importHelpers": true, + "useUnknownInCatchVariables": false, // adding global typings "types": [ "node", diff --git a/yarn.lock b/yarn.lock index ffbb66b6c21f..c8a44903bdf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5109,15 +5109,7 @@ axe-core@^4.0.2, axe-core@^4.3.5: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.1.tgz#7dbdc25989298f9ad006645cd396782443757413" integrity sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw== -axios@^0.27.2: - version "0.27.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972" - integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ== - dependencies: - follow-redirects "^1.14.9" - form-data "^4.0.0" - -axios@^1.6.0: +axios@^1.6.0, axios@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/axios/-/axios-1.6.1.tgz#76550d644bf0a2d469a01f9244db6753208397d7" integrity sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g== @@ -9109,7 +9101,7 @@ focus-lock@^0.10.2: dependencies: tslib "^2.0.3" -follow-redirects@^1.14.9, follow-redirects@^1.15.0: +follow-redirects@^1.15.0: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -17971,10 +17963,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@4.0.2, typescript@~4.5.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2" - integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== +typescript@4.6.4, typescript@~4.5.2: + version "4.6.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" + integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.6"