From 7b17fb3f63e8c713baf908fad71f8b5c394e8203 Mon Sep 17 00:00:00 2001 From: James Kyburz <220678+JamesKyburz@users.noreply.github.com> Date: Mon, 25 Nov 2024 10:30:24 +0000 Subject: [PATCH] fix: add node 22 lts, #fixes 3837 --- .../patches/extensions/all/aws_lambda_function/boto.json | 1 + .../schemas/providers/ap_southeast_4/aws-lambda-function.json | 1 + .../data/schemas/providers/us_east_1/aws-lambda-function.json | 1 + .../templates/good/resources/lambda/required_properties.yaml | 2 +- test/fixtures/templates/good/transform.yaml | 2 +- test/fixtures/templates/good/transform/function_use_s3_uri.yaml | 2 +- .../fixtures/templates/good/transform/function_using_image.yaml | 2 +- test/fixtures/templates/good/transform/list_transform_many.yaml | 2 +- test/fixtures/templates/good/transform_serverless_api.yaml | 2 +- test/fixtures/templates/good/transform_serverless_function.yaml | 2 +- 10 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/cfnlint/data/schemas/patches/extensions/all/aws_lambda_function/boto.json b/src/cfnlint/data/schemas/patches/extensions/all/aws_lambda_function/boto.json index ed8ee6ec64..233968b27a 100644 --- a/src/cfnlint/data/schemas/patches/extensions/all/aws_lambda_function/boto.json +++ b/src/cfnlint/data/schemas/patches/extensions/all/aws_lambda_function/boto.json @@ -27,6 +27,7 @@ "nodejs16.x", "nodejs18.x", "nodejs20.x", + "nodejs22.x", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", diff --git a/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-lambda-function.json b/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-lambda-function.json index 2b6d34bbd6..766fb09230 100644 --- a/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-lambda-function.json +++ b/src/cfnlint/data/schemas/providers/ap_southeast_4/aws-lambda-function.json @@ -410,6 +410,7 @@ "nodejs16.x", "nodejs18.x", "nodejs20.x", + "nodejs22.x", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", diff --git a/src/cfnlint/data/schemas/providers/us_east_1/aws-lambda-function.json b/src/cfnlint/data/schemas/providers/us_east_1/aws-lambda-function.json index 22600e139a..22890891f3 100644 --- a/src/cfnlint/data/schemas/providers/us_east_1/aws-lambda-function.json +++ b/src/cfnlint/data/schemas/providers/us_east_1/aws-lambda-function.json @@ -410,6 +410,7 @@ "nodejs16.x", "nodejs18.x", "nodejs20.x", + "nodejs22.x", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", diff --git a/test/fixtures/templates/good/resources/lambda/required_properties.yaml b/test/fixtures/templates/good/resources/lambda/required_properties.yaml index 146d75b0f2..0e3ffa4071 100644 --- a/test/fixtures/templates/good/resources/lambda/required_properties.yaml +++ b/test/fixtures/templates/good/resources/lambda/required_properties.yaml @@ -19,7 +19,7 @@ Resources: ZipFile: | import { LambdaClient } from '@aws-sdk/client-lambda'; exports.handler = function(event, context) {} - Runtime: nodejs20.x + Runtime: nodejs22.x Function3: # image deployment Type: AWS::Lambda::Function Properties: diff --git a/test/fixtures/templates/good/transform.yaml b/test/fixtures/templates/good/transform.yaml index 155719b287..c10da2a191 100644 --- a/test/fixtures/templates/good/transform.yaml +++ b/test/fixtures/templates/good/transform.yaml @@ -6,7 +6,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: index.handler - Runtime: nodejs20.x + Runtime: nodejs22.x CodeUri: 's3://testBucket/mySourceCode.zip' ExampleLayer: Type: AWS::Serverless::LayerVersion diff --git a/test/fixtures/templates/good/transform/function_use_s3_uri.yaml b/test/fixtures/templates/good/transform/function_use_s3_uri.yaml index cb2119c780..f09f54f9e4 100644 --- a/test/fixtures/templates/good/transform/function_use_s3_uri.yaml +++ b/test/fixtures/templates/good/transform/function_use_s3_uri.yaml @@ -18,7 +18,7 @@ Resources: Properties: FunctionName: !Sub "my-custom-authorizer-${AWS::Region}" Description: Custom authorizer for APIGW - Runtime: nodejs20.x + Runtime: nodejs22.x Handler: index.handler CodeUri: !Sub "s3://custom-authz-${AWS::AccountId}-${AWS::Region}/function-v1.0.zip" Policies: diff --git a/test/fixtures/templates/good/transform/function_using_image.yaml b/test/fixtures/templates/good/transform/function_using_image.yaml index b385eb0639..e85bfa9db1 100644 --- a/test/fixtures/templates/good/transform/function_using_image.yaml +++ b/test/fixtures/templates/good/transform/function_using_image.yaml @@ -6,6 +6,6 @@ Resources: Properties: PackageType: Image Metadata: - DockerTag: nodejs20.x-v1 + DockerTag: nodejs22.x-v1 DockerContext: ./hello-world Dockerfile: Dockerfile diff --git a/test/fixtures/templates/good/transform/list_transform_many.yaml b/test/fixtures/templates/good/transform/list_transform_many.yaml index 3cf54216dd..dd726672db 100644 --- a/test/fixtures/templates/good/transform/list_transform_many.yaml +++ b/test/fixtures/templates/good/transform/list_transform_many.yaml @@ -5,7 +5,7 @@ Transform: Globals: Function: Timeout: 3 - Runtime: nodejs20.x + Runtime: nodejs22.x Environment: Variables: VARIABLE: VALUE diff --git a/test/fixtures/templates/good/transform_serverless_api.yaml b/test/fixtures/templates/good/transform_serverless_api.yaml index 98bbe64907..5b1ceb231d 100644 --- a/test/fixtures/templates/good/transform_serverless_api.yaml +++ b/test/fixtures/templates/good/transform_serverless_api.yaml @@ -6,7 +6,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: index.handler - Runtime: nodejs20.x + Runtime: nodejs22.x CodeUri: 's3://testBucket/mySourceCode.zip' AutoPublishAlias: live DeploymentPreference: diff --git a/test/fixtures/templates/good/transform_serverless_function.yaml b/test/fixtures/templates/good/transform_serverless_function.yaml index 446b73ec17..47439fb580 100644 --- a/test/fixtures/templates/good/transform_serverless_function.yaml +++ b/test/fixtures/templates/good/transform_serverless_function.yaml @@ -10,7 +10,7 @@ Resources: Type: AWS::Serverless::Function Properties: Handler: index.handler - Runtime: nodejs20.x + Runtime: nodejs22.x CodeUri: 's3://testBucket/mySourceCode.zip' AutoPublishAlias: live DeploymentPreference: