diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0a290efe41..1234964255 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -67,6 +67,7 @@ body: attributes: label: AWS Lambda function runtime options: + - 26.x - 24.x - 22.x validations: diff --git a/.github/workflows/bootstrap_region.yml b/.github/workflows/bootstrap_region.yml index 14170135ea..3ce5bc9af5 100644 --- a/.github/workflows/bootstrap_region.yml +++ b/.github/workflows/bootstrap_region.yml @@ -49,7 +49,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 - id: credentials diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml index 26c9090903..5ebed42534 100644 --- a/.github/workflows/make-release.yml +++ b/.github/workflows/make-release.yml @@ -51,7 +51,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 cache: "npm" registry-url: 'https://registry.npmjs.org' - name: Setup dependencies @@ -76,7 +76,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 with: - node-version: 24 + node-version: 26 - name: Verify npm registry propagation run: bash .github/scripts/verify_npm_publish.sh diff --git a/.github/workflows/make-version.yml b/.github/workflows/make-version.yml index b37ac7e1d1..b45363d42c 100644 --- a/.github/workflows/make-version.yml +++ b/.github/workflows/make-version.yml @@ -25,7 +25,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest env: - NODE_VERSION: "24" + NODE_VERSION: "26" outputs: RELEASE_VERSION: ${{ steps.version-n-changelog.outputs.new-version }} steps: diff --git a/.github/workflows/publish_layer.yml b/.github/workflows/publish_layer.yml index 8aaa915a62..02868ae586 100644 --- a/.github/workflows/publish_layer.yml +++ b/.github/workflows/publish_layer.yml @@ -45,7 +45,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 - name: CDK build diff --git a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml index 87933f9362..2e9d5aea45 100644 --- a/.github/workflows/reusable-run-linting-check-and-unit-tests.yml +++ b/.github/workflows/reusable-run-linting-check-and-unit-tests.yml @@ -54,7 +54,7 @@ jobs: NODE_ENV: dev strategy: matrix: - version: [22, 24] + version: [22, 24, 26] # packages/testing is private and intentionally excluded from this publishable package matrix. workspace: ${{ fromJSON(needs.resolve-workspaces.outputs.workspaces) }} fail-fast: false @@ -89,7 +89,7 @@ jobs: name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 cache: "npm" - &setup_dependencies name: Setup dependencies diff --git a/.github/workflows/reusable_deploy_layer_stack.yml b/.github/workflows/reusable_deploy_layer_stack.yml index 31775df9b0..9fbb60d22a 100644 --- a/.github/workflows/reusable_deploy_layer_stack.yml +++ b/.github/workflows/reusable_deploy_layer_stack.yml @@ -83,7 +83,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 - name: Download artifact diff --git a/.github/workflows/reusable_publish_docs.yml b/.github/workflows/reusable_publish_docs.yml index f8dcd7cb7c..1464dad031 100644 --- a/.github/workflows/reusable_publish_docs.yml +++ b/.github/workflows/reusable_publish_docs.yml @@ -54,7 +54,7 @@ jobs: - name: Setup NodeJS uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 cache: "npm" - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 diff --git a/.github/workflows/run-e2e-tests.yml b/.github/workflows/run-e2e-tests.yml index f517f76daf..d2063a8bec 100644 --- a/.github/workflows/run-e2e-tests.yml +++ b/.github/workflows/run-e2e-tests.yml @@ -27,11 +27,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 with: - node-version: 24 + node-version: 26 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 with: @@ -84,7 +84,7 @@ jobs: max-parallel: 25 matrix: package: ${{ fromJSON(needs.resolve-workspaces.outputs.e2e) }} - version: [22, 24] + version: [22, 24, 26] arch: [x86_64, arm64] fail-fast: false steps: @@ -93,11 +93,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 with: - node-version: 24 + node-version: 26 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 with: @@ -129,7 +129,7 @@ jobs: strategy: matrix: package: ${{ fromJSON(needs.resolve-workspaces.outputs.lmi) }} - version: [22, 24] + version: [22, 24, 26] arch: [x86_64, arm64] fail-fast: false steps: @@ -138,11 +138,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 with: - node-version: 24 + node-version: 26 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 with: @@ -205,11 +205,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 with: - node-version: 24 + node-version: 26 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 with: diff --git a/.github/workflows/sweep-stale-e2e-stacks.yml b/.github/workflows/sweep-stale-e2e-stacks.yml index 028864516a..7461ffc0db 100644 --- a/.github/workflows/sweep-stale-e2e-stacks.yml +++ b/.github/workflows/sweep-stale-e2e-stacks.yml @@ -57,11 +57,11 @@ jobs: - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 24 + node-version: 26 - name: Setup dependencies uses: aws-powertools/actions/.github/actions/cached-node-modules@7898dbd71be8083748aa52f07ce5201bb36078ac # v1.6.0 with: - node-version: 24 + node-version: 26 - name: Setup AWS credentials uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0 with: diff --git a/.nvmrc b/.nvmrc index 941ea4863d..6f4247a625 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -lts/krypton \ No newline at end of file +26 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9d575c18ce..ebca3a40c7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,7 +106,7 @@ A maintainer may add a `do-not-merge` label, which blocks the merge until the un Prerequisites: -- **Node.js 24.x**, the version pinned in `.nvmrc`, so `nvm use` or `fnm use` picks it up. npm 11.x ships with it; this is an npm workspaces monorepo, so always install from the repo root rather than from a package directory. +- **Node.js 26.x**, the version pinned in `.nvmrc`, so `nvm use` or `fnm use` picks it up. npm 11.x ships with it; this is an npm workspaces monorepo, so always install from the repo root rather than from a package directory. - **Docker**, only to preview the documentation with `npm run docs:docker:*`. Nothing else in the repo needs it. - **Python 3**, only to preview the documentation without Docker, with `npm run docs:local:*`. - **An AWS account and the AWS CLI**, only to run [end-to-end tests](#end-to-end-tests). @@ -137,7 +137,7 @@ End-to-end tests give us confidence that a Lambda function using our code behave You'll need an [AWS account bootstrapped with CDK](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) and the [AWS CLI installed and configured](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). Then, from the repo root: - `npm run test:e2e -w packages/metrics` runs the end-to-end suites of a single package on the default Node.js runtime. -- `npm run test:e2e:nodejs24x -w packages/metrics` runs the same suites pinned to a specific runtime. +- `npm run test:e2e:nodejs26x -w packages/metrics` runs the same suites pinned to a specific runtime. Node.js 22, 24, and 26 are supported; the default is Node.js 26. ```mermaid sequenceDiagram diff --git a/docs/features/logger.md b/docs/features/logger.md index d7aa8646cf..e4b93165a2 100644 --- a/docs/features/logger.md +++ b/docs/features/logger.md @@ -75,7 +75,7 @@ Check API docs to learn more about [Logger constructor options](https://docs.aws ShoppingCartApiFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Environment: Variables: POWERTOOLS_LOG_LEVEL: WARN diff --git a/docs/features/metrics.md b/docs/features/metrics.md index 85c237f908..672b0e7760 100644 --- a/docs/features/metrics.md +++ b/docs/features/metrics.md @@ -93,7 +93,7 @@ The `Metrics` utility is instantiated outside of the Lambda handler. In doing th HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Environment: Variables: POWERTOOLS_SERVICE_NAME: orders diff --git a/docs/features/tracer.md b/docs/features/tracer.md index 619ee2de59..0830b2d88e 100644 --- a/docs/features/tracer.md +++ b/docs/features/tracer.md @@ -63,7 +63,7 @@ To use it in an ESM project, you can instruct your bundler to use the `require` super(scope, id, props); const handler = new NodejsFunction(this, 'helloWorldFunction', { - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, handler: 'handler', entry: 'src/index.ts', bundling: { @@ -90,7 +90,7 @@ To use it in an ESM project, you can instruct your bundler to use the `require` HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: src/index.handler Metadata: BuildMethod: esbuild @@ -140,7 +140,7 @@ The `Tracer` utility is instantiated outside of the Lambda handler. In doing thi HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/docs/getting-started/lambda-layers.md b/docs/getting-started/lambda-layers.md index efd3e0b179..c46e29cb8f 100644 --- a/docs/getting-started/lambda-layers.md +++ b/docs/getting-started/lambda-layers.md @@ -144,7 +144,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi ); new NodejsFunction(this, 'Function', { - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, // Add the Layer to a Lambda function layers: [powertoolsLayer], code: Code.fromInline(`...`), @@ -192,7 +192,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi ); new NodejsFunction(this, 'Function', { - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, // Add the Layer to a Lambda function layers: [powertoolsLayer], code: Code.fromInline(`...`), @@ -280,7 +280,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi function_name = "lambda_function_name" role = ... handler = "index.handler" - runtime = "nodejs24.x" + runtime = "nodejs26.x" layers = ["arn:aws:lambda:{aws::region}:094274105915:layer:AWSLambdaPowertoolsTypeScriptV2:51"] source_code_hash = filebase64sha256("lambda_function_payload.zip") } @@ -297,7 +297,7 @@ Change `{aws::region}` to your AWS region, e.g. `eu-west-1`, and run the followi resource "aws_lambda_function" "test_lambda" { ... - runtime = "nodejs24.x" + runtime = "nodejs26.x" layers = [data.aws_ssm_parameter.powertools_version.value] } diff --git a/docs/upgrade.md b/docs/upgrade.md index fe4fa3a70f..8d97f954d7 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -78,7 +78,7 @@ Here is an example using `esbuild` bundler. super(scope, id, props); const handler = new NodejsFunction(this, 'helloWorldFunction', { - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, handler: 'handler', entry: 'src/index.ts', bundling: { @@ -105,7 +105,7 @@ Here is an example using `esbuild` bundler. HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: src/index.handler Metadata: BuildMethod: esbuild diff --git a/examples/snippets/batch/templates/sam/dynamodb.yaml b/examples/snippets/batch/templates/sam/dynamodb.yaml index b2769457ad..b61a828718 100644 --- a/examples/snippets/batch/templates/sam/dynamodb.yaml +++ b/examples/snippets/batch/templates/sam/dynamodb.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/batch/templates/sam/kinesis.yaml b/examples/snippets/batch/templates/sam/kinesis.yaml index 6c74b9b468..c0d5b607c8 100644 --- a/examples/snippets/batch/templates/sam/kinesis.yaml +++ b/examples/snippets/batch/templates/sam/kinesis.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/batch/templates/sam/sqs.yaml b/examples/snippets/batch/templates/sam/sqs.yaml index f85cd2c205..ae4664fd3f 100644 --- a/examples/snippets/batch/templates/sam/sqs.yaml +++ b/examples/snippets/batch/templates/sam/sqs.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml b/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml index fb6d3c3570..8a7fa11f02 100644 --- a/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml +++ b/examples/snippets/event-handler/appsync-events/templates/gettingStarted.yaml @@ -5,7 +5,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml b/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml index 43afa8647a..c56b89df1c 100644 --- a/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml +++ b/examples/snippets/event-handler/appsync-graphql/templates/gettingStartedSam.yaml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Environment: Variables: # Powertools for AWS Lambda (TypeScript) env vars: https://docs.aws.amazon.com/powertools/typescript/latest/environment-variables/ diff --git a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts index d37894c4ac..5e8a4458cf 100644 --- a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts +++ b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedCdk.ts @@ -24,7 +24,7 @@ export class BedrockAgentsStack extends Stack { const fn = new NodejsFunction(this, 'AirlineAgentFunction', { functionName: fnName, logGroup, - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, entry: './src/index.ts', handler: 'handler', bundling: { diff --git a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml index 5109ca133d..274ec69615 100644 --- a/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml +++ b/examples/snippets/event-handler/bedrock-agents/templates/gettingStartedSam.yaml @@ -5,7 +5,7 @@ Globals: Function: Timeout: 30 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Resources: HelloWorldFunction: diff --git a/examples/snippets/event-handler/http/templates/api_gateway_rest_api.yml b/examples/snippets/event-handler/http/templates/api_gateway_rest_api.yml index e77dc968b4..4548f6a3f5 100644 --- a/examples/snippets/event-handler/http/templates/api_gateway_rest_api.yml +++ b/examples/snippets/event-handler/http/templates/api_gateway_rest_api.yml @@ -19,7 +19,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/event-handler/http/templates/lambda_furl.yml b/examples/snippets/event-handler/http/templates/lambda_furl.yml index a641416673..b0a317a9bd 100644 --- a/examples/snippets/event-handler/http/templates/lambda_furl.yml +++ b/examples/snippets/event-handler/http/templates/lambda_furl.yml @@ -6,7 +6,7 @@ Globals: Function: Timeout: 5 MemorySize: 256 - Runtime: nodejs24.x + Runtime: nodejs26.x Tracing: Active Environment: Variables: diff --git a/examples/snippets/idempotency/templates/cacheCdk.ts b/examples/snippets/idempotency/templates/cacheCdk.ts index 364fcbb805..c722f994bc 100644 --- a/examples/snippets/idempotency/templates/cacheCdk.ts +++ b/examples/snippets/idempotency/templates/cacheCdk.ts @@ -67,7 +67,7 @@ export class ValkeyStack extends Stack { const fn = new NodejsFunction(this, 'MyFunction', { functionName: fnName, logGroup, - runtime: Runtime.NODEJS_24_X, + runtime: Runtime.NODEJS_26_X, architecture: Architecture.ARM_64, memorySize: 512, timeout: Duration.seconds(30), diff --git a/examples/snippets/idempotency/templates/cacheSam.yml b/examples/snippets/idempotency/templates/cacheSam.yml index 73ed9535c2..2ce7f49bea 100644 --- a/examples/snippets/idempotency/templates/cacheSam.yml +++ b/examples/snippets/idempotency/templates/cacheSam.yml @@ -16,7 +16,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: index.js VpcConfig: # (3)! SecurityGroupIds: diff --git a/examples/snippets/idempotency/templates/tableSam.yaml b/examples/snippets/idempotency/templates/tableSam.yaml index 098823afc4..cdb5ed7814 100644 --- a/examples/snippets/idempotency/templates/tableSam.yaml +++ b/examples/snippets/idempotency/templates/tableSam.yaml @@ -17,7 +17,7 @@ Resources: HelloWorldFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: index.js Policies: - Statement: diff --git a/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml b/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml index b1566b98fe..313831a64f 100644 --- a/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml +++ b/examples/snippets/kafka/templates/advancedBatchSizeConfiguration.yaml @@ -2,7 +2,7 @@ Resources: OrderProcessingFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: index.js Events: KafkaEvent: diff --git a/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml b/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml index 0e24c2f455..3d60f2fc84 100644 --- a/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml +++ b/examples/snippets/kafka/templates/gettingStartedWithMsk.yaml @@ -4,7 +4,7 @@ Resources: KafkaConsumerFunction: Type: AWS::Serverless::Function Properties: - Runtime: nodejs24.x + Runtime: nodejs26.x Handler: index.js Timeout: 30 Events: diff --git a/layers/package.json b/layers/package.json index 1fab40e54c..e4a07235d4 100644 --- a/layers/package.json +++ b/layers/package.json @@ -14,6 +14,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs22x": "echo 'Not Implemented'", "test:e2e:nodejs24x": "echo 'Not Implemented'", + "test:e2e:nodejs26x": "echo 'Not Implemented'", "test:e2e": "vitest --run tests/e2e", "build": "echo 'Not applicable, run `npx cdk synth` instead to build the stack'", "cdk": "cdk", @@ -44,7 +45,7 @@ "source-map-support": "^0.5.21" }, "dependencies": { - "aws-cdk": "^2.1148.0", - "aws-cdk-lib": "^2.275.0" + "aws-cdk": "^2.1149.0", + "aws-cdk-lib": "^2.277.0" } } diff --git a/layers/src/layer-publisher-stack.ts b/layers/src/layer-publisher-stack.ts index 4c3a478a12..e176b02226 100644 --- a/layers/src/layer-publisher-stack.ts +++ b/layers/src/layer-publisher-stack.ts @@ -155,7 +155,11 @@ export class LayerPublisherStack extends Stack { this.lambdaLayerVersion = new LayerVersion(this, 'LambdaPowertoolsLayer', { layerVersionName: props?.layerName, description: `Powertools for AWS Lambda (TypeScript) version ${powertoolsPackageVersion}`, - compatibleRuntimes: [Runtime.NODEJS_22_X, Runtime.NODEJS_24_X], + compatibleRuntimes: [ + Runtime.NODEJS_22_X, + Runtime.NODEJS_24_X, + Runtime.NODEJS_26_X, + ], license: 'MIT-0', compatibleArchitectures: [Architecture.ARM_64, Architecture.X86_64], code: Code.fromAsset(resolve(__dirname), { diff --git a/layers/tests/unit/layer-publisher.test.ts b/layers/tests/unit/layer-publisher.test.ts index 4aa96493bd..71cc390b93 100644 --- a/layers/tests/unit/layer-publisher.test.ts +++ b/layers/tests/unit/layer-publisher.test.ts @@ -33,7 +33,7 @@ describe('Class: LayerPublisherStack', () => { // Assess template.resourceCountIs('AWS::Lambda::LayerVersion', 1); template.hasResourceProperties('AWS::Lambda::LayerVersion', { - CompatibleRuntimes: ['nodejs22.x', 'nodejs24.x'], + CompatibleRuntimes: ['nodejs22.x', 'nodejs24.x', 'nodejs26.x'], LicenseInfo: 'MIT-0', /* CompatibleArchitectures: [ 'x86_64', diff --git a/package-lock.json b/package-lock.json index d25e5b898b..4aa500e37d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,8 +101,8 @@ "version": "2.36.0", "license": "MIT-0", "dependencies": { - "aws-cdk": "^2.1148.0", - "aws-cdk-lib": "^2.275.0" + "aws-cdk": "^2.1149.0", + "aws-cdk-lib": "^2.277.0" }, "bin": { "layer": "bin/layers.js" @@ -214,9 +214,9 @@ } }, "node_modules/@aws-cdk/cloud-assembly-schema": { - "version": "55.4.0", - "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-55.4.0.tgz", - "integrity": "sha512-u+vZLR1ZkmUZdbNRjrHPxpcNLhBHdJwG0bFx5IvEhN1J7AOhx+olWm/7K4e953YnPHr0y3CF2UxQlARqR9/FQg==", + "version": "55.7.0", + "resolved": "https://registry.npmjs.org/@aws-cdk/cloud-assembly-schema/-/cloud-assembly-schema-55.7.0.tgz", + "integrity": "sha512-sgGkFDggs9mKQgUrpnMgCDq/suZ6mVpT1925rpemR1M8wempVtVtbT6WeEWsS15jZoxKY9a9xqSQbyG+BdT5aA==", "bundleDependencies": [ "jsonschema", "semver" @@ -224,7 +224,7 @@ "license": "Apache-2.0", "dependencies": { "jsonschema": "^1.5.0", - "semver": "^7.8.5" + "semver": "^7.8.6" }, "engines": { "node": ">= 18.0.0" @@ -239,7 +239,7 @@ } }, "node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver": { - "version": "7.8.5", + "version": "7.8.6", "inBundle": true, "license": "ISC", "bin": { @@ -3947,9 +3947,9 @@ } }, "node_modules/aws-cdk": { - "version": "2.1148.0", - "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1148.0.tgz", - "integrity": "sha512-G7MqPDzldsFxrVSFxR8Oj3vf8NutokIatJVygW/g/0COjrepsbDjuCP9OB9iN2hOn3QvOSf10qd5K/P3D5TQcQ==", + "version": "2.1149.0", + "resolved": "https://registry.npmjs.org/aws-cdk/-/aws-cdk-2.1149.0.tgz", + "integrity": "sha512-Cj6iGj/lVCf8iSFNZeSjpTbh42yO1uINg9pSYcBJ3wfTwWRk0xQGu2YAi/iON+RWEWGJlJNT+TNewBx05Wd9Sw==", "license": "Apache-2.0", "bin": { "cdk": "bin/cdk" @@ -3959,9 +3959,9 @@ } }, "node_modules/aws-cdk-lib": { - "version": "2.275.0", - "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.275.0.tgz", - "integrity": "sha512-Gjj1tM3dQedhsI7MdwMvULF1PzgEO/zX0KFHU9xwZskkSL9057IZB4fJWm9nL+aaNU3TU+lNt8uB6d8QcZtUpQ==", + "version": "2.277.0", + "resolved": "https://registry.npmjs.org/aws-cdk-lib/-/aws-cdk-lib-2.277.0.tgz", + "integrity": "sha512-xUY16j7p5rsyohZIqxUtk7CswPpagCnDFoYKwwK2w78Of+m2+/EhU5UzI3FbNWeKttKMfwvddhVuah4GGODkAQ==", "bundleDependencies": [ "@aws/cloudformation-validate", "@balena/dockerignore", @@ -3981,8 +3981,8 @@ "@aws-cdk/asset-awscli-v1": "2.2.292", "@aws-cdk/asset-node-proxy-agent-v6": "^2.1.3", "@aws-cdk/cloud-assembly-api": "^2.5.0", - "@aws-cdk/cloud-assembly-schema": "^55.0.0", - "@aws/cloudformation-validate": "1.12.1", + "@aws-cdk/cloud-assembly-schema": "^55.6.0", + "@aws/cloudformation-validate": "1.14.0", "@balena/dockerignore": "^1.0.2", "case": "1.6.3", "fs-extra": "^11.4.1", @@ -3991,7 +3991,7 @@ "mime-types": "^2.1.35", "minimatch": "^10.2.6", "punycode": "^2.3.1", - "semver": "^7.8.5", + "semver": "^7.8.6", "yaml": "1.10.3" }, "engines": { @@ -4018,7 +4018,7 @@ } }, "node_modules/aws-cdk-lib/node_modules/@aws/cloudformation-validate": { - "version": "1.12.1", + "version": "1.14.0", "inBundle": true, "license": "Apache-2.0", "engines": { @@ -4039,7 +4039,7 @@ } }, "node_modules/aws-cdk-lib/node_modules/brace-expansion": { - "version": "5.0.12", + "version": "5.0.13", "inBundle": true, "license": "MIT", "dependencies": { @@ -4149,7 +4149,7 @@ } }, "node_modules/aws-cdk-lib/node_modules/semver": { - "version": "7.8.5", + "version": "7.8.6", "inBundle": true, "license": "ISC", "bin": { @@ -8013,7 +8013,7 @@ "@aws-sdk/client-lambda": "^3.1164.0", "@aws/lambda-invoke-store": "0.3.0", "@smithy/util-utf8": "^4.5.2", - "aws-cdk-lib": "^2.275.0", + "aws-cdk-lib": "^2.277.0", "esbuild": "^0.28.2", "promise-retry": "^2.0.1" }, diff --git a/packages/batch/package.json b/packages/batch/package.json index 91c80b9de3..ed4191ac13 100644 --- a/packages/batch/package.json +++ b/packages/batch/package.json @@ -16,6 +16,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e": "vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:lmi": "vitest --run tests/e2e/lmi.", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", diff --git a/packages/data-masking/package.json b/packages/data-masking/package.json index 23d6ee5f9f..d880b8fe92 100644 --- a/packages/data-masking/package.json +++ b/packages/data-masking/package.json @@ -17,6 +17,7 @@ "test:e2e:nodejs20x": "RUNTIME=nodejs20x vitest --run tests/e2e", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/event-handler/package.json b/packages/event-handler/package.json index 0359a026b7..db6d0c7c8e 100644 --- a/packages/event-handler/package.json +++ b/packages/event-handler/package.json @@ -16,6 +16,7 @@ "test:unit:types": "vitest --run tests/types --typecheck", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/feature-flags/package.json b/packages/feature-flags/package.json index 2c6316eaa2..57201b85cd 100644 --- a/packages/feature-flags/package.json +++ b/packages/feature-flags/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/idempotency/package.json b/packages/idempotency/package.json index 2c9b8cabb1..63844f8125 100644 --- a/packages/idempotency/package.json +++ b/packages/idempotency/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/kafka/package.json b/packages/kafka/package.json index 948c8274b4..13f535a258 100644 --- a/packages/kafka/package.json +++ b/packages/kafka/package.json @@ -16,6 +16,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs22x": "echo 'Not Implemented'", "test:e2e:nodejs24x": "echo 'Not Implemented'", + "test:e2e:nodejs26x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/logger/package.json b/packages/logger/package.json index baab841218..c2a5241fc2 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e": "vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:lmi": "vitest --run tests/e2e/lmi.", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", diff --git a/packages/logger/tests/e2e/lmi.test.ts b/packages/logger/tests/e2e/lmi.test.ts index 8c089b3dfb..3236011aa0 100644 --- a/packages/logger/tests/e2e/lmi.test.ts +++ b/packages/logger/tests/e2e/lmi.test.ts @@ -44,7 +44,7 @@ type IsolationResult = { * overlapping invocations' appended keys would bleed into each other's log * output. * - * Exact environment counts are not asserted. In CI both Node.js versions of + * Exact environment counts are not asserted. In CI all tested Node.js versions of * both LMI suites share one per-architecture capacity provider; pinning the * environments per function keeps the overlap independent of that fleet and * lets the provider carry spare vCPU headroom to replace a failed instance diff --git a/packages/metrics/package.json b/packages/metrics/package.json index 0f475adc0c..4d0f492ac6 100644 --- a/packages/metrics/package.json +++ b/packages/metrics/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e": "vitest --run tests/e2e --exclude '**/tests/e2e/lmi.*'", "test:e2e:lmi": "vitest --run tests/e2e/lmi.", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", diff --git a/packages/metrics/tests/e2e/lmi.test.ts b/packages/metrics/tests/e2e/lmi.test.ts index a99c9146ec..ec626d8279 100644 --- a/packages/metrics/tests/e2e/lmi.test.ts +++ b/packages/metrics/tests/e2e/lmi.test.ts @@ -47,7 +47,7 @@ type InvocationPayload = { * overlapping invocations' metric values and metadata would bleed into each * other's EMF payload. * - * Exact environment counts are not asserted. In CI both Node.js versions of + * Exact environment counts are not asserted. In CI all tested Node.js versions of * both LMI suites share one per-architecture capacity provider; pinning the * environments per function keeps the overlap independent of that fleet and * lets the provider carry spare vCPU headroom to replace a failed instance diff --git a/packages/parameters/package.json b/packages/parameters/package.json index 7c81c1fe03..53190b8eb9 100644 --- a/packages/parameters/package.json +++ b/packages/parameters/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/parser/package.json b/packages/parser/package.json index 6498ed63af..9a8383631e 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "echo 'Not Implemented'", "test:e2e:nodejs24x": "echo 'Not Implemented'", + "test:e2e:nodejs26x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/signer/package.json b/packages/signer/package.json index 9542a51fdc..5ca4949789 100644 --- a/packages/signer/package.json +++ b/packages/signer/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/testing/package.json b/packages/testing/package.json index 040cc01071..a976e005b0 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -132,7 +132,7 @@ "@aws-sdk/client-lambda": "^3.1164.0", "@aws/lambda-invoke-store": "0.3.0", "@smithy/util-utf8": "^4.5.2", - "aws-cdk-lib": "^2.275.0", + "aws-cdk-lib": "^2.277.0", "esbuild": "^0.28.2", "promise-retry": "^2.0.1" }, diff --git a/packages/testing/src/TestInvocationLogs.ts b/packages/testing/src/TestInvocationLogs.ts index 0f864fc7f7..19b0bca3ec 100644 --- a/packages/testing/src/TestInvocationLogs.ts +++ b/packages/testing/src/TestInvocationLogs.ts @@ -7,6 +7,7 @@ const CloudWatchLogKeywords = { INIT_REPORT: 'INIT_REPORT', REPORT: 'REPORT RequestId', START: 'START RequestId', + TLS_PROFILE: '[tls-profile]', XRAY: 'XRAY TraceId', } as const; @@ -69,8 +70,8 @@ class TestInvocationLogs { } /** - * Return only logs from function, exclude INIT_START, START, END, REPORT, - * and X-Ray log generated by the Lambda service. + * Returns handler logs, excluding initialization, invocation, TLS profile, + * and X-Ray diagnostics generated by the Lambda runtime. * * @param {typeof LogLevel} [levelToFilter] - Level to filter the logs * @returns Array of function logs, filtered by level if provided diff --git a/packages/testing/src/constants.ts b/packages/testing/src/constants.ts index 83075eccb1..dca4c2bf1e 100644 --- a/packages/testing/src/constants.ts +++ b/packages/testing/src/constants.ts @@ -3,14 +3,15 @@ import { Architecture, Runtime } from 'aws-cdk-lib/aws-lambda'; /** * The default AWS Lambda runtime to use when none is provided. */ -const defaultRuntime = 'nodejs24x'; +const defaultRuntime = 'nodejs26x'; /** * The AWS Lambda runtimes that are supported by the project. */ const TEST_RUNTIMES = { nodejs22x: Runtime.NODEJS_22_X, - [defaultRuntime]: Runtime.NODEJS_24_X, + nodejs24x: Runtime.NODEJS_24_X, + [defaultRuntime]: Runtime.NODEJS_26_X, } as const; /** diff --git a/packages/testing/src/lmi/sharedCapacityProviderStack.ts b/packages/testing/src/lmi/sharedCapacityProviderStack.ts index b61d0e8cfd..6c9bc09ef4 100644 --- a/packages/testing/src/lmi/sharedCapacityProviderStack.ts +++ b/packages/testing/src/lmi/sharedCapacityProviderStack.ts @@ -14,7 +14,7 @@ import { getRunId } from './naming.js'; * `deploySharedCapacityProvider.ts`) and passes the capacity provider ARN to * the test cells via the `LMI_CAPACITY_PROVIDER_ARN` environment variable. * The capacity provider is architecture-constrained but package- and - * runtime-agnostic: all packages' LMI suites, on both Node.js versions, + * runtime-agnostic: all packages' LMI suites, on all tested Node.js versions, * attach their functions to the same per-architecture capacity provider. * * The stack name is scoped to the workflow run (`LmiShared--`) diff --git a/packages/testing/tests/unit/TestInvocationLogs.test.ts b/packages/testing/tests/unit/TestInvocationLogs.test.ts index a08df997f0..9169178afc 100644 --- a/packages/testing/tests/unit/TestInvocationLogs.test.ts +++ b/packages/testing/tests/unit/TestInvocationLogs.test.ts @@ -95,6 +95,28 @@ describe('getFunctionLogs()', () => { ); }); + it('excludes Node.js 26 TLS profile diagnostics from handler logs', () => { + // Prepare + const runtimeLog = + "[tls-profile] applied 'aws' -> /var/runtime/tls-profiles/commercial-2025.conf"; + const structuredLog = JSON.stringify({ + level: 'INFO', + message: 'The handler mentions [tls-profile] in its log', + }); + const plainLog = 'The handler writes an unstructured log'; + const logs = new TestInvocationLogs( + Buffer.from([runtimeLog, structuredLog, plainLog].join('\n')).toString( + 'base64' + ) + ); + + // Act + const functionLogs = logs.getFunctionLogs(); + + // Assess + expect(functionLogs).toEqual([structuredLog, plainLog]); + }); + it('retrives logs of the given level only', () => { const infoLogs = invocationLogs.getFunctionLogs('INFO'); expect(infoLogs.length).toBe(2); diff --git a/packages/testing/tests/unit/TestNodejs26Function.test.ts b/packages/testing/tests/unit/TestNodejs26Function.test.ts new file mode 100644 index 0000000000..aa178292fb --- /dev/null +++ b/packages/testing/tests/unit/TestNodejs26Function.test.ts @@ -0,0 +1,46 @@ +import { join } from 'node:path'; +import { Template } from 'aws-cdk-lib/assertions'; +import { afterEach, describe, it, vi } from 'vitest'; +import { TestNodejsFunction } from '../../src/resources/TestNodejsFunction.js'; +import { TestStack } from '../../src/TestStack.js'; + +describe('TestNodejsFunction', () => { + afterEach(() => vi.unstubAllEnvs()); + + it.each([ + { architecture: 'x86_64', outputFormat: 'CJS' }, + { architecture: 'arm64', outputFormat: 'CJS' }, + { architecture: 'x86_64', outputFormat: 'ESM' }, + { architecture: 'arm64', outputFormat: 'ESM' }, + ] as const)( + 'bundles and synthesizes a Node.js 26 $outputFormat function on $architecture', + ({ architecture, outputFormat }) => { + // Prepare + vi.stubEnv('RUNTIME', 'nodejs26x'); + vi.stubEnv('ARCH', architecture); + const stack = new TestStack({ + stackNameProps: { stackNamePrefix: 'TEST', testName: 'Nodejs26' }, + }); + + // Act + new TestNodejsFunction( + stack, + { + entry: join( + import.meta.dirname, + 'TestNodejsFunction.test.functionCode.ts' + ), + }, + { nameSuffix: 'Greeting', outputFormat } + ); + const template = Template.fromStack(stack.stack); + + // Assess + template.hasResourceProperties('AWS::Lambda::Function', { + Runtime: 'nodejs26.x', + Architectures: [architecture], + Handler: 'index.handler', + }); + } + ); +}); diff --git a/packages/testing/tests/unit/TestNodejsFunction.test.functionCode.ts b/packages/testing/tests/unit/TestNodejsFunction.test.functionCode.ts new file mode 100644 index 0000000000..8c623325cb --- /dev/null +++ b/packages/testing/tests/unit/TestNodejsFunction.test.functionCode.ts @@ -0,0 +1,4 @@ +/** + * Returns a greeting for the test function. + */ +export const handler = async (): Promise => 'Hello, world!'; diff --git a/packages/tracer/package.json b/packages/tracer/package.json index 3aec53fa62..b953db589f 100644 --- a/packages/tracer/package.json +++ b/packages/tracer/package.json @@ -17,6 +17,7 @@ "test:unit:watch": "vitest tests/unit", "test:e2e:nodejs22x": "RUNTIME=nodejs22x vitest --run tests/e2e", "test:e2e:nodejs24x": "RUNTIME=nodejs24x vitest --run tests/e2e", + "test:e2e:nodejs26x": "RUNTIME=nodejs26x vitest --run tests/e2e", "test:e2e": "vitest --run tests/e2e", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json", diff --git a/packages/validation/package.json b/packages/validation/package.json index 2eaf00f1b6..aa08d475b9 100644 --- a/packages/validation/package.json +++ b/packages/validation/package.json @@ -13,6 +13,7 @@ "test:unit:types": "echo 'Not Implemented'", "test:e2e:nodejs22x": "echo 'Not Implemented'", "test:e2e:nodejs24x": "echo 'Not Implemented'", + "test:e2e:nodejs26x": "echo 'Not Implemented'", "test:e2e": "echo 'Not Implemented'", "build:cjs": "tsc --build tsconfig.cjs.json && echo '{ \"type\": \"commonjs\" }' > lib/cjs/package.json", "build:esm": "tsc --build tsconfig.json && echo '{ \"type\": \"module\" }' > lib/esm/package.json",