From 2b8faadf8a6a3eb766eb62f2b6c7b762a8a60989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorens=20Le=C3=B3n?= Date: Fri, 29 Nov 2024 13:23:27 +0100 Subject: [PATCH] feat: add support for `node@22` --- serverless/src/layer.ts | 3 +++ serverless/test/layer.spec.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/serverless/src/layer.ts b/serverless/src/layer.ts index 7fc008a..407c342 100644 --- a/serverless/src/layer.ts +++ b/serverless/src/layer.ts @@ -52,6 +52,7 @@ export const runtimeLookup: { [key: string]: RuntimeType } = { "nodejs16.x": RuntimeType.NODE, "nodejs18.x": RuntimeType.NODE, "nodejs20.x": RuntimeType.NODE, + "nodejs22.x": RuntimeType.NODE, "python2.7": RuntimeType.PYTHON, "python3.6": RuntimeType.PYTHON, "python3.7": RuntimeType.PYTHON, @@ -76,6 +77,7 @@ export const layerNameLookup: { [key in ArchitectureType]: { [key: string]: stri "nodejs16.x": "Datadog-Node16-x", "nodejs18.x": "Datadog-Node18-x", "nodejs20.x": "Datadog-Node20-x", + "nodejs22.x": "Datadog-Node22-x", "python2.7": "Datadog-Python27", "python3.6": "Datadog-Python36", "python3.7": "Datadog-Python37", @@ -98,6 +100,7 @@ export const layerNameLookup: { [key in ArchitectureType]: { [key: string]: stri "nodejs16.x": "Datadog-Node16-x", "nodejs18.x": "Datadog-Node18-x", "nodejs20.x": "Datadog-Node20-x", + "nodejs22.x": "Datadog-Node22-x", "python3.8": "Datadog-Python38-ARM", "python3.9": "Datadog-Python39-ARM", "python3.10": "Datadog-Python310-ARM", diff --git a/serverless/test/layer.spec.ts b/serverless/test/layer.spec.ts index 30ad0b6..c1cd4ae 100644 --- a/serverless/test/layer.spec.ts +++ b/serverless/test/layer.spec.ts @@ -64,6 +64,7 @@ describe("findLambdas", () => { Node16Function: mockFunctionResource("nodejs16.x", ["x86_64"]), Node18Function: mockFunctionResource("nodejs18.x", ["x86_64"]), Node20Function: mockFunctionResource("nodejs20.x", ["x86_64"]), + Node22Function: mockFunctionResource("nodejs22.x", ["x86_64"]), Python27Function: mockFunctionResource("python2.7", ["x86_64"]), Python36Function: mockFunctionResource("python3.6", ["x86_64"]), Python37Function: mockFunctionResource("python3.7", ["x86_64"]), @@ -90,6 +91,7 @@ describe("findLambdas", () => { mockLambdaFunction("Node16Function", "nodejs16.x", RuntimeType.NODE, "x86_64", ArchitectureType.x86_64), mockLambdaFunction("Node18Function", "nodejs18.x", RuntimeType.NODE, "x86_64", ArchitectureType.x86_64), mockLambdaFunction("Node20Function", "nodejs20.x", RuntimeType.NODE, "x86_64", ArchitectureType.x86_64), + mockLambdaFunction("Node22Function", "nodejs22.x", RuntimeType.NODE, "x86_64", ArchitectureType.x86_64), mockLambdaFunction("Python27Function", "python2.7", RuntimeType.PYTHON, "x86_64", ArchitectureType.x86_64), mockLambdaFunction("Python36Function", "python3.6", RuntimeType.PYTHON, "x86_64", ArchitectureType.x86_64), mockLambdaFunction("Python37Function", "python3.7", RuntimeType.PYTHON, "x86_64", ArchitectureType.x86_64),