Skip to content

Commit 5ebc0b2

Browse files
committed
feat: change default node version to v22
1 parent 3757b1d commit 5ebc0b2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

packages/zip-it-and-ship-it/src/runtimes/node/bundlers/esbuild/bundler_target.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const versionMap = {
88
16: 'node16',
99
18: 'node18',
1010
20: 'node20',
11+
22: 'node22',
1112
} as const
1213

1314
type VersionValues = (typeof versionMap)[keyof typeof versionMap]

packages/zip-it-and-ship-it/src/runtimes/node/utils/node_version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface NodeVersionSupport {
66
}
77

88
// Must match the default version used in Bitballoon.
9-
export const DEFAULT_NODE_VERSION = 18
9+
export const DEFAULT_NODE_VERSION = 22
1010

1111
export const getNodeVersion = (configVersion?: string) => parseVersion(configVersion) ?? DEFAULT_NODE_VERSION
1212

packages/zip-it-and-ship-it/tests/esbuild.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ describe('esbuild', () => {
3232
await zipFixture('node-module-optional-catch-binding', {
3333
opts: {
3434
archiveFormat: ARCHIVE_FORMAT.NONE,
35-
config: { '*': { nodeBundler: NODE_BUNDLER.ESBUILD, nodeVersion: '18.x' } },
35+
config: { '*': { nodeBundler: NODE_BUNDLER.ESBUILD, nodeVersion: '22.x' } },
3636
},
3737
})
3838

39-
expect(build).toHaveBeenCalledWith(expect.objectContaining({ target: ['node18'] }))
39+
expect(build).toHaveBeenCalledWith(expect.objectContaining({ target: ['node22'] }))
4040
})
4141
})

0 commit comments

Comments
 (0)