Skip to content

Commit

Permalink
feat: add support for node@22 (#140)
Browse files Browse the repository at this point in the history
Co-authored-by: jordan gonzález <30836115+duncanista@users.noreply.github.com>
  • Loading branch information
leon19 and duncanista authored Dec 10, 2024
1 parent 04f69fc commit 59ae2d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions serverless/src/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions serverless/test/layer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"]),
Expand All @@ -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),
Expand Down

0 comments on commit 59ae2d4

Please sign in to comment.