From cff89556fe722407240151e802ab0e2b28d741ac Mon Sep 17 00:00:00 2001 From: Esteban Pastorino <143179+kitop@users.noreply.github.com> Date: Wed, 29 Nov 2023 09:41:15 -0300 Subject: [PATCH] feat: support node 20 (#1674) --- src/runtimes/node/bundlers/esbuild/bundler_target.ts | 1 + tests/unit/runtimes/node/utils/node_version.test.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/runtimes/node/bundlers/esbuild/bundler_target.ts b/src/runtimes/node/bundlers/esbuild/bundler_target.ts index 44b05f945..0d63992c3 100644 --- a/src/runtimes/node/bundlers/esbuild/bundler_target.ts +++ b/src/runtimes/node/bundlers/esbuild/bundler_target.ts @@ -7,6 +7,7 @@ const versionMap = { 14: 'node14', 16: 'node16', 18: 'node18', + 20: 'node20', } as const type VersionValues = (typeof versionMap)[keyof typeof versionMap] diff --git a/tests/unit/runtimes/node/utils/node_version.test.ts b/tests/unit/runtimes/node/utils/node_version.test.ts index bffaea8c2..c4cd321c0 100644 --- a/tests/unit/runtimes/node/utils/node_version.test.ts +++ b/tests/unit/runtimes/node/utils/node_version.test.ts @@ -12,6 +12,7 @@ describe('getNodeVersion', () => { ['nodejs12.x', 12], ['nodejs16.x', 16], ['nodejs18.x', 18], + ['nodejs20.x', 20], ['18.x', 18], ['node16', 16], ['14.1.1', 14], @@ -27,6 +28,7 @@ describe('parseVersion', () => { ['nodejs14.x', 14], ['nodejs12.x', 12], ['nodejs18.x', 18], + ['nodejs20.x', 20], ['18.x', 18], ['node14', 14], ['14.1.1', 14],