Skip to content

Commit

Permalink
feat: support node 20 as a runtime (#1675)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Knott <info@simonknott.de>
  • Loading branch information
kitop and Skn0tt committed Dec 1, 2023
1 parent f146798 commit c7901aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/runtimes/node/utils/node_runtime.ts
Expand Up @@ -4,6 +4,7 @@ const validRuntimeMap = {
14: 'nodejs14.x',
16: 'nodejs16.x',
18: 'nodejs18.x',
20: 'nodejs20.x',
} as const

const minimumV2Version = 18
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/runtimes/node/utils/node_runtime.test.ts
Expand Up @@ -7,6 +7,7 @@ describe('getNodeRuntime', () => {
['nodejs14.x', 'nodejs14.x'],
['nodejs16.x', 'nodejs16.x'],
['nodejs18.x', 'nodejs18.x'],
['nodejs20.x', 'nodejs20.x'],
['14.x', 'nodejs14.x'],
['v16.x', 'nodejs16.x'],
['18.0.0', 'nodejs18.x'],
Expand All @@ -23,12 +24,11 @@ describe('getNodeRuntimeForV2', () => {
['nodejs12.x', 'nodejs18.x'],
['nodejs16.x', 'nodejs18.x'],
['nodejs18.x', 'nodejs18.x'],
// enable once supported
// ['nodejs20.x', 'nodejs20.x'],
['nodejs20.x', 'nodejs20.x'],
['14.x', 'nodejs18.x'],
['v16.x', 'nodejs18.x'],
['18.0.0', 'nodejs18.x'],
// ['20.0.0', 'nodejs20.x'],
['20.0.0', 'nodejs20.x'],
['v14.2.0', 'nodejs18.x'],
['14.1', 'nodejs18.x'],
[':shrug:', 'nodejs18.x'],
Expand Down

1 comment on commit c7901aa

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

  • largeDepsEsbuild: 1.4s
  • largeDepsNft: 5.5s
  • largeDepsZisi: 10.5s

Please sign in to comment.