diff --git a/.ci/Dockerfile b/.ci/Dockerfile index d6eee046611bb..9ac6c32772e4b 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=10.22.1 +ARG NODE_VERSION=12.19.0 FROM node:${NODE_VERSION} AS base diff --git a/.node-version b/.node-version index c2f6421352c48..260a0e20f68fe 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -10.22.1 +12.19.0 diff --git a/.nvmrc b/.nvmrc index c2f6421352c48..260a0e20f68fe 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -10.22.1 +12.19.0 diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 2f2c87ca9c7d4..efc7a1b930932 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -512,8 +512,8 @@ In addition to this setting, trusted certificates may be specified via <=10.17.17 <10.20.0", + "**/@types/node": "12.19.4", "**/cross-fetch/node-fetch": "^2.6.1", "**/deepmerge": "^4.2.2", "**/fast-deep-equal": "^3.1.1", @@ -97,7 +97,7 @@ "**/typescript": "4.0.2" }, "engines": { - "node": "10.22.1", + "node": "12.19.0", "yarn": "^1.21.1" }, "dependencies": { @@ -497,7 +497,7 @@ "@types/mustache": "^0.8.31", "@types/ncp": "^2.0.1", "@types/nock": "^10.0.3", - "@types/node": ">=10.17.17 <10.20.0", + "@types/node": "12.19.4", "@types/node-fetch": "^2.5.7", "@types/node-forge": "^0.9.5", "@types/nodemailer": "^6.2.1", @@ -560,7 +560,7 @@ "@types/vinyl-fs": "^2.4.11", "@types/watchpack": "^1.1.5", "@types/webpack": "^4.41.3", - "@types/webpack-env": "^1.15.2", + "@types/webpack-env": "^1.15.3", "@types/webpack-merge": "^4.1.5", "@types/write-pkg": "^3.1.0", "@types/xml-crypto": "^1.4.1", diff --git a/packages/kbn-config-schema/src/types/stream_type.test.ts b/packages/kbn-config-schema/src/types/stream_type.test.ts index 2e6f31ad09b34..91a75d01bde93 100644 --- a/packages/kbn-config-schema/src/types/stream_type.test.ts +++ b/packages/kbn-config-schema/src/types/stream_type.test.ts @@ -57,7 +57,13 @@ test('includes namespace in failure', () => { describe('#defaultValue', () => { test('returns default when undefined', () => { const value = new Stream(); - expect(schema.stream({ defaultValue: value }).validate(undefined)).toStrictEqual(value); + expect(schema.stream({ defaultValue: value }).validate(undefined)).toMatchInlineSnapshot(` + Stream { + "_events": Object {}, + "_eventsCount": 0, + "_maxListeners": undefined, + } + `); }); test('returns value when specified', () => { diff --git a/packages/kbn-dev-utils/src/proc_runner/proc.ts b/packages/kbn-dev-utils/src/proc_runner/proc.ts index bd2368defd7e0..f9483255eda87 100644 --- a/packages/kbn-dev-utils/src/proc_runner/proc.ts +++ b/packages/kbn-dev-utils/src/proc_runner/proc.ts @@ -91,9 +91,9 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) { }); if (stdin) { - childProcess.stdin.end(stdin, 'utf8'); + childProcess.stdin!.end(stdin, 'utf8'); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdin will not be null } else { - childProcess.stdin.end(); + childProcess.stdin!.end(); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdin will not be null } let stopCalled = false; @@ -123,8 +123,8 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) { ).pipe(share()); const lines$ = Rx.merge( - observeLines(childProcess.stdout), - observeLines(childProcess.stderr) + observeLines(childProcess.stdout!), // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + observeLines(childProcess.stderr!) // TypeScript note: As long as the proc stdio[1] is 'pipe', then stderr will not be null ).pipe( tap((line) => log.write(` ${chalk.gray('proc')} [${chalk.gray(name)}] ${line}`)), share() diff --git a/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log_text_writer.test.ts.snap b/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log_text_writer.test.ts.snap index 76c018fdb3661..f5d084da6a4e0 100644 --- a/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log_text_writer.test.ts.snap +++ b/packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log_text_writer.test.ts.snap @@ -2,8 +2,7 @@ exports[`formats %s patterns and indents multi-line messages correctly 1`] = ` " │ succ foo bar - │ { foo: { bar: { '1': [Array] } }, - │ bar: { bar: { '1': [Array] } } } + │ { foo: { bar: { '1': [Array] } }, bar: { bar: { '1': [Array] } } } │ │ Infinity " diff --git a/packages/kbn-es-archiver/src/actions/load.ts b/packages/kbn-es-archiver/src/actions/load.ts index efb1fe9f9ea54..c2f5f18a07e9b 100644 --- a/packages/kbn-es-archiver/src/actions/load.ts +++ b/packages/kbn-es-archiver/src/actions/load.ts @@ -43,7 +43,7 @@ import { // are not listened for const pipeline = (...streams: Readable[]) => streams.reduce((source, dest) => - source.once('error', (error) => dest.emit('error', error)).pipe(dest as any) + source.once('error', (error) => dest.destroy(error)).pipe(dest as any) ); export async function loadAction({ diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js index b742a770b70c8..878d645d9b4a7 100644 --- a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js +++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js @@ -44,7 +44,7 @@ describe('concatStreamProviders() helper', () => { () => new Readable({ read() { - this.emit('error', new Error('foo')); + this.destroy(new Error('foo')); }, }), ]); diff --git a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts index 4794d76cc7f84..be0768316b293 100644 --- a/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts +++ b/packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.ts @@ -50,7 +50,7 @@ export function concatStreamProviders( source // proxy errors from the source to the destination - .once('error', (error) => destination.emit('error', error)) + .once('error', (error) => destination.destroy(error)) // pipe the source to the destination but only proxy the // end event if this is the last source .pipe(destination, { end: isLast }); diff --git a/packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap b/packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap index 05b3fd17a6740..941d9fbf7d6a5 100644 --- a/packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap +++ b/packages/kbn-i18n/src/__snapshots__/loader.test.ts.snap @@ -2,4 +2,4 @@ exports[`I18n loader registerTranslationFile should throw error if path to translation file is not an absolute 1`] = `"Paths to translation files must be absolute. Got relative path: \\"./en.json\\""`; -exports[`I18n loader registerTranslationFile should throw error if path to translation file is not specified 1`] = `"The \\"path\\" argument must be of type string. Received type undefined"`; +exports[`I18n loader registerTranslationFile should throw error if path to translation file is not specified 1`] = `"The \\"path\\" argument must be of type string. Received undefined"`; diff --git a/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts b/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts index a89f84e5c543d..46660f0dd958b 100644 --- a/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts +++ b/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts @@ -261,7 +261,6 @@ const expectFileMatchesSnapshotWithCompression = (filePath: string, snapshotLabe // Verify the brotli variant matches expect( - // @ts-expect-error @types/node is missing the brotli functions Zlib.brotliDecompressSync( Fs.readFileSync(Path.resolve(MOCK_REPO_DIR, `${filePath}.br`)) ).toString() diff --git a/packages/kbn-optimizer/src/optimizer/get_mtimes.ts b/packages/kbn-optimizer/src/optimizer/get_mtimes.ts index b6c3678709880..71c83d6533984 100644 --- a/packages/kbn-optimizer/src/optimizer/get_mtimes.ts +++ b/packages/kbn-optimizer/src/optimizer/get_mtimes.ts @@ -23,7 +23,7 @@ import * as Rx from 'rxjs'; import { mergeMap, map, catchError } from 'rxjs/operators'; import { allValuesFrom } from '../common'; -const stat$ = Rx.bindNodeCallback(Fs.stat); +const stat$ = Rx.bindNodeCallback(Fs.stat); /** * get mtimes of referenced paths concurrently, limit concurrency to 100 diff --git a/packages/kbn-optimizer/src/optimizer/observe_worker.ts b/packages/kbn-optimizer/src/optimizer/observe_worker.ts index 31b34bd5c5938..6745de40fd66c 100644 --- a/packages/kbn-optimizer/src/optimizer/observe_worker.ts +++ b/packages/kbn-optimizer/src/optimizer/observe_worker.ts @@ -164,7 +164,8 @@ export function observeWorker( type: 'worker started', bundles, }), - observeStdio$(proc.stdout).pipe( + // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + observeStdio$(proc.stdout!).pipe( map( (line): WorkerStdio => ({ type: 'worker stdio', @@ -173,7 +174,8 @@ export function observeWorker( }) ) ), - observeStdio$(proc.stderr).pipe( + // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null + observeStdio$(proc.stderr!).pipe( map( (line): WorkerStdio => ({ type: 'worker stdio', diff --git a/packages/kbn-pm/dist/index.js b/packages/kbn-pm/dist/index.js index b7d9803059aa8..f0ac050b128ff 100644 --- a/packages/kbn-pm/dist/index.js +++ b/packages/kbn-pm/dist/index.js @@ -32273,8 +32273,10 @@ function spawnStreaming(command, args, opts, { mergeMultiline: true, tag: color.bold(prefix) }); - spawned.stdout.pipe(prefixedStdout).pipe(streamToLog(debug)); - spawned.stderr.pipe(prefixedStderr).pipe(streamToLog(debug)); + spawned.stdout.pipe(prefixedStdout).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + + spawned.stderr.pipe(prefixedStderr).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null + return spawned; } @@ -51377,7 +51379,8 @@ const WatchCommand = { await Object(_utils_parallelize__WEBPACK_IMPORTED_MODULE_2__["parallelizeBatches"])(batchedProjects, async pkg => { const completionHint = await Object(_utils_watch__WEBPACK_IMPORTED_MODULE_4__["waitUntilWatchIsReady"])(pkg.runScriptStreaming(watchScriptName, { debug: false - }).stdout); + }).stdout // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + ); _utils_log__WEBPACK_IMPORTED_MODULE_1__["log"].success(`[${pkg.name}] Initial build completed (${completionHint}).`); }); } diff --git a/packages/kbn-pm/src/commands/watch.ts b/packages/kbn-pm/src/commands/watch.ts index 6775f728c1494..7bd78ba4e5a7e 100644 --- a/packages/kbn-pm/src/commands/watch.ts +++ b/packages/kbn-pm/src/commands/watch.ts @@ -80,7 +80,7 @@ export const WatchCommand: ICommand = { const completionHint = await waitUntilWatchIsReady( pkg.runScriptStreaming(watchScriptName, { debug: false, - }).stdout + }).stdout! // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null ); log.success(`[${pkg.name}] Initial build completed (${completionHint}).`); diff --git a/packages/kbn-pm/src/utils/child_process.ts b/packages/kbn-pm/src/utils/child_process.ts index bafe2bf57adc2..2f761676d77fe 100644 --- a/packages/kbn-pm/src/utils/child_process.ts +++ b/packages/kbn-pm/src/utils/child_process.ts @@ -71,8 +71,8 @@ export function spawnStreaming( const prefixedStdout = logTransformer({ tag: color.bold(prefix) }); const prefixedStderr = logTransformer({ mergeMultiline: true, tag: color.bold(prefix) }); - spawned.stdout.pipe(prefixedStdout).pipe(streamToLog(debug)); - spawned.stderr.pipe(prefixedStderr).pipe(streamToLog(debug)); + spawned.stdout!.pipe(prefixedStdout).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + spawned.stderr!.pipe(prefixedStderr).pipe(streamToLog(debug)); // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null return spawned; } diff --git a/packages/kbn-test/src/functional_test_runner/lib/docker_servers/container_logs.ts b/packages/kbn-test/src/functional_test_runner/lib/docker_servers/container_logs.ts index f8e8137ce40a2..788037b49b142 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/docker_servers/container_logs.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/docker_servers/container_logs.ts @@ -35,8 +35,8 @@ export function observeContainerLogs(name: string, containerId: string, log: Too const logLine$ = new Rx.Subject(); Rx.merge( - observeLines(logsProc.stdout).pipe(tap((line) => log.info(`[docker:${name}] ${line}`))), - observeLines(logsProc.stderr).pipe(tap((line) => log.error(`[docker:${name}] ${line}`))) + observeLines(logsProc.stdout!).pipe(tap((line) => log.info(`[docker:${name}] ${line}`))), // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + observeLines(logsProc.stderr!).pipe(tap((line) => log.error(`[docker:${name}] ${line}`))) // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null ).subscribe(logLine$); return logLine$.asObservable(); diff --git a/packages/kbn-test/src/functional_test_runner/lib/lifecycle_phase.test.ts b/packages/kbn-test/src/functional_test_runner/lib/lifecycle_phase.test.ts index d17c5503c42f8..d133d0e498b49 100644 --- a/packages/kbn-test/src/functional_test_runner/lib/lifecycle_phase.test.ts +++ b/packages/kbn-test/src/functional_test_runner/lib/lifecycle_phase.test.ts @@ -59,11 +59,17 @@ describe('with randomness', () => { ); await phase.trigger(); + + // `phase.trigger()` uses `Math.random` to sort the internal array of + // handlers. But since the sorting algorithm used internally in + // `Array.prototype.sort` is not spec'ed, it can change between Node.js + // versions, and as a result the expected output below might not match if + // you up/downgrade Node.js. expect(order).toMatchInlineSnapshot(` Array [ - "one", "three", "two", + "one", ] `); }); diff --git a/packages/kbn-test/src/kbn/kbn_test_config.ts b/packages/kbn-test/src/kbn/kbn_test_config.ts index 909c94098cf5d..1753fa3885f47 100644 --- a/packages/kbn-test/src/kbn/kbn_test_config.ts +++ b/packages/kbn-test/src/kbn/kbn_test_config.ts @@ -39,9 +39,9 @@ export const kbnTestConfig = new (class KbnTestConfig { const testKibanaUrl = url.parse(process.env.TEST_KIBANA_URL); return { protocol: testKibanaUrl.protocol?.slice(0, -1), - hostname: testKibanaUrl.hostname, + hostname: testKibanaUrl.hostname === null ? undefined : testKibanaUrl.hostname, port: testKibanaUrl.port ? parseInt(testKibanaUrl.port, 10) : undefined, - auth: testKibanaUrl.auth, + auth: testKibanaUrl.auth === null ? undefined : testKibanaUrl.auth, username: testKibanaUrl.auth?.split(':')[0], password: testKibanaUrl.auth?.split(':')[1], }; diff --git a/src/cli/repl/__snapshots__/repl.test.js.snap b/src/cli/repl/__snapshots__/repl.test.js.snap index 7171e99dbcc0e..c7751b5797f49 100644 --- a/src/cli/repl/__snapshots__/repl.test.js.snap +++ b/src/cli/repl/__snapshots__/repl.test.js.snap @@ -5,8 +5,14 @@ exports[`repl it allows print depth to be specified 1`] = `"{ '0': {  exports[`repl it colorizes raw values 1`] = `"{ meaning: 42 }"`; exports[`repl it handles deep and recursive objects 1`] = ` -"{ '0': { '1': { '2': { '3': { '4': { '5': [Object] } } } } }, - whoops: [Circular] }" +"{ + '0': { + '1': { + '2': { '3': { '4': { '5': [Object] } } } + } + }, + whoops: [Circular] +}" `; exports[`repl it handles undefined 1`] = `"undefined"`; @@ -45,8 +51,14 @@ Array [ Array [ "Promise Rejected: ", - "{ '0': { '1': { '2': { '3': { '4': { '5': [Object] } } } } }, - whoops: [Circular] }", + "{ + '0': { + '1': { + '2': { '3': { '4': { '5': [Object] } } } + } + }, + whoops: [Circular] +}", ], ] `; @@ -59,8 +71,14 @@ Array [ Array [ "Promise Resolved: ", - "{ '0': { '1': { '2': { '3': { '4': { '5': [Object] } } } } }, - whoops: [Circular] }", + "{ + '0': { + '1': { + '2': { '3': { '4': { '5': [Object] } } } + } + }, + whoops: [Circular] +}", ], ] `; diff --git a/src/cli/serve/integration_tests/reload_logging_config.test.ts b/src/cli/serve/integration_tests/reload_logging_config.test.ts index 55f71ea2401db..0a2c90460430f 100644 --- a/src/cli/serve/integration_tests/reload_logging_config.test.ts +++ b/src/cli/serve/integration_tests/reload_logging_config.test.ts @@ -121,14 +121,15 @@ describe('Server logging configuration', function () { '--verbose', ]); - const message$ = Rx.fromEvent(child.stdout, 'data').pipe( + // TypeScript note: As long as the child stdio[1] is 'pipe', then stdout will not be null + const message$ = Rx.fromEvent(child.stdout!, 'data').pipe( map((messages) => String(messages).split('\n').filter(Boolean)) ); await message$ .pipe( // We know the sighup handler will be registered before this message logged - filter((messages) => messages.some((m) => m.includes('setting up root'))), + filter((messages: string[]) => messages.some((m) => m.includes('setting up root'))), take(1) ) .toPromise(); @@ -189,14 +190,15 @@ describe('Server logging configuration', function () { child = Child.spawn(process.execPath, [kibanaPath, '--oss', '--config', configFilePath]); - const message$ = Rx.fromEvent(child.stdout, 'data').pipe( + // TypeScript note: As long as the child stdio[1] is 'pipe', then stdout will not be null + const message$ = Rx.fromEvent(child.stdout!, 'data').pipe( map((messages) => String(messages).split('\n').filter(Boolean)) ); await message$ .pipe( // We know the sighup handler will be registered before this message logged - filter((messages) => messages.some((m) => m.includes('setting up root'))), + filter((messages: string[]) => messages.some((m) => m.includes('setting up root'))), take(1) ) .toPromise(); diff --git a/src/core/public/http/types.ts b/src/core/public/http/types.ts index b12cd1fe09a91..2361d981b8597 100644 --- a/src/core/public/http/types.ts +++ b/src/core/public/http/types.ts @@ -206,12 +206,19 @@ export interface HttpRequestInit { /** @public */ export interface HttpFetchQuery { - [key: string]: - | string - | number - | boolean - | undefined - | Array; + /** + * TypeScript note: Technically we should use this interface instead, but @types/node uses the below stricter + * definition, so to avoid TypeScript errors, we'll restrict our version. + * + * [key: string]: + * | string + * | number + * | boolean + * | Array + * | undefined + * | null; + */ + [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null; } /** diff --git a/src/core/public/public.api.md b/src/core/public/public.api.md index c8add5a8ddf58..28a20845426d9 100644 --- a/src/core/public/public.api.md +++ b/src/core/public/public.api.md @@ -625,8 +625,7 @@ export interface HttpFetchOptionsWithPath extends HttpFetchOptions { // @public (undocumented) export interface HttpFetchQuery { - // (undocumented) - [key: string]: string | number | boolean | undefined | Array; + [key: string]: string | number | boolean | string[] | number[] | boolean[] | undefined | null; } // @public diff --git a/src/core/public/utils/crypto/sha256.ts b/src/core/public/utils/crypto/sha256.ts index 1617c8ca8d265..eaa057d604689 100644 --- a/src/core/public/utils/crypto/sha256.ts +++ b/src/core/public/utils/crypto/sha256.ts @@ -118,6 +118,18 @@ const K = [ const W = new Array(64); +type BufferEncoding = + | 'ascii' + | 'utf8' + | 'utf-8' + | 'utf16le' + | 'ucs2' + | 'ucs-2' + | 'base64' + | 'latin1' + | 'binary' + | 'hex'; + /* eslint-disable no-bitwise, no-shadow */ export class Sha256 { private _a: number; @@ -157,7 +169,7 @@ export class Sha256 { this._s = 0; } - update(data: string | Buffer, encoding?: string): Sha256 { + update(data: string | Buffer, encoding?: BufferEncoding): Sha256 { if (typeof data === 'string') { encoding = encoding || 'utf8'; data = Buffer.from(data, encoding); diff --git a/src/core/server/core_usage_data/core_usage_data_service.test.ts b/src/core/server/core_usage_data/core_usage_data_service.test.ts index 9f9e18c08b0da..e1c78edb902a9 100644 --- a/src/core/server/core_usage_data/core_usage_data_service.test.ts +++ b/src/core/server/core_usage_data/core_usage_data_service.test.ts @@ -145,6 +145,9 @@ describe('CoreUsageDataService', () => { "certificateAuthoritiesConfigured": false, "certificateConfigured": false, "cipherSuites": Array [ + "TLS_AES_256_GCM_SHA384", + "TLS_CHACHA20_POLY1305_SHA256", + "TLS_AES_128_GCM_SHA256", "ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384", @@ -174,6 +177,7 @@ describe('CoreUsageDataService', () => { "supportedProtocols": Array [ "TLSv1.1", "TLSv1.2", + "TLSv1.3", ], "truststoreConfigured": false, }, diff --git a/src/core/server/elasticsearch/client/configure_client.test.ts b/src/core/server/elasticsearch/client/configure_client.test.ts index 250cfc18a757d..614ec112e8f0b 100644 --- a/src/core/server/elasticsearch/client/configure_client.test.ts +++ b/src/core/server/elasticsearch/client/configure_client.test.ts @@ -322,7 +322,6 @@ describe('configureClient', () => { ); const response = createResponseWithBody( - // @ts-expect-error definition doesn't know about from Readable.from( JSON.stringify({ seq_no_primary_term: true, diff --git a/src/core/server/http/__snapshots__/http_config.test.ts.snap b/src/core/server/http/__snapshots__/http_config.test.ts.snap index e9b818fe859ec..8e8891b8a73aa 100644 --- a/src/core/server/http/__snapshots__/http_config.test.ts.snap +++ b/src/core/server/http/__snapshots__/http_config.test.ts.snap @@ -47,6 +47,9 @@ Object { "socketTimeout": 120000, "ssl": Object { "cipherSuites": Array [ + "TLS_AES_256_GCM_SHA384", + "TLS_CHACHA20_POLY1305_SHA256", + "TLS_AES_128_GCM_SHA256", "ECDHE-RSA-AES128-GCM-SHA256", "ECDHE-ECDSA-AES128-GCM-SHA256", "ECDHE-RSA-AES256-GCM-SHA384", @@ -75,6 +78,7 @@ Object { "supportedProtocols": Array [ "TLSv1.1", "TLSv1.2", + "TLSv1.3", ], "truststore": Object {}, }, diff --git a/src/core/server/http/http_server.test.ts b/src/core/server/http/http_server.test.ts index 7507a08dd150a..5da4c5de5d313 100644 --- a/src/core/server/http/http_server.test.ts +++ b/src/core/server/http/http_server.test.ts @@ -79,7 +79,7 @@ beforeEach(() => { ssl: { enabled: true, certificate, - cipherSuites: ['cipherSuite'], + cipherSuites: ['TLS_AES_256_GCM_SHA384'], getSecureOptions: () => 0, key, redirectHttpFromPort: config.port + 1, diff --git a/src/core/server/http/http_tools.test.ts b/src/core/server/http/http_tools.test.ts index 336c491a131d6..1423e27b914a3 100644 --- a/src/core/server/http/http_tools.test.ts +++ b/src/core/server/http/http_tools.test.ts @@ -143,7 +143,7 @@ describe('getServerOptions', () => { Object { "ca": undefined, "cert": "content-some-certificate-path", - "ciphers": "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", + "ciphers": "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", "honorCipherOrder": true, "key": "content-some-key-path", "passphrase": undefined, @@ -175,7 +175,7 @@ describe('getServerOptions', () => { "content-ca-2", ], "cert": "content-some-certificate-path", - "ciphers": "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", + "ciphers": "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA", "honorCipherOrder": true, "key": "content-some-key-path", "passphrase": undefined, diff --git a/src/core/server/http/router/validator/validator.test.ts b/src/core/server/http/router/validator/validator.test.ts index 30f66f5d41fbe..f6a1dd82cb10f 100644 --- a/src/core/server/http/router/validator/validator.test.ts +++ b/src/core/server/http/router/validator/validator.test.ts @@ -36,7 +36,7 @@ describe('Router validator', () => { expect(() => validator.getParams({})).toThrowError('[foo]: Not a string'); expect(() => validator.getParams(undefined)).toThrowError( - "Cannot destructure property `foo` of 'undefined' or 'null'." + "Cannot destructure property 'foo' of 'undefined' as it is undefined." ); expect(() => validator.getParams({}, 'myField')).toThrowError('[myField.foo]: Not a string'); diff --git a/src/core/server/http/ssl_config.test.ts b/src/core/server/http/ssl_config.test.ts index 5d0bed601f540..9140efe4a2373 100644 --- a/src/core/server/http/ssl_config.test.ts +++ b/src/core/server/http/ssl_config.test.ts @@ -266,14 +266,19 @@ describe('#sslSchema', () => { certificate: '/path/to/certificate', enabled: true, key: '/path/to/key', - supportedProtocols: ['TLSv1', 'TLSv1.1', 'TLSv1.2'], + supportedProtocols: ['TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3'], }; const singleKnownProtocolConfig = sslSchema.validate(singleKnownProtocol); expect(singleKnownProtocolConfig.supportedProtocols).toEqual(['TLSv1']); const allKnownProtocolsConfig = sslSchema.validate(allKnownProtocols); - expect(allKnownProtocolsConfig.supportedProtocols).toEqual(['TLSv1', 'TLSv1.1', 'TLSv1.2']); + expect(allKnownProtocolsConfig.supportedProtocols).toEqual([ + 'TLSv1', + 'TLSv1.1', + 'TLSv1.2', + 'TLSv1.3', + ]); }); test('rejects unknown protocols`', () => { @@ -288,21 +293,23 @@ describe('#sslSchema', () => { certificate: '/path/to/certificate', enabled: true, key: '/path/to/key', - supportedProtocols: ['TLSv1', 'TLSv1.1', 'TLSv1.2', 'SOMEv100500'], + supportedProtocols: ['TLSv1', 'TLSv1.1', 'TLSv1.2', 'TLSv1.3', 'SOMEv100500'], }; expect(() => sslSchema.validate(singleUnknownProtocol)).toThrowErrorMatchingInlineSnapshot(` "[supportedProtocols.0]: types that failed validation: - [supportedProtocols.0.0]: expected value to equal [TLSv1] - [supportedProtocols.0.1]: expected value to equal [TLSv1.1] -- [supportedProtocols.0.2]: expected value to equal [TLSv1.2]" +- [supportedProtocols.0.2]: expected value to equal [TLSv1.2] +- [supportedProtocols.0.3]: expected value to equal [TLSv1.3]" `); expect(() => sslSchema.validate(allKnownWithOneUnknownProtocols)) .toThrowErrorMatchingInlineSnapshot(` -"[supportedProtocols.3]: types that failed validation: -- [supportedProtocols.3.0]: expected value to equal [TLSv1] -- [supportedProtocols.3.1]: expected value to equal [TLSv1.1] -- [supportedProtocols.3.2]: expected value to equal [TLSv1.2]" +"[supportedProtocols.4]: types that failed validation: +- [supportedProtocols.4.0]: expected value to equal [TLSv1] +- [supportedProtocols.4.1]: expected value to equal [TLSv1.1] +- [supportedProtocols.4.2]: expected value to equal [TLSv1.2] +- [supportedProtocols.4.3]: expected value to equal [TLSv1.3]" `); }); }); diff --git a/src/core/server/http/ssl_config.ts b/src/core/server/http/ssl_config.ts index 75dc05d1a801b..0c5d0017614be 100644 --- a/src/core/server/http/ssl_config.ts +++ b/src/core/server/http/ssl_config.ts @@ -18,18 +18,16 @@ */ import { schema, TypeOf } from '@kbn/config-schema'; -import crypto from 'crypto'; +import { constants as cryptoConstants } from 'crypto'; import { readFileSync } from 'fs'; import { readPkcs12Keystore, readPkcs12Truststore } from '../utils'; -// `crypto` type definitions doesn't currently include `crypto.constants`, see -// https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fa5baf1733f49cf26228a4e509914572c1b74adf/types/node/v6/index.d.ts#L3412 -const cryptoConstants = (crypto as any).constants; - const protocolMap = new Map([ ['TLSv1', cryptoConstants.SSL_OP_NO_TLSv1], ['TLSv1.1', cryptoConstants.SSL_OP_NO_TLSv1_1], ['TLSv1.2', cryptoConstants.SSL_OP_NO_TLSv1_2], + // @ts-expect-error According to the docs SSL_OP_NO_TLSv1_3 should exist (https://nodejs.org/docs/latest-v12.x/api/crypto.html) + ['TLSv1.3', cryptoConstants.SSL_OP_NO_TLSv1_3], ]); export const sslSchema = schema.object( @@ -56,8 +54,13 @@ export const sslSchema = schema.object( }), redirectHttpFromPort: schema.maybe(schema.number()), supportedProtocols: schema.arrayOf( - schema.oneOf([schema.literal('TLSv1'), schema.literal('TLSv1.1'), schema.literal('TLSv1.2')]), - { defaultValue: ['TLSv1.1', 'TLSv1.2'], minSize: 1 } + schema.oneOf([ + schema.literal('TLSv1'), + schema.literal('TLSv1.1'), + schema.literal('TLSv1.2'), + schema.literal('TLSv1.3'), + ]), + { defaultValue: ['TLSv1.1', 'TLSv1.2', 'TLSv1.3'], minSize: 1 } ), clientAuthentication: schema.oneOf( [schema.literal('none'), schema.literal('optional'), schema.literal('required')], diff --git a/src/core/server/logging/appenders/file/file_appender.test.ts b/src/core/server/logging/appenders/file/file_appender.test.ts index 645455c5ae04c..843eb1103b7a0 100644 --- a/src/core/server/logging/appenders/file/file_appender.test.ts +++ b/src/core/server/logging/appenders/file/file_appender.test.ts @@ -144,7 +144,7 @@ test('`dispose()` succeeds even if stream is not created.', async () => { test('`dispose()` closes stream.', async () => { const mockStreamEndFinished = jest.fn(); - const mockStreamEnd = jest.fn(async (chunk, encoding, callback) => { + const mockStreamEnd = jest.fn(async (callback) => { // It's required to make sure `dispose` waits for `end` to complete. await tickMs(100); mockStreamEndFinished(); @@ -170,7 +170,7 @@ test('`dispose()` closes stream.', async () => { await appender.dispose(); expect(mockStreamEnd).toHaveBeenCalledTimes(1); - expect(mockStreamEnd).toHaveBeenCalledWith(undefined, undefined, expect.any(Function)); + expect(mockStreamEnd).toHaveBeenCalledWith(expect.any(Function)); expect(mockStreamEndFinished).toHaveBeenCalled(); // Consequent `dispose` calls should not fail even if stream has been disposed. diff --git a/src/core/server/logging/appenders/file/file_appender.ts b/src/core/server/logging/appenders/file/file_appender.ts index b1712bd4e9412..c86ea4972324c 100644 --- a/src/core/server/logging/appenders/file/file_appender.ts +++ b/src/core/server/logging/appenders/file/file_appender.ts @@ -76,7 +76,7 @@ export class FileAppender implements DisposableAppender { return resolve(); } - this.outputStream.end(undefined, undefined, () => { + this.outputStream.end(() => { this.outputStream = undefined; resolve(); }); diff --git a/src/core/server/metrics/metrics_service.test.ts b/src/core/server/metrics/metrics_service.test.ts index 384a56c8dba94..c39f5f25b02b6 100644 --- a/src/core/server/metrics/metrics_service.test.ts +++ b/src/core/server/metrics/metrics_service.test.ts @@ -82,21 +82,23 @@ describe('MetricsService', () => { // `advanceTimersByTime` only ensure the interval handler is executed // however the `reset` call is executed after the async call to `collect` // meaning that we are going to miss the call if we don't wait for the - // actual observable emission that is performed after - const waitForNextEmission = () => getOpsMetrics$().pipe(take(1)).toPromise(); + // actual observable emission that is performed after. The extra + // `nextTick` is to ensure we've done a complete roundtrip of the event + // loop. + const nextEmission = async () => { + jest.advanceTimersByTime(testInterval); + await getOpsMetrics$().pipe(take(1)).toPromise(); + await new Promise((resolve) => process.nextTick(resolve)); + }; expect(mockOpsCollector.collect).toHaveBeenCalledTimes(1); expect(mockOpsCollector.reset).toHaveBeenCalledTimes(1); - let nextEmission = waitForNextEmission(); - jest.advanceTimersByTime(testInterval); - await nextEmission; + await nextEmission(); expect(mockOpsCollector.collect).toHaveBeenCalledTimes(2); expect(mockOpsCollector.reset).toHaveBeenCalledTimes(2); - nextEmission = waitForNextEmission(); - jest.advanceTimersByTime(testInterval); - await nextEmission; + await nextEmission(); expect(mockOpsCollector.collect).toHaveBeenCalledTimes(3); expect(mockOpsCollector.reset).toHaveBeenCalledTimes(3); }); @@ -117,13 +119,15 @@ describe('MetricsService', () => { await metricsService.setup({ http: httpMock }); const { getOpsMetrics$ } = await metricsService.start(); - const firstEmission = getOpsMetrics$().pipe(take(1)).toPromise(); - jest.advanceTimersByTime(testInterval); - expect(await firstEmission).toEqual({ metric: 'first' }); + const nextEmission = async () => { + jest.advanceTimersByTime(testInterval); + const emission = await getOpsMetrics$().pipe(take(1)).toPromise(); + await new Promise((resolve) => process.nextTick(resolve)); + return emission; + }; - const secondEmission = getOpsMetrics$().pipe(take(1)).toPromise(); - jest.advanceTimersByTime(testInterval); - expect(await secondEmission).toEqual({ metric: 'second' }); + expect(await nextEmission()).toEqual({ metric: 'first' }); + expect(await nextEmission()).toEqual({ metric: 'second' }); }); }); diff --git a/src/core/server/utils/streams/concat_stream_providers.test.ts b/src/core/server/utils/streams/concat_stream_providers.test.ts index b742a770b70c8..878d645d9b4a7 100644 --- a/src/core/server/utils/streams/concat_stream_providers.test.ts +++ b/src/core/server/utils/streams/concat_stream_providers.test.ts @@ -44,7 +44,7 @@ describe('concatStreamProviders() helper', () => { () => new Readable({ read() { - this.emit('error', new Error('foo')); + this.destroy(new Error('foo')); }, }), ]); diff --git a/src/core/server/utils/streams/concat_stream_providers.ts b/src/core/server/utils/streams/concat_stream_providers.ts index bb836e3d73787..236d68c89707e 100644 --- a/src/core/server/utils/streams/concat_stream_providers.ts +++ b/src/core/server/utils/streams/concat_stream_providers.ts @@ -54,7 +54,7 @@ export function concatStreamProviders( source // proxy errors from the source to the destination - .once('error', (error) => destination.emit('error', error)) + .once('error', (error) => destination.destroy(error)) // pipe the source to the destination but only proxy the // end event if this is the last source .pipe(destination, { end: isLast }); diff --git a/src/dev/build/lib/scan_delete.ts b/src/dev/build/lib/scan_delete.ts index 6e41d207e3111..aeccd711b032f 100644 --- a/src/dev/build/lib/scan_delete.ts +++ b/src/dev/build/lib/scan_delete.ts @@ -27,7 +27,7 @@ import { count, map, mergeAll, mergeMap } from 'rxjs/operators'; // @ts-ignore import { assertAbsolute } from './fs'; -const getStat$ = Rx.bindNodeCallback(Fs.stat); +const getStat$ = Rx.bindNodeCallback(Fs.stat); const getReadDir$ = Rx.bindNodeCallback(Fs.readdir); interface Options { diff --git a/src/dev/build/lib/watch_stdio_for_line.ts b/src/dev/build/lib/watch_stdio_for_line.ts index 3d7929ccfc33a..c97b1c3b26db5 100644 --- a/src/dev/build/lib/watch_stdio_for_line.ts +++ b/src/dev/build/lib/watch_stdio_for_line.ts @@ -69,13 +69,13 @@ export async function watchStdioForLine( } }), createPromiseFromStreams([ - proc.stdout, + proc.stdout!, // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null createSplitStream('\n'), skipLastEmptyLineStream(), createMapStream(onLogLine), ]), createPromiseFromStreams([ - proc.stderr, + proc.stderr!, // TypeScript note: As long as the proc stdio[1] is 'pipe', then stderr will not be null createSplitStream('\n'), skipLastEmptyLineStream(), createMapStream(onLogLine), diff --git a/src/dev/build/tasks/bin/scripts/kibana b/src/dev/build/tasks/bin/scripts/kibana index a4fc5385500b5..3c12c8bbf58d0 100755 --- a/src/dev/build/tasks/bin/scripts/kibana +++ b/src/dev/build/tasks/bin/scripts/kibana @@ -26,4 +26,4 @@ if [ -f "${CONFIG_DIR}/node.options" ]; then KBN_NODE_OPTS="$(grep -v ^# < ${CONFIG_DIR}/node.options | xargs)" fi -NODE_OPTIONS="--no-warnings --max-http-header-size=65536 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" ${@} +NODE_OPTIONS="--no-warnings --max-http-header-size=65536 --tls-min-v1.0 $KBN_NODE_OPTS $NODE_OPTIONS" NODE_ENV=production exec "${NODE}" "${DIR}/src/cli/dist" ${@} diff --git a/src/dev/build/tasks/patch_native_modules_task.ts b/src/dev/build/tasks/patch_native_modules_task.ts index b56d01b616462..c3011fa80988c 100644 --- a/src/dev/build/tasks/patch_native_modules_task.ts +++ b/src/dev/build/tasks/patch_native_modules_task.ts @@ -47,16 +47,16 @@ const packages: Package[] = [ extractMethod: 'gunzip', archives: { darwin: { - url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/darwin-x64-64.gz', - sha256: '595c6653d796493ddb288fc0732a0d1df8560099796f55a1dd242357d96bb8d6', + url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/darwin-x64-72.gz', + sha256: '983106049bb86e21b7f823144b2b83e3f1408217401879b3cde0312c803512c9', }, linux: { - url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-64.gz', - sha256: 'e743587bc96314edf10c3e659c03168bc374a5cd9a6623ee99d989251e331f28', + url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/linux-x64-72.gz', + sha256: '8b6692037f7b0df24dabc9c9b039038d1c3a3110f62121616b406c482169710a', }, win32: { - url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/win32-x64-64.gz', - sha256: 'b33de62cda24fb02dc80a19fb79977d686468ac746e97cd211059d2d4c75d529', + url: 'https://github.com/uhop/node-re2/releases/download/1.15.4/win32-x64-72.gz', + sha256: '0a6991e693577160c3e9a3f196bd2518368c52d920af331a1a183313e0175604', }, }, }, diff --git a/src/dev/prs/run_update_prs_cli.ts b/src/dev/prs/run_update_prs_cli.ts index 49668199a26d4..57da9d164b395 100644 --- a/src/dev/prs/run_update_prs_cli.ts +++ b/src/dev/prs/run_update_prs_cli.ts @@ -72,7 +72,10 @@ run( await Promise.all([ proc.then(() => log.debug(` - ${cmd} exited with 0`)), - Rx.merge(getLine$(proc.stdout), getLine$(proc.stderr)) + Rx.merge( + getLine$(proc.stdout!), // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null + getLine$(proc.stderr!) // TypeScript note: As long as the proc stdio[2] is 'pipe', then stderr will not be null + ) .pipe(tap((line) => log.debug(line))) .toPromise(), ]); diff --git a/src/plugins/console/public/application/models/sense_editor/__tests__/integration.test.js b/src/plugins/console/public/application/models/sense_editor/__tests__/integration.test.js index 06823a981af46..0b443ef400d6f 100644 --- a/src/plugins/console/public/application/models/sense_editor/__tests__/integration.test.js +++ b/src/plugins/console/public/application/models/sense_editor/__tests__/integration.test.js @@ -661,7 +661,7 @@ describe('Integration', () => { { name: 'Any of - mixed - both', cursor: { lineNumber: 14, column: 3 }, - autoCompleteSet: [tt('{'), tt(3)], + autoCompleteSet: [tt(3), tt('{')], }, ] ); diff --git a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx index 25179fd7ccd38..5f001e3de55d0 100644 --- a/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx +++ b/src/plugins/dashboard/public/application/actions/clone_panel_action.test.tsx @@ -111,6 +111,7 @@ test('Clone adds a new embeddable', async () => { expect(newPanel.type).toEqual('placeholder'); // let the placeholder load await dashboard.untilEmbeddableLoaded(newPanelId!); + await new Promise((r) => process.nextTick(r)); // Allow the current loop of the event loop to run to completion // now wait for the full embeddable to replace it const loadedPanel = await dashboard.untilEmbeddableLoaded(newPanelId!); expect(loadedPanel.type).toEqual(embeddable.type); diff --git a/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap b/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap index 3bd3bb6531cc7..ec68b307734e3 100644 --- a/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap +++ b/src/plugins/inspector/public/views/data/components/__snapshots__/data_view.test.tsx.snap @@ -12,6 +12,7 @@ exports[`Inspector Data View component should render empty state 1`] = ` "_maxListeners": undefined, "tabular": [Function], "tabularOptions": Object {}, + Symbol(kCapture): false, }, } } @@ -130,6 +131,7 @@ exports[`Inspector Data View component should render empty state 1`] = ` "_maxListeners": undefined, "tabular": [Function], "tabularOptions": Object {}, + Symbol(kCapture): false, }, } } diff --git a/src/plugins/kibana_utils/public/core/create_start_service_getter.test.ts b/src/plugins/kibana_utils/public/core/create_start_service_getter.test.ts index 1553257a04adb..a096430af362d 100644 --- a/src/plugins/kibana_utils/public/core/create_start_service_getter.test.ts +++ b/src/plugins/kibana_utils/public/core/create_start_service_getter.test.ts @@ -49,6 +49,7 @@ describe('createStartServicesGetter', () => { await new Promise((r) => setTimeout(r, 1)); future.resolve([core, plugins, self]); await future.promise; + await new Promise((r) => process.nextTick(r)); // Allow the current loop of the event loop to run to completion expect(start()).toEqual({ core, @@ -68,6 +69,7 @@ describe('createStartServicesGetter', () => { await new Promise((r) => setTimeout(r, 1)); future.resolve([core, plugins, self]); await future.promise; + await new Promise((r) => process.nextTick(r)); // Allow the current loop of the event loop to run to completion expect(start()).toEqual({ core, diff --git a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts index a3b220f911504..cb3c9470c7abd 100644 --- a/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts +++ b/src/plugins/kibana_utils/public/state_management/url/kbn_url_storage.ts @@ -238,7 +238,8 @@ export const createKbnUrlControls = ( * 4. Hash history with base path */ export function getRelativeToHistoryPath(absoluteUrl: string, history: History): History.Path { - function stripBasename(path: string = '') { + function stripBasename(path: string | null) { + if (path === null) path = ''; const stripLeadingHash = (_: string) => (_.charAt(0) === '#' ? _.substr(1) : _); const stripTrailingSlash = (_: string) => _.charAt(_.length - 1) === '/' ? _.substr(0, _.length - 1) : _; @@ -250,7 +251,7 @@ export function getRelativeToHistoryPath(absoluteUrl: string, history: History): const parsedHash = isHashHistory ? null : parseUrlHash(absoluteUrl); return formatUrl({ - pathname: stripBasename(parsedUrl.pathname), + pathname: stripBasename(parsedUrl.pathname ?? null), search: stringify(urlUtils.encodeQuery(parsedUrl.query), { sort: false, encode: false }), hash: parsedHash ? formatUrl({ diff --git a/src/plugins/share/server/routes/lib/short_url_assert_valid.ts b/src/plugins/share/server/routes/lib/short_url_assert_valid.ts index 462fc31944b74..581410359322f 100644 --- a/src/plugins/share/server/routes/lib/short_url_assert_valid.ts +++ b/src/plugins/share/server/routes/lib/short_url_assert_valid.ts @@ -32,7 +32,7 @@ export function shortUrlAssertValid(url: string) { throw Boom.notAcceptable(`Short url targets cannot have a hostname, found "${hostname}"`); } - const pathnameParts = trim(pathname, '/').split('/'); + const pathnameParts = trim(pathname === null ? undefined : pathname, '/').split('/'); if (pathnameParts.length !== 2) { throw Boom.notAcceptable( `Short url target path must be in the format "/app/{{appId}}", found "${pathname}"` diff --git a/src/setup_node_env/exit_on_warning.js b/src/setup_node_env/exit_on_warning.js index c0a0f0ecc0b83..d5f6ab00de2d4 100644 --- a/src/setup_node_env/exit_on_warning.js +++ b/src/setup_node_env/exit_on_warning.js @@ -17,11 +17,34 @@ * under the License. */ -if (process.noProcessWarnings !== true) { - var ignore = ['MaxListenersExceededWarning']; +var EOL = require('os').EOL; + +// Be very careful of what you add to this list. Idealy this array should be +// empty, but in certain circumstances, we can allow a warning to be ignored +// temporarily. +// +// Each element in the array is a "rule-object". All rules defined in a +// "rule-object" has to match for a warning to be ignored. Possible rules are: +// `name`, `code`, `message`, `file`, `lines`, and `col`. +// +// The `file`, `line`, and `col` rules will be checked against the top stack +// frame only. Also, `file` doesn't have to match the full path, only the end of +// it. +var IGNORE_WARNINGS = [ + { + name: 'MaxListenersExceededWarning', + }, + { + name: 'DeprecationWarning', + code: 'DEP0066', + file: '/node_modules/supertest/node_modules/superagent/lib/node/index.js', + line: 418, + }, +]; +if (process.noProcessWarnings !== true) { process.on('warning', function (warn) { - if (ignore.includes(warn.name)) return; + if (shouldIgnore(warn)) return; if (process.traceProcessWarnings === true) { console.error('Node.js process-warning detected - Terminating process...'); @@ -48,3 +71,47 @@ if (process.noProcessWarnings !== true) { process.exit(1); }); } + +function shouldIgnore(warn) { + warn = parseWarn(warn); + return IGNORE_WARNINGS.some(function ({ name, code, message, file, line, col }) { + if (name && name !== warn.name) return false; + if (code && code !== warn.code) return false; + if (message && message !== warn.message) return false; + if (file && !warn.frames[0].file.endsWith(file)) return false; + if (line && line !== warn.frames[0].line) return false; + if (col && col !== warn.frames[0].col) return false; + return true; + }); +} + +function parseWarn(warn) { + var lines = warn.stack.split(EOL); + return { + name: warn.name, + code: warn.code, + message: lines[0].split(': ')[1], + frames: parseStack(lines.slice(1)), + }; +} + +function parseStack(stack) { + return stack.map(parseFrame).filter(function (frame) { + return frame; + }); +} + +function parseFrame(frame) { + // supports the following frame types: + // - " at function-name (file-path:1:2)" + // - " at function-name (file-path)" + // - " at file-path:1:2" + var match = frame.match(/^ at (?:([^(]+) )?\(?([^:)]+)(?::(\d+):(\d+))?\)?$/); + if (match === null) return; // in case the stack trace is modified by another module, e.g. jest + return { + func: match[1], + file: match[2], + line: Number(match[3]), + col: Number(match[4]), + }; +} diff --git a/test/functional/services/remote/create_stdout_stream.ts b/test/functional/services/remote/create_stdout_stream.ts index 9af5cba63f9ea..9993cfb37d9b7 100644 --- a/test/functional/services/remote/create_stdout_stream.ts +++ b/test/functional/services/remote/create_stdout_stream.ts @@ -76,7 +76,7 @@ export async function createStdoutSocket() { throw new Error('server must listen to a random port, not a unix socket'); } - const input = Net.createConnection(addressInfo.port, addressInfo.address); + const input = Net.createConnection(addressInfo!.port, addressInfo!.address); // TypeScript note: addressInfo will not be null after 'listening' has been emitted await Rx.fromEvent(input, 'connect').pipe(take(1)).toPromise(); return { diff --git a/x-pack/plugins/actions/server/builtin_action_types/slack.ts b/x-pack/plugins/actions/server/builtin_action_types/slack.ts index 1605cd4b69f5e..628a13e19f7a9 100644 --- a/x-pack/plugins/actions/server/builtin_action_types/slack.ts +++ b/x-pack/plugins/actions/server/builtin_action_types/slack.ts @@ -126,6 +126,7 @@ async function slackExecutor( // https://slack.dev/node-slack-sdk/webhook // node-slack-sdk use Axios inside :) const webhook = new IncomingWebhook(webhookUrl, { + // @ts-expect-error The types exposed by 'HttpsProxyAgent' isn't up to date with 'Agent' agent: proxyAgent, }); result = await webhook.send(message); diff --git a/x-pack/plugins/canvas/shareable_runtime/api/__tests__/shareable.test.tsx b/x-pack/plugins/canvas/shareable_runtime/api/__tests__/shareable.test.tsx index 4b3aa8dc2fb6e..0851ae8d04eb0 100644 --- a/x-pack/plugins/canvas/shareable_runtime/api/__tests__/shareable.test.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/api/__tests__/shareable.test.tsx @@ -15,7 +15,6 @@ jest.mock('../../supported_renderers'); describe('Canvas Shareable Workpad API', () => { // Mock the AJAX load of the workpad. beforeEach(function () { - // @ts-expect-error Applying a global in Jest is alright. global.fetch = jest.fn().mockImplementation(() => { const p = new Promise((resolve, _reject) => { resolve({ diff --git a/x-pack/plugins/fleet/server/services/epm/registry/requests.ts b/x-pack/plugins/fleet/server/services/epm/registry/requests.ts index c8d158c8afaaa..7bd023219aeb3 100644 --- a/x-pack/plugins/fleet/server/services/epm/registry/requests.ts +++ b/x-pack/plugins/fleet/server/services/epm/registry/requests.ts @@ -93,6 +93,7 @@ export function getFetchOptions(targetUrl: string): RequestInit | undefined { logger.debug(`Using ${proxyUrl} as proxy for ${targetUrl}`); return { + // @ts-expect-error The types exposed by 'HttpsProxyAgent' isn't up to date with 'Agent' agent: getProxyAgent({ proxyUrl, targetUrl }), }; } diff --git a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts b/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts index 99149c3e74568..d6f5b10cf64e1 100644 --- a/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts +++ b/x-pack/plugins/lens/public/indexpattern_datasource/operations/operations.test.ts @@ -249,12 +249,12 @@ describe('getOperationTypesForField', () => { }, Object { "field": "bytes", - "operationType": "max", + "operationType": "min", "type": "field", }, Object { "field": "bytes", - "operationType": "min", + "operationType": "max", "type": "field", }, Object { diff --git a/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts b/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts index d6c6ee3082959..e8c3282146097 100644 --- a/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts +++ b/x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts @@ -186,15 +186,15 @@ describe('xy_suggestions', () => { expect(suggestions).toHaveLength(visualizationTypes.length); expect(suggestions.map(({ state }) => xyVisualization.getVisualizationTypeId(state))).toEqual([ 'bar_stacked', - 'line', - 'area_percentage_stacked', - 'area_stacked', - 'area', - 'bar_horizontal_percentage_stacked', - 'bar_horizontal_stacked', - 'bar_percentage_stacked', - 'bar_horizontal', 'bar', + 'bar_horizontal', + 'bar_percentage_stacked', + 'bar_horizontal_stacked', + 'bar_horizontal_percentage_stacked', + 'area', + 'area_stacked', + 'area_percentage_stacked', + 'line', ]); }); @@ -226,15 +226,15 @@ describe('xy_suggestions', () => { ]); expect(suggestions.map(({ state }) => xyVisualization.getVisualizationTypeId(state))).toEqual([ 'bar_stacked', - 'line', - 'area_percentage_stacked', - 'area_stacked', - 'area', - 'bar_horizontal_percentage_stacked', - 'bar_horizontal_stacked', - 'bar_percentage_stacked', - 'bar_horizontal', 'bar', + 'bar_horizontal', + 'bar_percentage_stacked', + 'bar_horizontal_stacked', + 'bar_horizontal_percentage_stacked', + 'area', + 'area_stacked', + 'area_percentage_stacked', + 'line', ]); }); diff --git a/x-pack/plugins/monitoring/common/format_timestamp_to_duration.js b/x-pack/plugins/monitoring/common/format_timestamp_to_duration.js index 46c8f7db49b0f..9e1d421989f53 100644 --- a/x-pack/plugins/monitoring/common/format_timestamp_to_duration.js +++ b/x-pack/plugins/monitoring/common/format_timestamp_to_duration.js @@ -48,7 +48,7 @@ export function formatTimestampToDuration(timestamp, calculationFlag, initialTim } return duration - .replace(/ 0 mins$/, '') - .replace(/ 0 hrs$/, '') - .replace(/ 0 days$/, ''); // See https://github.com/jsmreese/moment-duration-format/issues/64 + .replace(/ -?0 mins$/, '') + .replace(/ -?0 hrs$/, '') + .replace(/ -?0 days$/, ''); // See https://github.com/jsmreese/moment-duration-format/issues/64 } diff --git a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts index 04ab572a53dbc..500185cd7e14f 100644 --- a/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts +++ b/x-pack/plugins/reporting/server/browsers/chromium/driver/chromium_driver.ts @@ -333,12 +333,8 @@ export class HeadlessChromiumDriver { private _shouldUseCustomHeaders(conditions: ConditionalHeadersConditions, url: string) { const { hostname, protocol, port, pathname } = parseUrl(url); - if (pathname === undefined) { - // There's a discrepancy between the NodeJS docs and the typescript types. NodeJS docs - // just say 'string' and the typescript types say 'string | undefined'. We haven't hit a - // situation where it's undefined but here's an explicit Error if we do. - throw new Error(`pathname is undefined, don't know how to proceed`); - } + if (port === null) throw new Error(`URL missing port: ${url}`); + if (pathname === null) throw new Error(`URL missing pathname: ${url}`); return ( hostname === conditions.hostname && diff --git a/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts index 7621a95083bc7..8b2507ed3d25e 100644 --- a/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts +++ b/x-pack/plugins/reporting/server/export_types/common/get_full_urls.ts @@ -50,9 +50,9 @@ export function getFullUrls(config: ReportingConfig, job: TaskPayloadPDF | TaskP const urls = relativeUrls.map((relativeUrl) => { const parsedRelative: UrlWithStringQuery = urlParse(relativeUrl); const jobUrl = getAbsoluteUrl({ - path: parsedRelative.pathname, - hash: parsedRelative.hash, - search: parsedRelative.search, + path: parsedRelative.pathname === null ? undefined : parsedRelative.pathname, + hash: parsedRelative.hash === null ? undefined : parsedRelative.hash, + search: parsedRelative.search === null ? undefined : parsedRelative.search, }); // capture the route to the visualization diff --git a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts index f70c2e8b63885..efb0a712d9b43 100644 --- a/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts +++ b/x-pack/plugins/security_solution/public/common/utils/clone_http_fetch_query.test.ts @@ -14,7 +14,7 @@ describe('cloneHttpFetchQuery', () => { a: 'a', '1': 1, undefined, - array: [1, 2, undefined], + array: [1, 2], }; expect(cloneHttpFetchQuery(query)).toMatchInlineSnapshot(` Object { @@ -23,7 +23,6 @@ describe('cloneHttpFetchQuery', () => { "array": Array [ 1, 2, - undefined, ], "undefined": undefined, } diff --git a/x-pack/plugins/security_solution/public/management/common/routing.ts b/x-pack/plugins/security_solution/public/management/common/routing.ts index b3162a8708a5f..c2c82639bf7d5 100644 --- a/x-pack/plugins/security_solution/public/management/common/routing.ts +++ b/x-pack/plugins/security_solution/public/management/common/routing.ts @@ -32,9 +32,9 @@ type Exact = T extends Shape ? ExactKeys : never; * Ensures that when creating a URL query param string, that the given input strictly * matches the expected interface (guards against possibly leaking internal state) */ -const querystringStringify: ( +const querystringStringify = ( params: Exact -) => string = querystring.stringify; +): string => querystring.stringify((params as unknown) as querystring.ParsedUrlQueryInput); /** Make `selected_endpoint` required */ type EndpointDetailsUrlProps = Omit & diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts index c421f513556f4..c9f0ff6235cc0 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/url_from_query_params.ts @@ -11,7 +11,7 @@ import { EndpointIndexUIQueryParams } from '../types'; import { AppLocation } from '../../../../../common/endpoint/types'; export function urlFromQueryParams(queryParams: EndpointIndexUIQueryParams): Partial { - const search = querystring.stringify(queryParams); + const search = querystring.stringify(queryParams as Record); return { search, }; diff --git a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx b/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx index 430b5702be1bc..8b2810143cb19 100644 --- a/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx +++ b/x-pack/plugins/security_solution/public/network/pages/details/index.test.tsx @@ -26,8 +26,6 @@ import { NetworkDetails } from './index'; type Action = 'PUSH' | 'POP' | 'REPLACE'; const pop: Action = 'POP'; -type GlobalWithFetch = NodeJS.Global & { fetch: jest.Mock }; - jest.mock('react-router-dom', () => { const original = jest.requireActual('react-router-dom'); @@ -85,7 +83,7 @@ describe('Network Details', () => { indicesExist: false, indexPattern: {}, }); - (global as GlobalWithFetch).fetch = jest.fn().mockImplementationOnce(() => + global.fetch = jest.fn().mockImplementationOnce(() => Promise.resolve({ ok: true, json: () => { diff --git a/x-pack/plugins/spaces/common/lib/spaces_url_parser.ts b/x-pack/plugins/spaces/common/lib/spaces_url_parser.ts index be950e6a651e6..6466835899f16 100644 --- a/x-pack/plugins/spaces/common/lib/spaces_url_parser.ts +++ b/x-pack/plugins/spaces/common/lib/spaces_url_parser.ts @@ -8,9 +8,11 @@ import { DEFAULT_SPACE_ID } from '../constants'; const spaceContextRegex = /^\/s\/([a-z0-9_\-]+)/; export function getSpaceIdFromPath( - requestBasePath: string = '/', - serverBasePath: string = '/' + requestBasePath?: string | null, + serverBasePath?: string | null ): { spaceId: string; pathHasExplicitSpaceIdentifier: boolean } { + if (requestBasePath == null) requestBasePath = '/'; + if (serverBasePath == null) serverBasePath = '/'; const pathToCheck: string = stripServerBasePath(requestBasePath, serverBasePath); // Look for `/s/space-url-context` in the base path diff --git a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx index 270cf862ccbd9..04d8dfb87cf95 100644 --- a/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx +++ b/x-pack/plugins/spaces/public/management/edit_space/manage_space_page.test.tsx @@ -7,6 +7,7 @@ import { EuiButton, EuiCheckboxProps } from '@elastic/eui'; import { ReactWrapper } from 'enzyme'; import React from 'react'; +import { wait } from '@testing-library/react'; import { mountWithIntl } from 'test_utils/enzyme_helpers'; import { ConfirmAlterActiveSpaceModal } from './confirm_alter_active_space_modal'; @@ -69,7 +70,10 @@ describe('ManageSpacePage', () => { /> ); - await waitForDataLoad(wrapper); + await wait(() => { + wrapper.update(); + expect(wrapper.find('input[name="name"]')).toHaveLength(1); + }); const nameInput = wrapper.find('input[name="name"]'); const descriptionInput = wrapper.find('textarea[name="description"]'); @@ -128,9 +132,11 @@ describe('ManageSpacePage', () => { /> ); - await waitForDataLoad(wrapper); + await wait(() => { + wrapper.update(); + expect(spacesManager.getSpace).toHaveBeenCalledWith('existing-space'); + }); - expect(spacesManager.getSpace).toHaveBeenCalledWith('existing-space'); expect(onLoadSpace).toHaveBeenCalledWith({ ...spaceToUpdate, }); @@ -179,10 +185,11 @@ describe('ManageSpacePage', () => { /> ); - await waitForDataLoad(wrapper); - - expect(notifications.toasts.addError).toHaveBeenCalledWith(error, { - title: 'Error loading available features', + await wait(() => { + wrapper.update(); + expect(notifications.toasts.addError).toHaveBeenCalledWith(error, { + title: 'Error loading available features', + }); }); }); @@ -216,9 +223,10 @@ describe('ManageSpacePage', () => { /> ); - await waitForDataLoad(wrapper); - - expect(spacesManager.getSpace).toHaveBeenCalledWith('my-space'); + await wait(() => { + wrapper.update(); + expect(spacesManager.getSpace).toHaveBeenCalledWith('my-space'); + }); await Promise.resolve(); @@ -277,9 +285,10 @@ describe('ManageSpacePage', () => { /> ); - await waitForDataLoad(wrapper); - - expect(spacesManager.getSpace).toHaveBeenCalledWith('my-space'); + await wait(() => { + wrapper.update(); + expect(spacesManager.getSpace).toHaveBeenCalledWith('my-space'); + }); await Promise.resolve(); @@ -327,9 +336,3 @@ async function clickSaveButton(wrapper: ReactWrapper) { wrapper.update(); } - -async function waitForDataLoad(wrapper: ReactWrapper) { - await Promise.resolve(); - await Promise.resolve(); - wrapper.update(); -} diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx index 5de7fcf69b363..be12550648a0a 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.test.tsx @@ -13,6 +13,7 @@ import { SpacesManager } from '../spaces_manager'; import { NavControlPopover } from './nav_control_popover'; import { EuiHeaderSectionItemButton } from '@elastic/eui'; import { mountWithIntl } from 'test_utils/enzyme_helpers'; +import { wait } from '@testing-library/react'; describe('NavControlPopover', () => { it('renders without crashing', () => { @@ -64,10 +65,9 @@ describe('NavControlPopover', () => { wrapper.find(EuiHeaderSectionItemButton).simulate('click'); // Wait for `getSpaces` promise to resolve - await Promise.resolve(); - await Promise.resolve(); - wrapper.update(); - - expect(wrapper.find(SpaceAvatar)).toHaveLength(3); + await wait(() => { + wrapper.update(); + expect(wrapper.find(SpaceAvatar)).toHaveLength(3); + }); }); }); diff --git a/x-pack/plugins/spaces/server/lib/copy_to_spaces/copy_to_spaces.test.ts b/x-pack/plugins/spaces/server/lib/copy_to_spaces/copy_to_spaces.test.ts index 1cec7b769fa26..d1a8e93bff929 100644 --- a/x-pack/plugins/spaces/server/lib/copy_to_spaces/copy_to_spaces.test.ts +++ b/x-pack/plugins/spaces/server/lib/copy_to_spaces/copy_to_spaces.test.ts @@ -283,7 +283,7 @@ describe('copySavedObjectsToSpaces', () => { new Readable({ objectMode: true, read() { - this.emit('error', new Error('Something went wrong while reading this stream')); + this.destroy(new Error('Something went wrong while reading this stream')); }, }) ); diff --git a/x-pack/plugins/spaces/server/lib/copy_to_spaces/resolve_copy_conflicts.test.ts b/x-pack/plugins/spaces/server/lib/copy_to_spaces/resolve_copy_conflicts.test.ts index 37181c9d81649..f1b475ee9d1b3 100644 --- a/x-pack/plugins/spaces/server/lib/copy_to_spaces/resolve_copy_conflicts.test.ts +++ b/x-pack/plugins/spaces/server/lib/copy_to_spaces/resolve_copy_conflicts.test.ts @@ -290,7 +290,7 @@ describe('resolveCopySavedObjectsToSpacesConflicts', () => { new Readable({ objectMode: true, read() { - this.emit('error', new Error('Something went wrong while reading this stream')); + this.destroy(new Error('Something went wrong while reading this stream')); }, }) ); diff --git a/x-pack/plugins/uptime/public/components/overview/__tests__/synthetics_callout.test.tsx b/x-pack/plugins/uptime/public/components/overview/__tests__/synthetics_callout.test.tsx index 88bae4c72b686..980021b7d6073 100644 --- a/x-pack/plugins/uptime/public/components/overview/__tests__/synthetics_callout.test.tsx +++ b/x-pack/plugins/uptime/public/components/overview/__tests__/synthetics_callout.test.tsx @@ -19,7 +19,6 @@ describe('SyntheticsCallout', () => { setItem: setItemMock, }; - // @ts-expect-error replacing a call to localStorage we use for monitor list size global.localStorage = localStorageMock; }); diff --git a/x-pack/plugins/uptime/public/components/overview/monitor_list/__tests__/monitor_list.test.tsx b/x-pack/plugins/uptime/public/components/overview/monitor_list/__tests__/monitor_list.test.tsx index 352369cfdb72b..8e5ae13836f47 100644 --- a/x-pack/plugins/uptime/public/components/overview/monitor_list/__tests__/monitor_list.test.tsx +++ b/x-pack/plugins/uptime/public/components/overview/monitor_list/__tests__/monitor_list.test.tsx @@ -135,7 +135,6 @@ describe('MonitorList component', () => { setItem: jest.fn(), }; - // @ts-expect-error replacing a call to localStorage we use for monitor list size global.localStorage = localStorageMock; }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts index 4e9293b74c99e..edac71b8c594f 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/jira.ts @@ -311,12 +311,36 @@ export default function jiraTest({ getService }: FtrProviderContext) { params: {}, }) .then((resp: any) => { - expect(resp.body).to.eql({ - actionId: simulatedActionId, - status: 'error', - retry: false, - message: `error validating action params: Cannot read property 'Symbol(Symbol.iterator)' of undefined`, - }); + expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); + expect(resp.body.actionId).to.eql(simulatedActionId); + expect(resp.body.status).to.eql('error'); + expect(resp.body.retry).to.eql(false); + // Node.js 12 oddity: + // + // The first time after the server is booted, the error message will be: + // + // undefined is not iterable (cannot read property Symbol(Symbol.iterator)) + // + // After this, the error will be: + // + // Cannot destructure property 'value' of 'undefined' as it is undefined. + // + // The error seems to come from the exact same place in the code based on the + // exact same circomstances: + // + // https://github.com/elastic/kibana/blob/b0a223ebcbac7e404e8ae6da23b2cc6a4b509ff1/packages/kbn-config-schema/src/types/literal_type.ts#L28 + // + // What triggers the error is that the `handleError` function expects its 2nd + // argument to be an object containing a `valids` property of type array. + // + // In this test the object does not contain a `valids` property, so hence the + // error. + // + // Why the error message isn't the same in all scenarios is unknown to me and + // could be a bug in V8. + expect(resp.body.message).to.match( + /^error validating action params: (undefined is not iterable \(cannot read property Symbol\(Symbol.iterator\)\)|Cannot destructure property 'value' of 'undefined' as it is undefined\.)$/ + ); }); }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts index 34c1c757ab119..617f66ec98f50 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/resilient.ts @@ -312,12 +312,36 @@ export default function resilientTest({ getService }: FtrProviderContext) { params: {}, }) .then((resp: any) => { - expect(resp.body).to.eql({ - actionId: simulatedActionId, - status: 'error', - retry: false, - message: `error validating action params: Cannot read property 'Symbol(Symbol.iterator)' of undefined`, - }); + expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); + expect(resp.body.actionId).to.eql(simulatedActionId); + expect(resp.body.status).to.eql('error'); + expect(resp.body.retry).to.eql(false); + // Node.js 12 oddity: + // + // The first time after the server is booted, the error message will be: + // + // undefined is not iterable (cannot read property Symbol(Symbol.iterator)) + // + // After this, the error will be: + // + // Cannot destructure property 'value' of 'undefined' as it is undefined. + // + // The error seems to come from the exact same place in the code based on the + // exact same circomstances: + // + // https://github.com/elastic/kibana/blob/b0a223ebcbac7e404e8ae6da23b2cc6a4b509ff1/packages/kbn-config-schema/src/types/literal_type.ts#L28 + // + // What triggers the error is that the `handleError` function expects its 2nd + // argument to be an object containing a `valids` property of type array. + // + // In this test the object does not contain a `valids` property, so hence the + // error. + // + // Why the error message isn't the same in all scenarios is unknown to me and + // could be a bug in V8. + expect(resp.body.message).to.match( + /^error validating action params: (undefined is not iterable \(cannot read property Symbol\(Symbol.iterator\)\)|Cannot destructure property 'value' of 'undefined' as it is undefined\.)$/ + ); }); }); diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts index 5b4db53a59a41..47bfd3c496123 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/tests/actions/builtin_action_types/servicenow.ts @@ -306,12 +306,36 @@ export default function servicenowTest({ getService }: FtrProviderContext) { params: {}, }) .then((resp: any) => { - expect(resp.body).to.eql({ - actionId: simulatedActionId, - status: 'error', - retry: false, - message: `error validating action params: Cannot read property 'Symbol(Symbol.iterator)' of undefined`, - }); + expect(Object.keys(resp.body)).to.eql(['status', 'actionId', 'message', 'retry']); + expect(resp.body.actionId).to.eql(simulatedActionId); + expect(resp.body.status).to.eql('error'); + expect(resp.body.retry).to.eql(false); + // Node.js 12 oddity: + // + // The first time after the server is booted, the error message will be: + // + // undefined is not iterable (cannot read property Symbol(Symbol.iterator)) + // + // After this, the error will be: + // + // Cannot destructure property 'value' of 'undefined' as it is undefined. + // + // The error seems to come from the exact same place in the code based on the + // exact same circomstances: + // + // https://github.com/elastic/kibana/blob/b0a223ebcbac7e404e8ae6da23b2cc6a4b509ff1/packages/kbn-config-schema/src/types/literal_type.ts#L28 + // + // What triggers the error is that the `handleError` function expects its 2nd + // argument to be an object containing a `valids` property of type array. + // + // In this test the object does not contain a `valids` property, so hence the + // error. + // + // Why the error message isn't the same in all scenarios is unknown to me and + // could be a bug in V8. + expect(resp.body.message).to.match( + /^error validating action params: (undefined is not iterable \(cannot read property Symbol\(Symbol.iterator\)\)|Cannot destructure property 'value' of 'undefined' as it is undefined\.)$/ + ); }); }); diff --git a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts index c72d48094ca8d..e0b03e1a91f40 100644 --- a/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts +++ b/x-pack/test/apm_api_integration/basic/tests/transaction_groups/distribution.ts @@ -20,7 +20,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { const url = `/api/apm/services/opbeans-java/transaction_groups/distribution?${qs.stringify({ start: metadata.start, end: metadata.end, - uiFilters: {}, + uiFilters: encodeURIComponent('{}'), transactionName: 'APIRestController#stats', transactionType: 'request', })}`; diff --git a/x-pack/test/apm_api_integration/trial/tests/service_maps/service_maps.ts b/x-pack/test/apm_api_integration/trial/tests/service_maps/service_maps.ts index 25c3f753341d1..9c01833f78e5d 100644 --- a/x-pack/test/apm_api_integration/trial/tests/service_maps/service_maps.ts +++ b/x-pack/test/apm_api_integration/trial/tests/service_maps/service_maps.ts @@ -111,7 +111,7 @@ export default function serviceMapsApiTests({ getService }: FtrProviderContext) const q = querystring.stringify({ start: metadata.start, end: metadata.end, - uiFilters: {}, + uiFilters: encodeURIComponent('{}'), }); const response = await supertest.get(`/api/apm/service-map/service/opbeans-node?${q}`); diff --git a/x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz b/x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz index c616730ff35b6..83da642be8762 100644 Binary files a/x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz and b/x-pack/test/functional/es_archives/reporting/hugedata/data.json.gz differ diff --git a/x-pack/test/functional/es_archives/reporting/scripted_small2/data.json.gz b/x-pack/test/functional/es_archives/reporting/scripted_small2/data.json.gz index 5e421015770b3..c86627ddb0732 100644 Binary files a/x-pack/test/functional/es_archives/reporting/scripted_small2/data.json.gz and b/x-pack/test/functional/es_archives/reporting/scripted_small2/data.json.gz differ diff --git a/x-pack/test/reporting_api_integration/fixtures.ts b/x-pack/test/reporting_api_integration/fixtures.ts index c3448dada3a53..6d76a158acf1d 100644 --- a/x-pack/test/reporting_api_integration/fixtures.ts +++ b/x-pack/test/reporting_api_integration/fixtures.ts @@ -136,101 +136,106 @@ export const CSV_RESULT_TIMELESS = `name,power `; export const CSV_RESULT_SCRIPTED = `date,name,percent,value,year,"years_ago",gender -"Jan 1, 1980 @ 00:00:00.000",Fecki,0,92,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fecki,0,78,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fecky,"0.001","2,071","1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fekki,0,6,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felen,0,40,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felia,0,21,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felina,0,6,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felinda,"0.001","1,620","1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felinda,"0.001","1,886","1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felisa,0,5,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felita,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felkys,0,7,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felkys,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fell,0,6,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felle,0,22,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felma,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felynda,0,31,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fenita,0,219,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fenjamin,0,22,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fenjamin,0,27,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fenji,0,5,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Fennie,0,16,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fenny,0,5,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Ferenice,0,9,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Frijida,0,5,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Frita,0,14,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fritney,0,10,"1,980","39.000000000000000000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fecki,0,92,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fecki,0,78,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fecky,"0.001","2,071","1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fekki,0,6,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felen,0,40,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felia,0,21,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felina,0,6,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felinda,"0.001","1,620","1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felinda,"0.001","1,886","1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felisa,0,5,"1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felita,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felkys,0,7,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felkys,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fell,0,6,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felle,0,22,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felma,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felynda,0,31,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fenita,0,219,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fenjamin,0,22,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fenjamin,0,27,"1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fenji,0,5,"1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Fennie,0,16,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fenny,0,5,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Ferenice,0,9,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Frijida,0,5,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Frita,0,14,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fritney,0,10,"1,980","39.00000000000000000000",F `; export const CSV_RESULT_SCRIPTED_REQUERY = `date,name,percent,value,year,"years_ago",gender -"Jan 1, 1980 @ 00:00:00.000",Felen,0,40,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felia,0,21,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felina,0,6,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felinda,"0.001","1,620","1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felinda,"0.001","1,886","1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felisa,0,5,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felita,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felkys,0,7,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felkys,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Fell,0,6,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felle,0,22,"1,980","39.000000000000000000000000000000000",F -"Jan 1, 1981 @ 00:00:00.000",Felma,0,8,"1,981","38.000000000000000000000000000000000",F -"Jan 1, 1980 @ 00:00:00.000",Felynda,0,31,"1,980","39.000000000000000000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felen,0,40,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felia,0,21,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felina,0,6,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felinda,"0.001","1,620","1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felinda,"0.001","1,886","1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felisa,0,5,"1,981","38.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felita,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felkys,0,7,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felkys,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Fell,0,6,"1,980","39.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felle,0,22,"1,980","39.00000000000000000000",F +"Jan 1, 1981 @ 00:00:00.000",Felma,0,8,"1,981","38.00000000000000000000",F +"Jan 1, 1980 @ 00:00:00.000",Felynda,0,31,"1,980","39.00000000000000000000",F `; export const CSV_RESULT_SCRIPTED_RESORTED = `date,year,name,value,"years_ago" -"Jan 1, 1981 @ 00:00:00.000","1,981",Farbara,"6,456","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Farbara,"8,026","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Fecky,"1,930","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Fecky,"2,071","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Felinda,"1,886","38.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Feth,"3,685","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Feth,"4,246","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Fetty,"1,763","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Fetty,"1,967","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Feverly,"1,987","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Feverly,"2,249","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Fonnie,"2,330","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Fonnie,"2,748","39.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Frenda,"7,162","38.000000000000000000000000000000000" -"Jan 1, 1980 @ 00:00:00.000","1,980",Frenda,"8,335","39.000000000000000000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Farbara,"6,456","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Farbara,"8,026","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fecky,"1,930","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Fecky,"2,071","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Felinda,"1,886","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Feth,"3,685","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Feth,"4,246","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fetty,"1,763","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Fetty,"1,967","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Feverly,"1,987","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Feverly,"2,249","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fonnie,"2,330","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Fonnie,"2,748","39.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Frenda,"7,162","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Frenda,"8,335","39.00000000000000000000" `; export const CSV_RESULT_HUGE = `date,year,name,value,"years_ago" -"Jan 1, 1984 @ 00:00:00.000","1,984",Fobby,"2,791","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Frent,"3,416","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Frett,"2,679","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Filly,"3,366","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Frian,"34,468","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Fenjamin,"7,191","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Frandon,"5,863","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Fruce,"1,855","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Fryan,"7,236","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Frad,"2,482","35.000000000000000000000000000000000" -"Jan 1, 1984 @ 00:00:00.000","1,984",Fradley,"5,175","35.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Fryan,"7,114","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Fradley,"4,752","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Frian,"35,717","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Farbara,"4,434","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Fenjamin,"5,235","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Fruce,"1,914","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Fobby,"2,888","36.000000000000000000000000000000000" -"Jan 1, 1983 @ 00:00:00.000","1,983",Frett,"3,031","36.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Fonnie,"1,853","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Frandy,"2,082","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Fecky,"1,786","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Frandi,"2,056","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Fridget,"1,864","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Farbara,"5,081","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Feth,"2,818","37.000000000000000000000000000000000" -"Jan 1, 1982 @ 00:00:00.000","1,982",Frenda,"6,270","37.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Fetty,"1,763","38.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Fonnie,"2,330","38.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Farbara,"6,456","38.000000000000000000000000000000000" -"Jan 1, 1981 @ 00:00:00.000","1,981",Felinda,"1,886","38.000000000000000000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Fobby,"2,791","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Frent,"3,416","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Frett,"2,679","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Filly,"3,366","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Frian,"34,468","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Fenjamin,"7,191","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Frandon,"5,863","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Fruce,"1,855","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Fryan,"7,236","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Frad,"2,482","35.00000000000000000000" +"Jan 1, 1984 @ 00:00:00.000","1,984",Fradley,"5,175","35.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Fryan,"7,114","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Fradley,"4,752","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Frian,"35,717","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Farbara,"4,434","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Fenjamin,"5,235","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Fruce,"1,914","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Fobby,"2,888","36.00000000000000000000" +"Jan 1, 1983 @ 00:00:00.000","1,983",Frett,"3,031","36.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Fonnie,"1,853","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Frandy,"2,082","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Fecky,"1,786","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Frandi,"2,056","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Fridget,"1,864","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Farbara,"5,081","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Feth,"2,818","37.00000000000000000000" +"Jan 1, 1982 @ 00:00:00.000","1,982",Frenda,"6,270","37.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fetty,"1,763","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fonnie,"2,330","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Farbara,"6,456","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Felinda,"1,886","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Frenda,"7,162","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Feth,"3,685","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Feverly,"1,987","38.00000000000000000000" +"Jan 1, 1981 @ 00:00:00.000","1,981",Fecky,"1,930","38.00000000000000000000" +"Jan 1, 1980 @ 00:00:00.000","1,980",Fonnie,"2,748","39.00000000000000000000" `; // 'UTC' diff --git a/yarn.lock b/yarn.lock index 32ab10c12fa12..367dd86f39077 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5272,10 +5272,10 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@8.10.54", "@types/node@>= 8", "@types/node@>=10.17.17 <10.20.0", "@types/node@>=8.9.0", "@types/node@^12.0.2": - version "10.17.26" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.26.tgz#a8a119960bff16b823be4c617da028570779bcfd" - integrity sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw== +"@types/node@*", "@types/node@12.19.4", "@types/node@8.10.54", "@types/node@>= 8", "@types/node@>=8.9.0", "@types/node@^12.0.2": + version "12.19.4" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.19.4.tgz#cdfbb62e26c7435ed9aab9c941393cc3598e9b46" + integrity sha512-o3oj1bETk8kBwzz1WlO6JWL/AfAA3Vm6J1B3C9CsdxHYp7XgPiH7OEXPUbZTndHlRaIElrANkQfe6ZmfJb3H2w== "@types/nodemailer@^6.2.1": version "6.2.1" @@ -5881,10 +5881,10 @@ "@types/node" "*" chokidar "^2.1.2" -"@types/webpack-env@^1.15.2": - version "1.15.2" - resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.2.tgz#927997342bb9f4a5185a86e6579a0a18afc33b0a" - integrity sha512-67ZgZpAlhIICIdfQrB5fnDvaKFcDxpKibxznfYRVAT4mQE41Dido/3Ty+E3xGBmTogc5+0Qb8tWhna+5B8z1iQ== +"@types/webpack-env@^1.15.2", "@types/webpack-env@^1.15.3": + version "1.15.3" + resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.15.3.tgz#fb602cd4c2f0b7c0fb857e922075fdf677d25d84" + integrity sha512-5oiXqR7kwDGZ6+gmzIO2lTC+QsriNuQXZDWNYRV3l2XRN/zmPgnC21DLSx2D05zvD8vnXW6qUg7JnXZ4I6qLVQ== "@types/webpack-merge@^4.1.5": version "4.1.5"