diff --git a/.ci/Dockerfile b/.ci/Dockerfile index fb292e09c3ccb..3165805fe68c1 100644 --- a/.ci/Dockerfile +++ b/.ci/Dockerfile @@ -1,7 +1,7 @@ # NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable. # If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts -ARG NODE_VERSION=16.20.1 +ARG NODE_VERSION=18.17.0 FROM node:${NODE_VERSION} AS base diff --git a/.node-version b/.node-version index 47979412e93f2..603606bc91118 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -16.20.1 +18.17.0 diff --git a/.nvmrc b/.nvmrc index 47979412e93f2..603606bc91118 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.20.1 +18.17.0 diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index e7e94a3907234..9bc492c61e07e 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -27,13 +27,13 @@ check_rules_nodejs_version(minimum_version_string = "3.8.0") # we can update that rule. node_repositories( node_repositories = { - "16.20.1-darwin_amd64": ("node-v16.20.1-darwin-x64.tar.gz", "node-v16.20.1-darwin-x64", "d1f9c2a7c3a0fe09860f701af5fb8ff9ac72d72faa7ebabfeb5794503e79f955"), - "16.20.1-darwin_arm64": ("node-v16.20.1-darwin-arm64.tar.gz", "node-v16.20.1-darwin-arm64", "5f6b31c5a75567d382ba67220f3d7a2d9bb0c03d8af9307cd35a9cb32a6fde9d"), - "16.20.1-linux_arm64": ("node-v16.20.1-linux-arm64.tar.xz", "node-v16.20.1-linux-arm64", "7fce19f3d1c2952599a0b47f9f5d8f497265ad577f37f256a8c6a03be6353234"), - "16.20.1-linux_amd64": ("node-v16.20.1-linux-x64.tar.xz", "node-v16.20.1-linux-x64", "b6c60e1e106ad7d8881e83945a5208c1b1d1b63e6901c04b9dafa607aff3a154"), - "16.20.1-windows_amd64": ("node-v16.20.1-win-x64.zip", "node-v16.20.1-win-x64", "2a7fde996c57a969f0498742f99385a520eb14aac864e0eff9c32e3f3633ff0a"), + "18.17.0-darwin_amd64": ("node-v18.17.0-darwin-x64.tar.gz", "node-v18.17.0-darwin-x64", "2f381442381f7fbde2ca644c3275bec9c9c2a8d361f467b40e39428acdd6ccff"), + "18.17.0-darwin_arm64": ("node-v18.17.0-darwin-arm64.tar.gz", "node-v18.17.0-darwin-arm64", "19731ef427e77ad9c5f476eb62bfb02a7f179d3012feed0bbded62e45f23e679"), + "18.17.0-linux_arm64": ("node-v18.17.0-linux-arm64.tar.xz", "node-v18.17.0-linux-arm64", "fbd2904178ee47da6e0386bc9704a12b1f613da6ad194878a517d4a69ba56544"), + "18.17.0-linux_amd64": ("node-v18.17.0-linux-x64.tar.xz", "node-v18.17.0-linux-x64", "f36facda28c4d5ce76b3a1b4344e688d29d9254943a47f2f1909b1a10acb1959"), + "18.17.0-windows_amd64": ("node-v18.17.0-win-x64.zip", "node-v18.17.0-win-x64", "06e30b4e70b18d794651ef132c39080e5eaaa1187f938721d57edae2824f4e96"), }, - node_version = "16.20.1", + node_version = "18.17.0", node_urls = [ "https://nodejs.org/dist/v{version}/{filename}", ], diff --git a/docs/user/setup.asciidoc b/docs/user/setup.asciidoc index 7da0a969b53e8..acafb0eb24a5d 100644 --- a/docs/user/setup.asciidoc +++ b/docs/user/setup.asciidoc @@ -21,6 +21,10 @@ Windows. Since Kibana runs on Node.js, we include the necessary Node.js binaries for these platforms. Running Kibana against a separately maintained version of Node.js is not supported. +To support certain older Linux platforms (most notably CentOS7/RHEL7), {kib} +for Linux ships with a custom build of Node.js with glibc 2.17 support. For +details, see <>. + [float] [[elasticsearch-version]] == Elasticsearch version diff --git a/package.json b/package.json index fffae68db7d38..e3431f048c9b0 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "makelogs": "node scripts/makelogs", "spec_to_console": "node scripts/spec_to_console", "start": "node scripts/kibana --dev", - "storybook": "node scripts/storybook", + "storybook": "node --openssl-legacy-provider scripts/storybook", "test:ftr": "node scripts/functional_tests", "test:ftr:runner": "node scripts/functional_test_runner", "test:ftr:server": "node scripts/functional_tests_server", @@ -66,7 +66,7 @@ "url": "https://github.com/elastic/kibana.git" }, "engines": { - "node": "16.20.1", + "node": "18.17.0", "yarn": "^1.21.1" }, "resolutions": { @@ -76,7 +76,8 @@ "**/@babel/traverse": "^7.21.2", "**/@babel/types": "^7.21.2", "**/@types/babel__generator/@babel/types": "^7.21.0", - "**/@types/node": "16.11.7", + "**/@types/node": "18.17.1", + "**/@types/react": "^16.14.25", "**/@types/react-dom": "^16.9.8", "**/chokidar": "^3.4.3", "**/globule/minimatch": "^3.1.2", @@ -187,8 +188,6 @@ "@turf/length": "^6.0.2", "@types/react-is": "^16.7.2", "JSONStream": "1.3.5", - "abort-controller": "^3.0.0", - "abortcontroller-polyfill": "^1.7.3", "antlr4ts": "^0.5.0-alpha.3", "archiver": "^5.2.0", "axios": "^0.27.2", @@ -529,7 +528,7 @@ "@types/ejs": "^3.0.6", "@types/elastic__datemath": "link:bazel-bin/packages/elastic-datemath/npm_module_types", "@types/elasticsearch": "^5.0.33", - "@types/enzyme": "^3.10.8", + "@types/enzyme": "^3.10.12", "@types/eslint": "^7.28.0", "@types/express": "^4.17.13", "@types/extract-zip": "^1.6.2", @@ -581,8 +580,8 @@ "@types/mustache": "^0.8.31", "@types/ncp": "^2.0.1", "@types/nock": "^10.0.3", - "@types/node": "16.11.7", - "@types/node-fetch": "^2.6.0", + "@types/node": "18.17.1", + "@types/node-fetch": "2.6.4", "@types/node-forge": "^1.3.1", "@types/nodemailer": "^6.4.0", "@types/normalize-path": "^3.0.0", diff --git a/packages/kbn-es/BUILD.bazel b/packages/kbn-es/BUILD.bazel index 91dc48cec7d0c..83c02b08f628c 100644 --- a/packages/kbn-es/BUILD.bazel +++ b/packages/kbn-es/BUILD.bazel @@ -29,7 +29,6 @@ NPM_MODULE_EXTRA_FILES = [ RUNTIME_DEPS = [ "@npm//@elastic/elasticsearch", - "@npm//abort-controller", "@npm//chalk", "@npm//dedent", "@npm//del", diff --git a/packages/kbn-es/src/artifact.ts b/packages/kbn-es/src/artifact.ts index 9ec3b96801dda..946516f54e9ba 100644 --- a/packages/kbn-es/src/artifact.ts +++ b/packages/kbn-es/src/artifact.ts @@ -14,7 +14,6 @@ import { pipeline, Transform } from 'stream'; import { setTimeout } from 'timers/promises'; import fetch, { Headers } from 'node-fetch'; -import AbortController from 'abort-controller'; import chalk from 'chalk'; import { ToolingLog } from '@kbn/dev-utils'; diff --git a/packages/kbn-monaco/BUILD.bazel b/packages/kbn-monaco/BUILD.bazel index 24cc837a4e0b7..86d022aab8b60 100644 --- a/packages/kbn-monaco/BUILD.bazel +++ b/packages/kbn-monaco/BUILD.bazel @@ -71,10 +71,13 @@ webpack( "$(location webpack.config.js)", "--output-path", "$(@D)", - "--env", + "--env", "prod", "--stats=errors-only" ], + env = { + "NODE_OPTIONS": "--openssl-legacy-provider" + } ) ts_config( diff --git a/packages/kbn-optimizer/src/optimizer/observe_worker.ts b/packages/kbn-optimizer/src/optimizer/observe_worker.ts index 9f0ed9af556fb..a5d6379866242 100644 --- a/packages/kbn-optimizer/src/optimizer/observe_worker.ts +++ b/packages/kbn-optimizer/src/optimizer/observe_worker.ts @@ -71,6 +71,7 @@ function usingWorkerProc( nodeOptions: [ '--preserve-symlinks', '--preserve-symlinks-main', + '--openssl-legacy-provider', ...(inspectFlag && config.inspectWorkers ? [`${inspectFlag}=${inspectPortCounter++}`] : []), diff --git a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts index 2d7664aa13326..9e904839dfdf4 100644 --- a/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts +++ b/packages/kbn-plugin-helpers/src/integration_tests/build.test.ts @@ -39,6 +39,9 @@ it('builds a generated plugin into a viable archive', async () => { process.execPath, ['scripts/generate_plugin', '-y', '--name', 'fooTestPlugin'], { + env: { + NODE_OPTIONS: '--openssl-legacy-provider', + }, cwd: REPO_ROOT, all: true, } @@ -61,6 +64,9 @@ it('builds a generated plugin into a viable archive', async () => { process.execPath, ['../../scripts/plugin_helpers', 'build', '--kibana-version', '7.5.0'], { + env: { + NODE_OPTIONS: '--openssl-legacy-provider', + }, cwd: PLUGIN_DIR, all: true, } diff --git a/packages/kbn-ui-shared-deps-npm/BUILD.bazel b/packages/kbn-ui-shared-deps-npm/BUILD.bazel index 16c0d51c79e7d..0b54b273936d3 100644 --- a/packages/kbn-ui-shared-deps-npm/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-npm/BUILD.bazel @@ -34,7 +34,6 @@ RUNTIME_DEPS = [ "@npm//@elastic/eui", "@npm//@elastic/numeral", "@npm//@emotion/react", - "@npm//abortcontroller-polyfill", "@npm//babel-loader", "@npm//babel-plugin-transform-react-remove-prop-types", "@npm//core-js", @@ -72,7 +71,6 @@ TYPES_DEPS = [ "@npm//@elastic/eui", "@npm//@elastic/numeral", "@npm//@emotion/react", - "@npm//abortcontroller-polyfill", "@npm//babel-loader", "@npm//core-js", "@npm//css-loader", @@ -146,6 +144,9 @@ webpack( "$(@D)", "--stats=errors-only" ], + env = { + "NODE_OPTIONS": "--openssl-legacy-provider" + } ) js_library( diff --git a/packages/kbn-ui-shared-deps-src/BUILD.bazel b/packages/kbn-ui-shared-deps-src/BUILD.bazel index 774093b96bad6..36955d8d9a429 100644 --- a/packages/kbn-ui-shared-deps-src/BUILD.bazel +++ b/packages/kbn-ui-shared-deps-src/BUILD.bazel @@ -99,6 +99,9 @@ webpack( "$(@D)", "--stats=errors-only" ], + env = { + "NODE_OPTIONS": "--openssl-legacy-provider" + } ) js_library( diff --git a/src/core/public/apm_system.test.ts b/src/core/public/apm_system.test.ts index f62421cb55abc..7675388f88413 100644 --- a/src/core/public/apm_system.test.ts +++ b/src/core/public/apm_system.test.ts @@ -8,7 +8,7 @@ jest.mock('@elastic/apm-rum'); import type { DeeplyMockedKeys, MockedKeys } from '@kbn/utility-types/jest'; -import { init, apm } from '@elastic/apm-rum'; +import { init, apm, Transaction } from '@elastic/apm-rum'; import { ApmSystem } from './apm_system'; import { Subject } from 'rxjs'; import { InternalApplicationStart } from './application/types'; diff --git a/src/core/public/apm_system.ts b/src/core/public/apm_system.ts index f15a317f9f934..2231f394381f0 100644 --- a/src/core/public/apm_system.ts +++ b/src/core/public/apm_system.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import type { ApmBase, AgentConfigOptions } from '@elastic/apm-rum'; +import type { ApmBase, AgentConfigOptions, Transaction } from '@elastic/apm-rum'; import { modifyUrl } from '@kbn/std'; import { CachedResourceObserver } from './apm_resource_counter'; import type { InternalApplicationStart } from './application'; diff --git a/src/core/public/chrome/chrome_service.test.ts b/src/core/public/chrome/chrome_service.test.ts index 505f3fc7a23d2..12b98871d528f 100644 --- a/src/core/public/chrome/chrome_service.test.ts +++ b/src/core/public/chrome/chrome_service.test.ts @@ -32,11 +32,14 @@ class FakeApp implements App { const store = new Map(); const originalLocalStorage = window.localStorage; -(window as any).localStorage = { - setItem: (key: string, value: string) => store.set(String(key), String(value)), - getItem: (key: string) => store.get(String(key)), - removeItem: (key: string) => store.delete(String(key)), -}; +Object.defineProperty(window, 'localStorage', { + value: { + setItem: (key: string, value: string) => store.set(String(key), String(value)), + getItem: (key: string) => store.get(String(key)), + removeItem: (key: string) => store.delete(String(key)), + }, + writable: true, +}); function defaultStartDeps(availableApps?: App[]) { const deps = { 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 bcf58b7a40ab1..6354dd291fe84 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 @@ -44,7 +44,10 @@ describe('RecentlyAccessed#start()', () => { let originalLocalStorage: Storage; beforeAll(() => { originalLocalStorage = window.localStorage; - window.localStorage = new LocalStorageMock(); + Object.defineProperty(window, 'localStorage', { + value: new LocalStorageMock(), + writable: true, + }); }); beforeEach(() => localStorage.clear()); afterAll(() => (window.localStorage = originalLocalStorage)); diff --git a/src/dev/build/lib/download.ts b/src/dev/build/lib/download.ts index c67407095b37e..12805fd3d0eef 100644 --- a/src/dev/build/lib/download.ts +++ b/src/dev/build/lib/download.ts @@ -96,7 +96,7 @@ export async function downloadToDisk({ const downloadedSha = hash.digest('hex'); if (downloadedSha !== shaChecksum) { throw new Error( - `Downloaded checksum ${downloadedSha} does not match the expected ${shaAlgorithm} checksum.` + `Downloaded checksum ${downloadedSha} does not match the expected (${shaAlgorithm}) checksum ${shaChecksum}, for file: ${url}.` ); } } catch (_error) { diff --git a/src/dev/build/lib/integration_tests/download.test.ts b/src/dev/build/lib/integration_tests/download.test.ts index bbd9ea6974716..7678015df958c 100644 --- a/src/dev/build/lib/integration_tests/download.test.ts +++ b/src/dev/build/lib/integration_tests/download.test.ts @@ -117,7 +117,7 @@ describe('downloadToDisk', () => { shaAlgorithm: 'sha256', }); await expect(promise).rejects.toMatchInlineSnapshot( - `[Error: Downloaded checksum 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae does not match the expected sha256 checksum.]` + `[Error: Downloaded checksum ${FOO_SHA256} does not match the expected (sha256) checksum bar, for file: ${serverUrl}.]` ); try { @@ -175,7 +175,7 @@ describe('downloadToDisk', () => { " debg Deleting downloaded data at TMP_DIR/__tmp_download_js_test_file__", " info Retrying in 0.1 seconds", " debg [2/3] Attempting download of TEST_SERVER_URL sha256", - " debg Download failed: Downloaded checksum fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9 does not match the expected sha256 checksum.", + " debg Download failed: Downloaded checksum fcde2b2edba56bf408601fb721fe9b5c338d10ee429ea04fae5511b68fbf8fb9 does not match the expected (sha256) checksum 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae, for file: TEST_SERVER_URL.", " debg Deleting downloaded data at TMP_DIR/__tmp_download_js_test_file__", " info Retrying in 0.2 seconds", " debg [3/3] Attempting download of TEST_SERVER_URL sha256", diff --git a/src/dev/build/tasks/patch_native_modules_task.ts b/src/dev/build/tasks/patch_native_modules_task.ts index be7fa5b50a074..d2f0d2d0000ba 100644 --- a/src/dev/build/tasks/patch_native_modules_task.ts +++ b/src/dev/build/tasks/patch_native_modules_task.ts @@ -41,40 +41,51 @@ interface Package { const packages: Package[] = [ { name: 're2', - version: '1.16.0', + version: '1.17.7', destinationPath: 'node_modules/re2/build/Release/re2.node', extractMethod: 'gunzip', archives: { - 'darwin-x64': { - url: 'https://github.com/uhop/node-re2/releases/download/1.16.0/darwin-x64-93.gz', - sha256: 'a267c6202d86d08170eb4a833acf81d83660ce33e8981fcd5b7f6e0310961d56', - }, 'linux-x64': { - url: 'https://github.com/uhop/node-re2/releases/download/1.16.0/linux-x64-93.gz', - sha256: 'e0ca5d6527fe7ec0fe98b6960c47b66a5bb2823c3bebb3bf4ed4d58eed3d23c5', + url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/linux-x64-108.gz', + sha256: 'e0b62ff7c415c95f57232f2726711c0fd71056c848538f095ba3fa1126ef5e31', }, - // ARM build is currently done manually as Github Actions used in upstream project + // ARM builds are currently done manually as Github Actions used in upstream project // do not natively support an ARM target. - // From a AWS Graviton instance: - // * checkout the node-re2 project, - // * install Node using the same minor used by Kibana - // * git submodule update --init --recursive to download re2 - // * npm install, which will also create a build - // * gzip -c build/Release/re2.node > linux-arm64-83.gz - // * upload to kibana-ci-proxy-cache bucket + // From an AWS Graviton instance running Ubuntu or a GCE T2A instance running Debian: + // * install build-essential package: `sudo apt-get update` + `sudo apt install build-essential` + // * install nvm and the node version used by the Kibana repository + // * `npm install re2@1.17.7` + // * re2 will build itself on install + // * `cp node_modules/re2/build/Release/re2.node linux-arm64-$(node -e "console.log(process.versions.modules)")` + // * `gzip linux-arm64-*` + // * capture the sha256 with: `shasum -a 256 linux-arm64-*` + // * upload the `linux-arm64-*.gz` artifact to the `yarn-prebuilt-artifacts` bucket in GCS using the correct version number 'linux-arm64': { - url: 'https://storage.googleapis.com/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.16.0/linux-arm64-93.gz', - sha256: '7a786e0b75985e5aafdefa9af55cad8e85e69a3326f16d8c63d21d6b5b3bff1b', + url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/linux-arm64-108.gz', + sha256: 'e2025ead87be9f1ec4a9d892d1cce69c573101762720d56f52b1d52ed7ae0fef', }, + + 'darwin-x64': { + url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/darwin-x64-108.gz', + sha256: '4ed378c5a7fe6134b717afe7642254aff1ed7a881cbcaa53a012ac3efab49f99', + }, + + // A similar process is necessary for building on ARM macs: + // * bootstrap and re2 will build itself on install + // * `cp node_modules/re2/build/Release/re2.node darwin-arm64-$(node -e "console.log(process.versions.modules)")` + // * `gzip darwin-arm64-*` + // * capture the sha256 with: `shasum -a 256 darwin-arm64-*` + // * upload the `darwin-arm64-*.gz` artifact to the `yarn-prebuilt-artifacts` bucket in GCS using the correct version number 'darwin-arm64': { - url: 'https://storage.googleapis.com/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.16.0/darwin-arm64-93.gz', - sha256: '28b540cdddf13578f1bd28a03e29ffdc26a7f00ec859c369987b8d51ec6357c8', + url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/darwin-arm64-108.gz', + sha256: '42afc32137ff5c5bebae5d68347a9786906748c2f28e06194d8950707f2ae90e', }, + 'win32-x64': { - url: 'https://github.com/uhop/node-re2/releases/download/1.16.0/win32-x64-93.gz', - sha256: '37245ceb59a086b5e7e9de8746a3cdf148c383be9ae2580f92baea90d0d39947', + url: 'https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/node-re2/uhop/node-re2/releases/download/1.17.7/win32-x64-108.gz', + sha256: 'ff72fe02de652262659c8e17e44a932f3c873362233756b40d1a97538d05de92', }, }, }, diff --git a/src/plugins/console/public/application/models/sense_editor/sense_editor.test.js b/src/plugins/console/public/application/models/sense_editor/sense_editor.test.js index d5b3283271744..2f58f178d20b2 100644 --- a/src/plugins/console/public/application/models/sense_editor/sense_editor.test.js +++ b/src/plugins/console/public/application/models/sense_editor/sense_editor.test.js @@ -31,6 +31,23 @@ describe('Editor', () => { input = create(document.querySelector('#ConAppEditor')); $(input.getCoreEditor().getContainer()).show(); input.autocomplete._test.removeChangeListener(); + oldUrl = global.URL; + olldWindow = { ...global.window }; + global.URL = URL; + Object.defineProperty(global, 'window', { + value: Object.create(window), + writable: true, + }); + Object.defineProperty(window, 'location', { + value: { + origin: 'http://localhost:5620', + }, + }); + storage = createStorage({ + engine: global.window.localStorage, + prefix: 'console_test', + }); + setStorage(storage); }); afterEach(function () { $(input.getCoreEditor().getContainer()).hide(); diff --git a/x-pack/plugins/actions/server/builtin_action_types/lib/request_oauth_client_credentials_token.test.ts b/x-pack/plugins/actions/server/builtin_action_types/lib/request_oauth_client_credentials_token.test.ts index 6e967500e8627..caab1637400e1 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/lib/request_oauth_client_credentials_token.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/lib/request_oauth_client_credentials_token.test.ts @@ -74,6 +74,7 @@ describe('requestOAuthClientCredentialsToken', () => { "maxSockets": Infinity, "maxTotalSockets": Infinity, "options": Object { + "noDelay": true, "path": null, "rejectUnauthorized": true, }, diff --git a/x-pack/plugins/actions/server/builtin_action_types/lib/send_email_graph_api.test.ts b/x-pack/plugins/actions/server/builtin_action_types/lib/send_email_graph_api.test.ts index a50dee8f1cbc2..3010bfd8f2900 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/lib/send_email_graph_api.test.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/lib/send_email_graph_api.test.ts @@ -90,6 +90,7 @@ describe('sendEmailGraphApi', () => { "maxSockets": Infinity, "maxTotalSockets": Infinity, "options": Object { + "noDelay": true, "path": null, "rejectUnauthorized": true, }, @@ -180,6 +181,7 @@ describe('sendEmailGraphApi', () => { "maxSockets": Infinity, "maxTotalSockets": Infinity, "options": Object { + "noDelay": true, "path": null, "rejectUnauthorized": true, }, @@ -269,6 +271,7 @@ describe('sendEmailGraphApi', () => { "maxSockets": Infinity, "maxTotalSockets": Infinity, "options": Object { + "noDelay": true, "path": null, "rejectUnauthorized": true, }, diff --git a/x-pack/plugins/canvas/scripts/shareable_runtime.js b/x-pack/plugins/canvas/scripts/shareable_runtime.js index 71d942bfe76d1..7f9439b966f49 100644 --- a/x-pack/plugins/canvas/scripts/shareable_runtime.js +++ b/x-pack/plugins/canvas/scripts/shareable_runtime.js @@ -54,6 +54,7 @@ run( 'yarn', [ 'webpack-dev-server', + '--openssl-legacy-provider', '--config', webpackConfig, ...(process.stdout.isTTY && !process.env.CI ? ['--progress'] : []), @@ -86,6 +87,7 @@ run( execa.sync( 'yarn', [ + '--openssl-legacy-provider', 'webpack', '--config', webpackConfig, diff --git a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts index 146b06e4d9a4c..4ed4c007cc0b0 100644 --- a/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts +++ b/x-pack/plugins/enterprise_search/server/lib/enterprise_search_config_api.ts @@ -5,7 +5,6 @@ * 2.0. */ -import AbortController from 'abort-controller'; import fetch from 'node-fetch'; import { kibanaPackageJson } from '@kbn/utils'; diff --git a/x-pack/plugins/lists/public/exceptions/api.test.ts b/x-pack/plugins/lists/public/exceptions/api.test.ts index 65c11bfc1dfd0..3dec077c9255f 100644 --- a/x-pack/plugins/lists/public/exceptions/api.test.ts +++ b/x-pack/plugins/lists/public/exceptions/api.test.ts @@ -743,7 +743,7 @@ describe('Exceptions Lists API', () => { stream: jest.fn(), text: jest.fn(), type: 'json', - } as Blob; + } as unknown as Blob; beforeEach(() => { httpMock.fetch.mockResolvedValue(blob); diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts index 793ca5402057d..b2cd21be6e3ce 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/rules/api.test.ts @@ -483,7 +483,7 @@ describe('Detections Rules API', () => { slice: jest.fn(), stream: jest.fn(), text: jest.fn(), - } as File; + } as unknown as File; const formData = new FormData(); formData.append('file', fileToImport); @@ -545,7 +545,7 @@ describe('Detections Rules API', () => { slice: jest.fn(), stream: jest.fn(), text: jest.fn(), - } as Blob; + } as unknown as Blob; beforeEach(() => { fetchMock.mockClear(); diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list.test.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list.test.tsx index 8932bc44031bd..08d93a8fa6858 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list.test.tsx +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/monitor_list.test.tsx @@ -140,7 +140,10 @@ describe('MonitorList component', () => { setItem: jest.fn(), }; - global.localStorage = localStorageMock; + Object.defineProperty(global, 'localStorage', { + value: localStorageMock, + writable: true, + }); }); it('renders a no items message when no data is provided', async () => { diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/use_monitor_histogram.test.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/use_monitor_histogram.test.tsx index bafed542b3691..cb889dac5b1ba 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/use_monitor_histogram.test.tsx +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/use_monitor_histogram.test.tsx @@ -17,7 +17,7 @@ describe('useMonitorHistogram', () => { jest .spyOn(reduxHooks, 'useSelector') .mockReturnValue({ settings: { heartbeatIndices: dynamicIndexPattern } }); - jest.spyOn(searchHooks, 'useEsSearch').mockImplementation(useEsSearch); + jest.spyOn(searchHooks as any, 'useEsSearch').mockImplementation(useEsSearch); beforeEach(() => { jest.clearAllMocks(); diff --git a/yarn.lock b/yarn.lock index 54f2d4357814f..fed28e6addee5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5761,10 +5761,10 @@ resolved "https://registry.yarnpkg.com/@types/elasticsearch/-/elasticsearch-5.0.33.tgz#b0fd37dc674f498223b6d68c313bdfd71f4d812b" integrity sha512-n/g9pqJEpE4fyUE8VvHNGtl7E2Wv8TCroNwfgAeJKRV4ghDENahtrAo1KMsFNIejBD2gDAlEUa4CM4oEEd8p9Q== -"@types/enzyme@^3.10.8": - version "3.10.8" - resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.8.tgz#ad7ac9d3af3de6fd0673773123fafbc63db50d42" - integrity sha512-vlOuzqsTHxog6PV79+tvOHFb6hq4QZKMq1lLD9MaWD1oec2lHTKndn76XOpSwCA0oFTaIbKVPrgM3k78Jjd16g== +"@types/enzyme@^3.10.12": + version "3.10.12" + resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.10.12.tgz#ac4494801b38188935580642f772ad18f72c132f" + integrity sha512-xryQlOEIe1TduDWAOphR0ihfebKFSWOXpIsk+70JskCfRfW+xALdnJ0r1ZOTo85F9Qsjk6vtlU7edTYHbls9tA== dependencies: "@types/cheerio" "*" "@types/react" "*" @@ -6349,7 +6349,15 @@ dependencies: "@types/node" "*" -"@types/node-fetch@^2.5.7", "@types/node-fetch@^2.6.0": +"@types/node-fetch@2.6.4": + version "2.6.4" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.4.tgz#1bc3a26de814f6bf466b25aeb1473fa1afe6a660" + integrity sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node-fetch@^2.5.7": version "2.6.2" resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.2.tgz#d1a9c5fd049d9415dce61571557104dec3ec81da" integrity sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A== @@ -6371,10 +6379,10 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@12.20.24", "@types/node@16.11.7", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^14.14.31": - version "16.11.7" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.7.tgz#36820945061326978c42a01e56b61cd223dfdc42" - integrity sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw== +"@types/node@*", "@types/node@12.20.24", "@types/node@18.17.1", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^10.1.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^14.14.31": + version "18.17.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.1.tgz#84c32903bf3a09f7878c391d31ff08f6fe7d8335" + integrity sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw== "@types/nodemailer@^6.4.0": version "6.4.0" @@ -7564,18 +7572,6 @@ abbrev@1: resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== -abort-controller@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" - integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== - dependencies: - event-target-shim "^5.0.0" - -abortcontroller-polyfill@^1.7.3: - version "1.7.3" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.3.tgz#1b5b487bd6436b5b764fd52a612509702c3144b5" - integrity sha512-zetDJxd89y3X99Kvo4qFx8GKlt6GsvN3UcRZHwU6iFA/0KiOmhkTVhe8oRoTBiTVPZu09x3vCra47+w8Yz1+2Q== - accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: version "1.3.8" resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e" @@ -13924,11 +13920,6 @@ event-emitter@^0.3.5, event-emitter@~0.3.5: d "1" es5-ext "~0.10.14" -event-target-shim@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" - integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== - eventemitter2@^6.4.3: version "6.4.3" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.3.tgz#35c563619b13f3681e7eb05cbdaf50f56ba58820"