diff --git a/src/runtimes/node/utils/node_runtime.ts b/src/runtimes/node/utils/node_runtime.ts index 09277f588..8b399ace6 100644 --- a/src/runtimes/node/utils/node_runtime.ts +++ b/src/runtimes/node/utils/node_runtime.ts @@ -4,6 +4,7 @@ const validRuntimeMap = { 14: 'nodejs14.x', 16: 'nodejs16.x', 18: 'nodejs18.x', + 20: 'nodejs20.x', } as const const minimumV2Version = 18 diff --git a/tests/unit/runtimes/node/utils/node_runtime.test.ts b/tests/unit/runtimes/node/utils/node_runtime.test.ts index 6409146ac..bb02afec1 100644 --- a/tests/unit/runtimes/node/utils/node_runtime.test.ts +++ b/tests/unit/runtimes/node/utils/node_runtime.test.ts @@ -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'], @@ -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'],