From 08962670170608955cffcd8562d7524f54bba51a Mon Sep 17 00:00:00 2001 From: akash1810 Date: Wed, 27 Nov 2024 08:24:30 +0000 Subject: [PATCH] feat: Update to Node 22 --- .nvmrc | 2 +- .../lib/__snapshots__/example-typescript-lambda.test.ts.snap | 2 +- packages/cdk/lib/example-typescript-lambda.ts | 2 +- packages/lambda/package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.nvmrc b/.nvmrc index ee09fac..bb8c76c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.11.1 +v22.11.0 diff --git a/packages/cdk/lib/__snapshots__/example-typescript-lambda.test.ts.snap b/packages/cdk/lib/__snapshots__/example-typescript-lambda.test.ts.snap index f2f394b..cc6b00a 100644 --- a/packages/cdk/lib/__snapshots__/example-typescript-lambda.test.ts.snap +++ b/packages/cdk/lib/__snapshots__/example-typescript-lambda.test.ts.snap @@ -50,7 +50,7 @@ exports[`The ExampleTypescriptLambda stack matches the snapshot 1`] = ` "Arn", ], }, - "Runtime": "nodejs20.x", + "Runtime": "nodejs22.x", "Tags": [ { "Key": "App", diff --git a/packages/cdk/lib/example-typescript-lambda.ts b/packages/cdk/lib/example-typescript-lambda.ts index 43b89b2..da51ed9 100644 --- a/packages/cdk/lib/example-typescript-lambda.ts +++ b/packages/cdk/lib/example-typescript-lambda.ts @@ -38,7 +38,7 @@ export class ExampleTypescriptLambda extends GuStack { * * Should align with `.nvmrc` at the root of the repository. */ - runtime: Runtime.NODEJS_20_X, + runtime: Runtime.NODEJS_22_X, /** * The architecture of the lambda function. diff --git a/packages/lambda/package.json b/packages/lambda/package.json index d50367d..dd0b86b 100644 --- a/packages/lambda/package.json +++ b/packages/lambda/package.json @@ -6,7 +6,7 @@ "test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --detectOpenHandles --config ../../jest.config.js --selectProjects lambda", "start": "tsx --env-file=.env src/run-locally.ts", "prebuild": "rm -rf dist", - "build": "esbuild src/index.ts --bundle --platform=node --target=node20 --outdir=dist", + "build": "esbuild src/index.ts --bundle --platform=node --target=node22 --outdir=dist", "postbuild": "cd dist && zip -r example-typescript-lambda.zip ." }, "devDependencies": {