Skip to content

Commit 4c49d5d

Browse files
authored
Upgrade Node.js to version 12 (#61587)
1 parent 3412843 commit 4c49d5d

File tree

80 files changed

+520
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+520
-296
lines changed

.ci/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# NOTE: This Dockerfile is ONLY used to run certain tasks in CI. It is not used to run Kibana or as a distributable.
22
# If you're looking for the Kibana Docker image distributable, please see: src/dev/build/tasks/os_packages/docker_generator/templates/dockerfile.template.ts
33

4-
ARG NODE_VERSION=10.22.1
4+
ARG NODE_VERSION=12.19.0
55

66
FROM node:${NODE_VERSION} AS base
77

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.22.1
1+
12.19.0

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.22.1
1+
12.19.0

docs/setup/settings.asciidoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ In addition to this setting, trusted certificates may be specified via <<server-
512512

513513
| `server.ssl.cipherSuites:`
514514
| Details on the format, and the valid options, are available via the
515-
https://www.openssl.org/docs/man1.0.2/apps/ciphers.html#CIPHER-LIST-FORMAT[OpenSSL cipher list format documentation].
516-
*Default: `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`*.
515+
https://www.openssl.org/docs/man1.1.1/man1/ciphers.html#CIPHER-LIST-FORMAT[OpenSSL cipher list format documentation].
516+
*Default: `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`*.
517517

518518
| `server.ssl.clientAuthentication:`
519519
| Controls the behavior in {kib} for requesting a certificate from client
@@ -571,7 +571,7 @@ all http requests to https over the port configured as <<server-port, `server.po
571571

572572
| `server.ssl.supportedProtocols:`
573573
| An array of supported protocols with versions.
574-
Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2`. *Default: TLSv1.1, TLSv1.2*
574+
Valid protocols: `TLSv1`, `TLSv1.1`, `TLSv1.2`, `TLSv1.3`. *Default: TLSv1.1, TLSv1.2, TLSv1.3*
575575

576576
| [[settings-xsrf-whitelist]] `server.xsrf.whitelist:`
577577
| It is not recommended to disable protections for

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"**/@types/hapi__boom": "^7.4.1",
8282
"**/@types/hapi__hapi": "^18.2.6",
8383
"**/@types/hapi__mimos": "4.1.0",
84-
"**/@types/node": ">=10.17.17 <10.20.0",
84+
"**/@types/node": "12.19.4",
8585
"**/cross-fetch/node-fetch": "^2.6.1",
8686
"**/deepmerge": "^4.2.2",
8787
"**/fast-deep-equal": "^3.1.1",
@@ -97,7 +97,7 @@
9797
"**/typescript": "4.0.2"
9898
},
9999
"engines": {
100-
"node": "10.22.1",
100+
"node": "12.19.0",
101101
"yarn": "^1.21.1"
102102
},
103103
"dependencies": {
@@ -497,7 +497,7 @@
497497
"@types/mustache": "^0.8.31",
498498
"@types/ncp": "^2.0.1",
499499
"@types/nock": "^10.0.3",
500-
"@types/node": ">=10.17.17 <10.20.0",
500+
"@types/node": "12.19.4",
501501
"@types/node-fetch": "^2.5.7",
502502
"@types/node-forge": "^0.9.5",
503503
"@types/nodemailer": "^6.2.1",
@@ -560,7 +560,7 @@
560560
"@types/vinyl-fs": "^2.4.11",
561561
"@types/watchpack": "^1.1.5",
562562
"@types/webpack": "^4.41.3",
563-
"@types/webpack-env": "^1.15.2",
563+
"@types/webpack-env": "^1.15.3",
564564
"@types/webpack-merge": "^4.1.5",
565565
"@types/write-pkg": "^3.1.0",
566566
"@types/xml-crypto": "^1.4.1",

packages/kbn-config-schema/src/types/stream_type.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ test('includes namespace in failure', () => {
5757
describe('#defaultValue', () => {
5858
test('returns default when undefined', () => {
5959
const value = new Stream();
60-
expect(schema.stream({ defaultValue: value }).validate(undefined)).toStrictEqual(value);
60+
expect(schema.stream({ defaultValue: value }).validate(undefined)).toMatchInlineSnapshot(`
61+
Stream {
62+
"_events": Object {},
63+
"_eventsCount": 0,
64+
"_maxListeners": undefined,
65+
}
66+
`);
6167
});
6268

6369
test('returns value when specified', () => {

packages/kbn-dev-utils/src/proc_runner/proc.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) {
9191
});
9292

9393
if (stdin) {
94-
childProcess.stdin.end(stdin, 'utf8');
94+
childProcess.stdin!.end(stdin, 'utf8'); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdin will not be null
9595
} else {
96-
childProcess.stdin.end();
96+
childProcess.stdin!.end(); // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdin will not be null
9797
}
9898

9999
let stopCalled = false;
@@ -123,8 +123,8 @@ export function startProc(name: string, options: ProcOptions, log: ToolingLog) {
123123
).pipe(share());
124124

125125
const lines$ = Rx.merge(
126-
observeLines(childProcess.stdout),
127-
observeLines(childProcess.stderr)
126+
observeLines(childProcess.stdout!), // TypeScript note: As long as the proc stdio[1] is 'pipe', then stdout will not be null
127+
observeLines(childProcess.stderr!) // TypeScript note: As long as the proc stdio[1] is 'pipe', then stderr will not be null
128128
).pipe(
129129
tap((line) => log.write(` ${chalk.gray('proc')} [${chalk.gray(name)}] ${line}`)),
130130
share()

packages/kbn-dev-utils/src/tooling_log/__snapshots__/tooling_log_text_writer.test.ts.snap

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/kbn-es-archiver/src/actions/load.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
// are not listened for
4444
const pipeline = (...streams: Readable[]) =>
4545
streams.reduce((source, dest) =>
46-
source.once('error', (error) => dest.emit('error', error)).pipe(dest as any)
46+
source.once('error', (error) => dest.destroy(error)).pipe(dest as any)
4747
);
4848

4949
export async function loadAction({

packages/kbn-es-archiver/src/lib/streams/concat_stream_providers.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ describe('concatStreamProviders() helper', () => {
4444
() =>
4545
new Readable({
4646
read() {
47-
this.emit('error', new Error('foo'));
47+
this.destroy(new Error('foo'));
4848
},
4949
}),
5050
]);

0 commit comments

Comments
 (0)