chore: upgrade Lambda runtime nodejs22.x to nodejs24.x (#45)

This commit is contained in:
seahaven-openswe[bot] 2026-07-04 01:25:45 -04:00 • committed by GitHub
parent 21eaa2b5ab
commit 3e869ff373
4 changed files with 22 additions and 22 deletions

View file

@ -11,7 +11,7 @@ updates:
- "patch" - "patch"
ignore: ignore:
# @types/node must track the runtime Node major, not the latest release. # @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 # 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 # 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 # the sanctioned exception to the no-blanket-ignore rule (engineering-handbook

View file

@ -42,17 +42,17 @@ export class DoorUnlockStack extends cdk.Stack {
const unlockHandler = new lambda.Function(this, "UnlockHandler", { const unlockHandler = new lambda.Function(this, "UnlockHandler", {
functionName: "door-unlock-api-unlock", functionName: "door-unlock-api-unlock",
runtime: lambda.Runtime.NODEJS_22_X, runtime: lambda.Runtime.NODEJS_24_X,
architecture: lambda.Architecture.ARM_64, architecture: lambda.Architecture.ARM_64,
handler: "unlock-handler.handler", handler: "unlock-handler.handler",
code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/unlock"), { code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/unlock"), {
bundling: { bundling: {
image: lambda.Runtime.NODEJS_22_X.bundlingImage, image: lambda.Runtime.NODEJS_24_X.bundlingImage,
local: { local: {
tryBundle(outputDir: string) { tryBundle(outputDir: string) {
const { execSync } = require("child_process"); const { execSync } = require("child_process");
execSync( 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; return true;
}, },
@ -71,17 +71,17 @@ export class DoorUnlockStack extends cdk.Stack {
const lockdownHandler = new lambda.Function(this, "LockdownHandler", { const lockdownHandler = new lambda.Function(this, "LockdownHandler", {
functionName: "door-unlock-api-lockdown", functionName: "door-unlock-api-lockdown",
runtime: lambda.Runtime.NODEJS_22_X, runtime: lambda.Runtime.NODEJS_24_X,
architecture: lambda.Architecture.ARM_64, architecture: lambda.Architecture.ARM_64,
handler: "lockdown-handler.handler", handler: "lockdown-handler.handler",
code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/lockdown"), { code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/lockdown"), {
bundling: { bundling: {
image: lambda.Runtime.NODEJS_22_X.bundlingImage, image: lambda.Runtime.NODEJS_24_X.bundlingImage,
local: { local: {
tryBundle(outputDir: string) { tryBundle(outputDir: string) {
const { execSync } = require("child_process"); const { execSync } = require("child_process");
execSync( 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; return true;
}, },
@ -109,17 +109,17 @@ export class DoorUnlockStack extends cdk.Stack {
// the phones while rejecting unauthenticated callers at the gateway. // the phones while rejecting unauthenticated callers at the gateway.
const authorizerHandler = new lambda.Function(this, "AuthorizerHandler", { const authorizerHandler = new lambda.Function(this, "AuthorizerHandler", {
functionName: "door-unlock-api-authorizer", functionName: "door-unlock-api-authorizer",
runtime: lambda.Runtime.NODEJS_22_X, runtime: lambda.Runtime.NODEJS_24_X,
architecture: lambda.Architecture.ARM_64, architecture: lambda.Architecture.ARM_64,
handler: "authorizer-handler.handler", handler: "authorizer-handler.handler",
code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/authorizer"), { code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/authorizer"), {
bundling: { bundling: {
image: lambda.Runtime.NODEJS_22_X.bundlingImage, image: lambda.Runtime.NODEJS_24_X.bundlingImage,
local: { local: {
tryBundle(outputDir: string) { tryBundle(outputDir: string) {
const { execSync } = require("child_process"); const { execSync } = require("child_process");
execSync( 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; return true;
}, },
@ -189,17 +189,17 @@ export class DoorUnlockStack extends cdk.Stack {
const pollerHandler = new lambda.Function(this, "LockdownPoller", { const pollerHandler = new lambda.Function(this, "LockdownPoller", {
functionName: "door-unlock-api-lockdown-poller", functionName: "door-unlock-api-lockdown-poller",
runtime: lambda.Runtime.NODEJS_22_X, runtime: lambda.Runtime.NODEJS_24_X,
architecture: lambda.Architecture.ARM_64, architecture: lambda.Architecture.ARM_64,
handler: "lockdown-poller.handler", handler: "lockdown-poller.handler",
code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/poller"), { code: lambda.Code.fromAsset(path.join(__dirname, "../lambda/poller"), {
bundling: { bundling: {
image: lambda.Runtime.NODEJS_22_X.bundlingImage, image: lambda.Runtime.NODEJS_24_X.bundlingImage,
local: { local: {
tryBundle(outputDir: string) { tryBundle(outputDir: string) {
const { execSync } = require("child_process"); const { execSync } = require("child_process");
execSync( 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; return true;
}, },

16
package-lock.json generated
View file

@ -16,7 +16,7 @@
}, },
"devDependencies": { "devDependencies": {
"@aws-sdk/client-ssm": "^3.1076.0", "@aws-sdk/client-ssm": "^3.1076.0",
"@types/node": "^22.0.0", "@types/node": "^24.0.0",
"@types/source-map-support": "^0.5.10", "@types/source-map-support": "^0.5.10",
"aws-cdk": "^2.1128.1", "aws-cdk": "^2.1128.1",
"esbuild": "^0.28.1", "esbuild": "^0.28.1",
@ -1001,13 +1001,13 @@
} }
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "22.20.0", "version": "24.13.2",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.0.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-24.13.2.tgz",
"integrity": "sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==", "integrity": "sha512-fRa09kZTgu8o71KFcDjUFuc7F+dEbZYZmkI0mg5YBTRs0yMKjYHsq/c0urDKeDb+D5qVgXOdFcuu+DZPKOITwA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~6.21.0" "undici-types": "~7.18.0"
} }
}, },
"node_modules/@types/source-map-support": { "node_modules/@types/source-map-support": {
@ -1508,9 +1508,9 @@
} }
}, },
"node_modules/undici-types": { "node_modules/undici-types": {
"version": "6.21.0", "version": "7.18.2",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
} }

View file

@ -13,7 +13,7 @@
}, },
"devDependencies": { "devDependencies": {
"@aws-sdk/client-ssm": "^3.1076.0", "@aws-sdk/client-ssm": "^3.1076.0",
"@types/node": "^22.0.0", "@types/node": "^24.0.0",
"@types/source-map-support": "^0.5.10", "@types/source-map-support": "^0.5.10",
"aws-cdk": "^2.1128.1", "aws-cdk": "^2.1128.1",
"esbuild": "^0.28.1", "esbuild": "^0.28.1",