Skip to content

Commit cec3df6

Browse files
authored
[8.19] chore(NA): upgrade Node.js to v22.21.1 (#244676) (#245189)
# Backport This will backport the following commits from `main` to `8.19`: - [chore(NA): upgrade Node.js to v22.21.1 (#244676)](#244676) <!--- Backport version: 10.2.0 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Tiago Costa","email":"tiago.costa@elastic.co"},"sourceCommit":{"committedDate":"2025-12-04T05:12:44Z","message":"chore(NA): upgrade Node.js to v22.21.1 (#244676)\n\nCloses https://github.com/elastic/kibana-operations/issues/397\n\nhttps://nodejs.org/en/blog/release/v22.21.1\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"13b7001e0b9db5ec0ff6e10eb92fb250b6179781","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","Team:Fleet","backport:version","v9.3.0","Team:obs-ux-management","v9.2.3","v9.1.9","v8.19.9"],"title":"chore(NA): upgrade Node.js to v22.21.1","number":244676,"url":"https://github.com/elastic/kibana/pull/244676","mergeCommit":{"message":"chore(NA): upgrade Node.js to v22.21.1 (#244676)\n\nCloses https://github.com/elastic/kibana-operations/issues/397\n\nhttps://nodejs.org/en/blog/release/v22.21.1\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"13b7001e0b9db5ec0ff6e10eb92fb250b6179781"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1","8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/244676","number":244676,"mergeCommit":{"message":"chore(NA): upgrade Node.js to v22.21.1 (#244676)\n\nCloses https://github.com/elastic/kibana-operations/issues/397\n\nhttps://nodejs.org/en/blog/release/v22.21.1\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"13b7001e0b9db5ec0ff6e10eb92fb250b6179781"}},{"branch":"9.2","label":"v9.2.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.9","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
1 parent 3807fdb commit cec3df6

14 files changed

Lines changed: 73 additions & 123 deletions

File tree

.buildkite/package-lock.json

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

.buildkite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"@types/js-yaml": "^4.0.9",
2323
"@types/minimatch": "^3.0.5",
2424
"@types/minimist": "^1.2.5",
25-
"@types/node": "^22.17.1",
25+
"@types/node": "^22.19.1",
2626
"jest": "^30.0.3",
2727
"nock": "^12.0.2",
2828
"ts-jest": "^29.4.0",

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.17.1
1+
22.21.1

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.17.1
1+
22.21.1

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
"url": "https://github.com/elastic/kibana.git"
7373
},
7474
"engines": {
75-
"node": "22.17.1",
75+
"node": "22.21.1",
7676
"yarn": "^1.22.19"
7777
},
7878
"resolutions": {
7979
"**/@babel/parser": "7.24.7",
8080
"**/@hello-pangea/dnd": "16.6.0",
8181
"**/@langchain/core": "^0.3.57",
8282
"**/@langchain/google-common": "^0.1.8",
83-
"**/@types/node": "22.15.3",
83+
"**/@types/node": "22.19.1",
8484
"**/@typescript-eslint/utils": "8.16.0",
8585
"**/chokidar": "^3.5.3",
8686
"**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1",
@@ -1699,7 +1699,7 @@
16991699
"@types/moment-duration-format": "^2.2.6",
17001700
"@types/mustache": "^4.2.5",
17011701
"@types/nock": "^10.0.3",
1702-
"@types/node": "22.10.5",
1702+
"@types/node": "22.19.1",
17031703
"@types/node-fetch": "2.6.4",
17041704
"@types/node-forge": "^1.3.14",
17051705
"@types/nodemailer": "^7.0.4",

x-pack/platform/plugins/shared/actions/server/lib/get_custom_agents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export function getCustomAgents(
126126
// At this point, we are going to use a proxy, so we need new agents.
127127
// We will though, copy over the calculated ssl options from above, into
128128
// the https agent.
129-
const httpAgent = new HttpProxyAgent(proxySettings.proxyUrl);
129+
const httpAgent = new HttpProxyAgent(proxySettings.proxyUrl) as unknown as HttpAgent;
130130
const httpsAgent = new HttpsProxyAgent({
131131
host: proxyUrl.hostname,
132132
port: Number(proxyUrl.port),

x-pack/platform/plugins/shared/actions/server/lib/request_oauth_client_credentials_token.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ describe('requestOAuthClientCredentialsToken', () => {
6666
"list": Array [],
6767
"map": Object {},
6868
},
69+
"agentKeepAliveTimeoutBuffer": 1000,
6970
"defaultPort": 443,
7071
"freeSockets": Object {},
7172
"keepAlive": false,
@@ -75,8 +76,10 @@ describe('requestOAuthClientCredentialsToken', () => {
7576
"maxSockets": Infinity,
7677
"maxTotalSockets": Infinity,
7778
"options": Object {
79+
"defaultPort": 443,
7880
"noDelay": true,
7981
"path": null,
82+
"protocol": "https:",
8083
"rejectUnauthorized": true,
8184
},
8285
"protocol": "https:",

x-pack/platform/plugins/shared/actions/server/lib/request_oauth_jwt_token.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ describe('requestOAuthJWTToken', () => {
6767
"list": Array [],
6868
"map": Object {},
6969
},
70+
"agentKeepAliveTimeoutBuffer": 1000,
7071
"defaultPort": 443,
7172
"freeSockets": Object {},
7273
"keepAlive": false,
@@ -76,8 +77,10 @@ describe('requestOAuthJWTToken', () => {
7677
"maxSockets": Infinity,
7778
"maxTotalSockets": Infinity,
7879
"options": Object {
80+
"defaultPort": 443,
7981
"noDelay": true,
8082
"path": null,
83+
"protocol": "https:",
8184
"rejectUnauthorized": true,
8285
},
8386
"protocol": "https:",

x-pack/platform/plugins/shared/actions/server/lib/request_oauth_token.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ describe('requestOAuthToken', () => {
7474
"list": Array [],
7575
"map": Object {},
7676
},
77+
"agentKeepAliveTimeoutBuffer": 1000,
7778
"defaultPort": 443,
7879
"freeSockets": Object {},
7980
"keepAlive": false,
@@ -83,8 +84,10 @@ describe('requestOAuthToken', () => {
8384
"maxSockets": Infinity,
8485
"maxTotalSockets": Infinity,
8586
"options": Object {
87+
"defaultPort": 443,
8688
"noDelay": true,
8789
"path": null,
90+
"protocol": "https:",
8891
"rejectUnauthorized": true,
8992
},
9093
"protocol": "https:",

x-pack/platform/plugins/shared/fleet/server/services/epm/registry/requests.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import { appContextService } from '../../app_context';
1414
import { RegistryError, RegistryConnectionError, RegistryResponseError } from '../../../errors';
1515

1616
import { getProxyAgent, getRegistryProxyUrl } from './proxy';
17+
import type { Agent as HttpAgent } from 'http';
18+
import type { Agent as HttpsAgent } from 'https';
1719

1820
type FailedAttemptErrors = pRetry.FailedAttemptError | FetchError | Error;
1921

@@ -121,6 +123,6 @@ export function getFetchOptions(targetUrl: string): RequestInit | undefined {
121123
const logger = appContextService.getLogger();
122124
logger.debug(`Using ${proxyUrl} as proxy for ${targetUrl}`);
123125

124-
options.agent = getProxyAgent({ proxyUrl, targetUrl });
126+
options.agent = getProxyAgent({ proxyUrl, targetUrl }) as unknown as HttpAgent | HttpsAgent;
125127
return options;
126128
}

0 commit comments

Comments
 (0)