From 58f2b627e23dc21f9c3ba57f7ec5d615f0b1c0c7 Mon Sep 17 00:00:00 2001 From: "seahaven-openswe[bot]" <296972425+seahaven-openswe[bot]@users.noreply.github.com> Date: Sat, 4 Jul 2026 01:25:45 -0400 Subject: [PATCH] chore: upgrade Lambda runtime nodejs22.x to nodejs24.x (#45) --- .github/dependabot.yml | 2 +- lib/door-unlock-stack.ts | 24 ++++++++++++------------ package-lock.json | 16 ++++++++-------- package.json | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e16a0c7..5220ffa 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,7 +11,7 @@ updates: - "patch" ignore: # @types/node must track the runtime Node major, not the latest release. - # This stack's Lambdas run on nodejs22.x, so @types/node is pinned to ^22. + # This stack's Lambdas run on nodejs24.x, so @types/node is pinned to ^24. # Dependabot can't see the Lambda runtime and a too-new types major still # compiles, so a major bump passes CI while being wrong at runtime. This is # the sanctioned exception to the no-blanket-ignore rule (engineering-handbook diff --git a/lib/door-unlock-stack.ts b/lib/door-unlock-stack.ts index 4a9ca4e..269033a 100644 --- a/lib/door-unlock-stack.ts +++ b/lib/door-unlock-stack.ts @@ -42,17 +42,17 @@ export class DoorUnlockStack extends cdk.Stack { const unlockHandler = new lambda.Function(this, "UnlockHandler", { functionName: "door-unlock-api-unlock", - runtime: lambda.Runtime.NODEJS_22_X, + runtime: lambda.Runtime.NODEJS_24_X, architecture: lambda.Architecture.ARM_64, handler: "unlock-handler.handler", code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/unlock"), { bundling: { - image: lambda.Runtime.NODEJS_22_X.bundlingImage, + image: lambda.Runtime.NODEJS_24_X.bundlingImage, local: { tryBundle(outputDir: string) { const { execSync } = require("child_process"); execSync( - `esbuild ${path.join(__dirname, "../lambda/unlock/unlock-handler.ts")} --bundle --platform=node --target=node22 --outfile=${path.join(outputDir, "unlock-handler.js")} --external:@aws-sdk/*` + `esbuild ${path.join(__dirname, "../lambda/unlock/unlock-handler.ts")} --bundle --platform=node --target=node24 --outfile=${path.join(outputDir, "unlock-handler.js")} --external:@aws-sdk/*` ); return true; }, @@ -71,17 +71,17 @@ export class DoorUnlockStack extends cdk.Stack { const lockdownHandler = new lambda.Function(this, "LockdownHandler", { functionName: "door-unlock-api-lockdown", - runtime: lambda.Runtime.NODEJS_22_X, + runtime: lambda.Runtime.NODEJS_24_X, architecture: lambda.Architecture.ARM_64, handler: "lockdown-handler.handler", code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/lockdown"), { bundling: { - image: lambda.Runtime.NODEJS_22_X.bundlingImage, + image: lambda.Runtime.NODEJS_24_X.bundlingImage, local: { tryBundle(outputDir: string) { const { execSync } = require("child_process"); execSync( - `esbuild ${path.join(__dirname, "../lambda/lockdown/lockdown-handler.ts")} --bundle --platform=node --target=node22 --outfile=${path.join(outputDir, "lockdown-handler.js")} --external:@aws-sdk/*` + `esbuild ${path.join(__dirname, "../lambda/lockdown/lockdown-handler.ts")} --bundle --platform=node --target=node24 --outfile=${path.join(outputDir, "lockdown-handler.js")} --external:@aws-sdk/*` ); return true; }, @@ -109,17 +109,17 @@ export class DoorUnlockStack extends cdk.Stack { // the phones while rejecting unauthenticated callers at the gateway. const authorizerHandler = new lambda.Function(this, "AuthorizerHandler", { functionName: "door-unlock-api-authorizer", - runtime: lambda.Runtime.NODEJS_22_X, + runtime: lambda.Runtime.NODEJS_24_X, architecture: lambda.Architecture.ARM_64, handler: "authorizer-handler.handler", code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/authorizer"), { bundling: { - image: lambda.Runtime.NODEJS_22_X.bundlingImage, + image: lambda.Runtime.NODEJS_24_X.bundlingImage, local: { tryBundle(outputDir: string) { const { execSync } = require("child_process"); execSync( - `esbuild ${path.join(__dirname, "../lambda/authorizer/authorizer-handler.ts")} --bundle --platform=node --target=node22 --outfile=${path.join(outputDir, "authorizer-handler.js")} --external:@aws-sdk/*` + `esbuild ${path.join(__dirname, "../lambda/authorizer/authorizer-handler.ts")} --bundle --platform=node --target=node24 --outfile=${path.join(outputDir, "authorizer-handler.js")} --external:@aws-sdk/*` ); return true; }, @@ -189,17 +189,17 @@ export class DoorUnlockStack extends cdk.Stack { const pollerHandler = new lambda.Function(this, "LockdownPoller", { functionName: "door-unlock-api-lockdown-poller", - runtime: lambda.Runtime.NODEJS_22_X, + runtime: lambda.Runtime.NODEJS_24_X, architecture: lambda.Architecture.ARM_64, handler: "lockdown-poller.handler", code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/poller"), { bundling: { - image: lambda.Runtime.NODEJS_22_X.bundlingImage, + image: lambda.Runtime.NODEJS_24_X.bundlingImage, local: { tryBundle(outputDir: string) { const { execSync } = require("child_process"); execSync( - `esbuild ${path.join(__dirname, "../lambda/poller/lockdown-poller.ts")} --bundle --platform=node --target=node22 --outfile=${path.join(outputDir, "lockdown-poller.js")} --external:@aws-sdk/*` + `esbuild ${path.join(__dirname, "../lambda/poller/lockdown-poller.ts")} --bundle --platform=node --target=node24 --outfile=${path.join(outputDir, "lockdown-poller.js")} --external:@aws-sdk/*` ); return true; }, diff --git a/package-lock.json b/package-lock.json index c8e3046..180b5df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ }, "devDependencies": { "@aws-sdk/client-ssm": "^3.1076.0", - "@types/node": "^22.0.0", + "@types/node": "^24.0.0", "@types/source-map-support": "^0.5.10", "aws-cdk": "^2.1128.1", "esbuild": "^0.28.1", @@ -1001,13 +1001,13 @@ } }, "node_modules/@types/node": { - "version": "22.20.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz", - "integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==", + "version": "24.13.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz", + "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": "~7.18.0" } }, "node_modules/@types/source-map-support": { @@ -1508,9 +1508,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", + "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", "dev": true, "license": "MIT" } diff --git a/package.json b/package.json index 05114e7..844d6f1 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "@aws-sdk/client-ssm": "^3.1076.0", - "@types/node": "^22.0.0", + "@types/node": "^24.0.0", "@types/source-map-support": "^0.5.10", "aws-cdk": "^2.1128.1", "esbuild": "^0.28.1",