From 85fcc7baf6f1162b291858d9821280d25c6a50fd Mon Sep 17 00:00:00 2001 From: Morten Brix Pedersen Date: Fri, 7 Oct 2022 09:11:27 +0200 Subject: [PATCH] Upgrade all code to use NODEJS_16_X instead of NODEJS_12_X. --- .../__snapshots__/dummy-task-definition.test.ts.snap | 2 +- .../__tests__/__snapshots__/authorizations.test.ts.snap | 4 ++-- .../__tests__/__snapshots__/distributions.test.ts.snap | 8 ++++---- ...codepipeline-check-email-parameter-action.test.ts.snap | 2 +- .../codepipeline-check-parameter-action.test.ts.snap | 8 ++++---- .../src/check-parameter-function.ts | 2 +- .../__snapshots__/codepipeline-merge-action.test.ts.snap | 2 +- .../src/merge-branches-function.ts | 2 +- .../__tests__/__snapshots__/image-repository.test.ts.snap | 4 ++-- packages/cdk-container-registry/src/image-repository.ts | 2 +- .../__tests__/__snapshots__/deletable-bucket.test.ts.snap | 2 +- .../src/__tests__/__snapshots__/http-headers.test.ts.snap | 4 ++-- .../__tests__/__snapshots__/origin-mutation.test.ts.snap | 2 +- .../__tests__/__snapshots__/static-website.test.ts.snap | 6 +++--- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/cdk-blue-green-container-deployment/src/__tests__/__snapshots__/dummy-task-definition.test.ts.snap b/packages/cdk-blue-green-container-deployment/src/__tests__/__snapshots__/dummy-task-definition.test.ts.snap index 6cf8ee37e..d9e7c4583 100644 --- a/packages/cdk-blue-green-container-deployment/src/__tests__/__snapshots__/dummy-task-definition.test.ts.snap +++ b/packages/cdk-blue-green-container-deployment/src/__tests__/__snapshots__/dummy-task-definition.test.ts.snap @@ -16,7 +16,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/authorizations.test.ts.snap b/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/authorizations.test.ts.snap index df42c86f4..d78537cae 100644 --- a/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/authorizations.test.ts.snap +++ b/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/authorizations.test.ts.snap @@ -16,7 +16,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", @@ -993,7 +993,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/distributions.test.ts.snap b/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/distributions.test.ts.snap index 4718bd6ff..2c1548ee6 100644 --- a/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/distributions.test.ts.snap +++ b/packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/distributions.test.ts.snap @@ -16,7 +16,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", @@ -78,7 +78,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -1402,7 +1402,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", @@ -1464,7 +1464,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-email-parameter-action.test.ts.snap b/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-email-parameter-action.test.ts.snap index c971b682c..319f017cf 100644 --- a/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-email-parameter-action.test.ts.snap +++ b/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-email-parameter-action.test.ts.snap @@ -236,7 +236,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-parameter-action.test.ts.snap b/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-parameter-action.test.ts.snap index 752383d66..268d1d98e 100644 --- a/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-parameter-action.test.ts.snap +++ b/packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-parameter-action.test.ts.snap @@ -236,7 +236,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, @@ -991,7 +991,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, @@ -1151,7 +1151,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, @@ -1893,7 +1893,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/packages/cdk-codepipeline-check-parameter-action/src/check-parameter-function.ts b/packages/cdk-codepipeline-check-parameter-action/src/check-parameter-function.ts index e0ade023c..0a26127dd 100644 --- a/packages/cdk-codepipeline-check-parameter-action/src/check-parameter-function.ts +++ b/packages/cdk-codepipeline-check-parameter-action/src/check-parameter-function.ts @@ -19,7 +19,7 @@ export interface CheckParamterFunctionProps { export class CheckParameterFunction extends Function { constructor(scope: Construct, id: string, props: CheckParamterFunctionProps) { super(scope, id, { - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', code: Code.fromAsset(path.join(__dirname, 'lambdas', 'check-parameter')), }); diff --git a/packages/cdk-codepipeline-merge-action/src/__tests__/__snapshots__/codepipeline-merge-action.test.ts.snap b/packages/cdk-codepipeline-merge-action/src/__tests__/__snapshots__/codepipeline-merge-action.test.ts.snap index 129e807c9..233058548 100644 --- a/packages/cdk-codepipeline-merge-action/src/__tests__/__snapshots__/codepipeline-merge-action.test.ts.snap +++ b/packages/cdk-codepipeline-merge-action/src/__tests__/__snapshots__/codepipeline-merge-action.test.ts.snap @@ -373,7 +373,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/packages/cdk-codepipeline-merge-action/src/merge-branches-function.ts b/packages/cdk-codepipeline-merge-action/src/merge-branches-function.ts index acaa0c22d..ff8ded543 100644 --- a/packages/cdk-codepipeline-merge-action/src/merge-branches-function.ts +++ b/packages/cdk-codepipeline-merge-action/src/merge-branches-function.ts @@ -19,7 +19,7 @@ export interface MergeBranchesFunctionProps { export class MergeBranchesFunction extends Function { constructor(scope: Construct, id: string, props: MergeBranchesFunctionProps) { super(scope, id, { - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, handler: 'index.handler', code: Code.fromAsset(path.join(__dirname, 'lambdas', 'merge-branches')), }); diff --git a/packages/cdk-container-registry/src/__tests__/__snapshots__/image-repository.test.ts.snap b/packages/cdk-container-registry/src/__tests__/__snapshots__/image-repository.test.ts.snap index 7029f647b..cfd4e78ab 100644 --- a/packages/cdk-container-registry/src/__tests__/__snapshots__/image-repository.test.ts.snap +++ b/packages/cdk-container-registry/src/__tests__/__snapshots__/image-repository.test.ts.snap @@ -28,7 +28,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", @@ -165,7 +165,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", }, "Type": "AWS::Lambda::Function", }, diff --git a/packages/cdk-container-registry/src/image-repository.ts b/packages/cdk-container-registry/src/image-repository.ts index 043f6bdcc..6dcf48d81 100644 --- a/packages/cdk-container-registry/src/image-repository.ts +++ b/packages/cdk-container-registry/src/image-repository.ts @@ -66,7 +66,7 @@ export class ImageRepository extends Repository { const rule = this.onImageScanCompleted(id, { imageTags }); const severityFilter = new Function(this, 'SevierityFilter', { - runtime: Runtime.NODEJS_12_X, + runtime: Runtime.NODEJS_16_X, code: Code.fromAsset(path.join(__dirname, 'lambdas', 'severity-filter')), handler: 'index.handler', }); diff --git a/packages/cdk-deletable-bucket/src/__tests__/__snapshots__/deletable-bucket.test.ts.snap b/packages/cdk-deletable-bucket/src/__tests__/__snapshots__/deletable-bucket.test.ts.snap index 7f2ed54a6..5cc6aa1de 100644 --- a/packages/cdk-deletable-bucket/src/__tests__/__snapshots__/deletable-bucket.test.ts.snap +++ b/packages/cdk-deletable-bucket/src/__tests__/__snapshots__/deletable-bucket.test.ts.snap @@ -61,7 +61,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/http-headers.test.ts.snap b/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/http-headers.test.ts.snap index 3a4811f92..680c5ef07 100644 --- a/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/http-headers.test.ts.snap +++ b/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/http-headers.test.ts.snap @@ -92,7 +92,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", @@ -324,7 +324,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/origin-mutation.test.ts.snap b/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/origin-mutation.test.ts.snap index 221a4cb25..b033ac75e 100644 --- a/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/origin-mutation.test.ts.snap +++ b/packages/cdk-lambda-at-edge-pattern/src/__tests__/__snapshots__/origin-mutation.test.ts.snap @@ -16,7 +16,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 120, }, "Type": "AWS::Lambda::Function", diff --git a/packages/cdk-static-website/src/__tests__/__snapshots__/static-website.test.ts.snap b/packages/cdk-static-website/src/__tests__/__snapshots__/static-website.test.ts.snap index 806a9826e..58cc4ef9f 100644 --- a/packages/cdk-static-website/src/__tests__/__snapshots__/static-website.test.ts.snap +++ b/packages/cdk-static-website/src/__tests__/__snapshots__/static-website.test.ts.snap @@ -29,7 +29,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -320,7 +320,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function", @@ -617,7 +617,7 @@ Object { "Arn", ], }, - "Runtime": "nodejs12.x", + "Runtime": "nodejs16.x", "Timeout": 900, }, "Type": "AWS::Lambda::Function",