From 7945ed2de43cae94f36f373096e67df046ec1deb Mon Sep 17 00:00:00 2001 From: mrickard Date: Wed, 12 Jul 2023 16:10:35 -0400 Subject: [PATCH 1/6] feat: Added support for Node 20 Signed-off-by: mrickard --- README.md | 1 + src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 64ae8304..c5a09036 100644 --- a/README.md +++ b/README.md @@ -365,6 +365,7 @@ This plugin currently supports the following AWS runtimes: - nodejs14.x - nodejs16.x - nodejs18.x +- nodejs20.x - python3.7 - python3.8 - python3.9 diff --git a/src/index.ts b/src/index.ts index 7239c4a2..3f54d655 100644 --- a/src/index.ts +++ b/src/index.ts @@ -30,6 +30,7 @@ const wrappableRuntimeList = [ "nodejs14.x", "nodejs16.x", "nodejs18.x", + "nodejs20.x", "python3.7", "python3.8", "python3.9", @@ -750,7 +751,7 @@ or make sure that you already have Serverless 3.x installed in your project. } private getHandlerWrapper(runtime: string, handler: string) { - if (["nodejs14.x", "nodejs16.x", "nodejs18.x"].indexOf(runtime) !== -1) { + if (["nodejs14.x", "nodejs16.x", "nodejs18.x", "nodejs20.x"].indexOf(runtime) !== -1) { return "newrelic-lambda-wrapper.handler"; } From 3a3cd8e72398b76a0d96479b00cea6e92a22f7f4 Mon Sep 17 00:00:00 2001 From: mrickard Date: Thu, 16 Nov 2023 12:49:19 -0500 Subject: [PATCH 2/6] chore: Updated test fixtures Signed-off-by: mrickard --- src/index.ts | 6 +++++- tests/fixtures/arm64.output.service.json | 4 ++-- tests/fixtures/debug-log-level.output.service.json | 4 ++-- tests/fixtures/debug.output.service.json | 4 ++-- .../distributed-tracing-enabled.output.service.json | 4 ++-- tests/fixtures/eu.output.service.json | 4 ++-- tests/fixtures/function-has-layers.output.service.json | 4 ++-- tests/fixtures/include.output.service.json | 2 +- .../includes-all-provider-layer.output.service.json | 2 +- .../fixtures/lambda-extension-disabled.output.service.json | 4 ++-- tests/fixtures/lambda-extension-enabled.output.service.json | 4 ++-- .../license-key-secret-disabled.output.service.json | 4 ++-- tests/fixtures/log-disabled.output.service.json | 4 ++-- .../log-ingestion-via-extension.output.service.json | 4 ++-- tests/fixtures/log-level.output.service.json | 4 ++-- tests/fixtures/manual-wrapping.output.service.json | 2 +- .../provider-environment-log-level.output.service.json | 4 ++-- tests/fixtures/provider-environment.output.service.json | 4 ++-- tests/fixtures/provider-layer.output.service.json | 2 +- tests/fixtures/proxy.output.service.json | 4 ++-- tests/fixtures/stage-included.output.service.json | 4 ++-- .../trusted-account-key-excluded.output.service.json | 4 ++-- .../trusted-account-key-included.output.service.json | 4 ++-- 23 files changed, 45 insertions(+), 41 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3f54d655..ffb0aa08 100644 --- a/src/index.ts +++ b/src/index.ts @@ -751,7 +751,11 @@ or make sure that you already have Serverless 3.x installed in your project. } private getHandlerWrapper(runtime: string, handler: string) { - if (["nodejs14.x", "nodejs16.x", "nodejs18.x", "nodejs20.x"].indexOf(runtime) !== -1) { + if ( + ["nodejs14.x", "nodejs16.x", "nodejs18.x", "nodejs20.x"].indexOf( + runtime + ) !== -1 + ) { return "newrelic-lambda-wrapper.handler"; } diff --git a/tests/fixtures/arm64.output.service.json b/tests/fixtures/arm64.output.service.json index 74bf2bcb..91ae688c 100644 --- a/tests/fixtures/arm64.output.service.json +++ b/tests/fixtures/arm64.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16XARM64:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16XARM64:73" ], "package": { "exclude": [ @@ -52,7 +52,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:48" ], "package": { "exclude": [ diff --git a/tests/fixtures/debug-log-level.output.service.json b/tests/fixtures/debug-log-level.output.service.json index bc946bd8..d7a46ddd 100644 --- a/tests/fixtures/debug-log-level.output.service.json +++ b/tests/fixtures/debug-log-level.output.service.json @@ -32,7 +32,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -54,7 +54,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/debug.output.service.json b/tests/fixtures/debug.output.service.json index d484c7d1..e56b52ec 100644 --- a/tests/fixtures/debug.output.service.json +++ b/tests/fixtures/debug.output.service.json @@ -53,7 +53,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -75,7 +75,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/distributed-tracing-enabled.output.service.json b/tests/fixtures/distributed-tracing-enabled.output.service.json index c1ba8c67..49f68513 100644 --- a/tests/fixtures/distributed-tracing-enabled.output.service.json +++ b/tests/fixtures/distributed-tracing-enabled.output.service.json @@ -26,7 +26,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -50,7 +50,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/eu.output.service.json b/tests/fixtures/eu.output.service.json index c288cc9e..a52c373a 100644 --- a/tests/fixtures/eu.output.service.json +++ b/tests/fixtures/eu.output.service.json @@ -29,7 +29,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -55,7 +55,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/function-has-layers.output.service.json b/tests/fixtures/function-has-layers.output.service.json index 300eedd2..57d52307 100644 --- a/tests/fixtures/function-has-layers.output.service.json +++ b/tests/fixtures/function-has-layers.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "name": "aws", "stage": "prod", @@ -46,7 +46,7 @@ "runtime": "nodejs18.x", "layers": [ "arn:aws:lambda:us-east-1:123456789012:layer:SomeOtherLayer:1", - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ] }, "layer-nodejs18x2": { diff --git a/tests/fixtures/include.output.service.json b/tests/fixtures/include.output.service.json index 14eee9eb..69e85f44 100644 --- a/tests/fixtures/include.output.service.json +++ b/tests/fixtures/include.output.service.json @@ -43,7 +43,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": [ "./**", diff --git a/tests/fixtures/includes-all-provider-layer.output.service.json b/tests/fixtures/includes-all-provider-layer.output.service.json index a24aa95b..9c4d2c33 100644 --- a/tests/fixtures/includes-all-provider-layer.output.service.json +++ b/tests/fixtures/includes-all-provider-layer.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "name": "aws", "stage": "prod", diff --git a/tests/fixtures/lambda-extension-disabled.output.service.json b/tests/fixtures/lambda-extension-disabled.output.service.json index ebd4f3e9..54b0e077 100644 --- a/tests/fixtures/lambda-extension-disabled.output.service.json +++ b/tests/fixtures/lambda-extension-disabled.output.service.json @@ -25,7 +25,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/lambda-extension-enabled.output.service.json b/tests/fixtures/lambda-extension-enabled.output.service.json index f9dc02d9..1230d06d 100644 --- a/tests/fixtures/lambda-extension-enabled.output.service.json +++ b/tests/fixtures/lambda-extension-enabled.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -47,7 +47,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/license-key-secret-disabled.output.service.json b/tests/fixtures/license-key-secret-disabled.output.service.json index 239c3fa6..d5aec226 100644 --- a/tests/fixtures/license-key-secret-disabled.output.service.json +++ b/tests/fixtures/license-key-secret-disabled.output.service.json @@ -25,7 +25,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": [ @@ -53,7 +53,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": [ diff --git a/tests/fixtures/log-disabled.output.service.json b/tests/fixtures/log-disabled.output.service.json index 99e71402..bc028753 100644 --- a/tests/fixtures/log-disabled.output.service.json +++ b/tests/fixtures/log-disabled.output.service.json @@ -31,7 +31,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -50,7 +50,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/log-ingestion-via-extension.output.service.json b/tests/fixtures/log-ingestion-via-extension.output.service.json index 0ae1b6b6..74f3203c 100644 --- a/tests/fixtures/log-ingestion-via-extension.output.service.json +++ b/tests/fixtures/log-ingestion-via-extension.output.service.json @@ -28,7 +28,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": [ @@ -57,7 +57,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": [ diff --git a/tests/fixtures/log-level.output.service.json b/tests/fixtures/log-level.output.service.json index 64ca2046..34f92ecb 100644 --- a/tests/fixtures/log-level.output.service.json +++ b/tests/fixtures/log-level.output.service.json @@ -31,7 +31,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -53,7 +53,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/manual-wrapping.output.service.json b/tests/fixtures/manual-wrapping.output.service.json index 1553ab8f..b49b201e 100644 --- a/tests/fixtures/manual-wrapping.output.service.json +++ b/tests/fixtures/manual-wrapping.output.service.json @@ -40,7 +40,7 @@ ], "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "name": "aws", "region": "us-east-1", diff --git a/tests/fixtures/provider-environment-log-level.output.service.json b/tests/fixtures/provider-environment-log-level.output.service.json index 9158e722..c8c6f964 100644 --- a/tests/fixtures/provider-environment-log-level.output.service.json +++ b/tests/fixtures/provider-environment-log-level.output.service.json @@ -34,7 +34,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -56,7 +56,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/provider-environment.output.service.json b/tests/fixtures/provider-environment.output.service.json index c5be52cf..dda71b0b 100644 --- a/tests/fixtures/provider-environment.output.service.json +++ b/tests/fixtures/provider-environment.output.service.json @@ -33,7 +33,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -55,7 +55,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/provider-layer.output.service.json b/tests/fixtures/provider-layer.output.service.json index 4b7ec572..41ba833e 100644 --- a/tests/fixtures/provider-layer.output.service.json +++ b/tests/fixtures/provider-layer.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "name": "aws", "stage": "prod", diff --git a/tests/fixtures/proxy.output.service.json b/tests/fixtures/proxy.output.service.json index 1411487d..6f9e125e 100644 --- a/tests/fixtures/proxy.output.service.json +++ b/tests/fixtures/proxy.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": [ @@ -52,7 +52,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": [ diff --git a/tests/fixtures/stage-included.output.service.json b/tests/fixtures/stage-included.output.service.json index e8cda2c3..13afb93f 100644 --- a/tests/fixtures/stage-included.output.service.json +++ b/tests/fixtures/stage-included.output.service.json @@ -30,7 +30,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/trusted-account-key-excluded.output.service.json b/tests/fixtures/trusted-account-key-excluded.output.service.json index a18f7b58..9feda615 100644 --- a/tests/fixtures/trusted-account-key-excluded.output.service.json +++ b/tests/fixtures/trusted-account-key-excluded.output.service.json @@ -29,7 +29,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -48,7 +48,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/trusted-account-key-included.output.service.json b/tests/fixtures/trusted-account-key-included.output.service.json index 6a02705b..e19eccf5 100644 --- a/tests/fixtures/trusted-account-key-included.output.service.json +++ b/tests/fixtures/trusted-account-key-included.output.service.json @@ -30,7 +30,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:72" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:47" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], From e2d51b2362ca4e192e92927e3521c8dfefba8377 Mon Sep 17 00:00:00 2001 From: mrickard Date: Wed, 29 Nov 2023 14:41:48 -0500 Subject: [PATCH 3/6] chore(security): Updated semver to 7.5.4 Signed-off-by: mrickard --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c6026136..61e63f8b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "lodash": "^4.17.21", "node-fetch": "^2.6.7", "path": "^0.12.7", - "semver": "^7.3.5", + "semver": "^7.5.4", "serverless": "^3.19.0" } }, diff --git a/package.json b/package.json index 5c76e943..6ccc7153 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "lodash": "^4.17.21", "node-fetch": "^2.6.7", "path": "^0.12.7", - "semver": "^7.3.5", + "semver": "^7.5.4", "serverless": "^3.19.0" }, "keywords": [ From d2d746e1bd56625f39e210ef8ce497ad654c3fb0 Mon Sep 17 00:00:00 2001 From: mrickard Date: Wed, 29 Nov 2023 14:49:19 -0500 Subject: [PATCH 4/6] chore(test): Updated test fixtures Signed-off-by: mrickard --- tests/fixtures/arm64.output.service.json | 4 ++-- tests/fixtures/debug-log-level.output.service.json | 4 ++-- tests/fixtures/debug.output.service.json | 4 ++-- .../fixtures/distributed-tracing-enabled.output.service.json | 4 ++-- tests/fixtures/eu.output.service.json | 4 ++-- tests/fixtures/function-has-layers.output.service.json | 4 ++-- tests/fixtures/include.output.service.json | 2 +- .../fixtures/includes-all-provider-layer.output.service.json | 2 +- tests/fixtures/lambda-extension-disabled.output.service.json | 4 ++-- tests/fixtures/lambda-extension-enabled.output.service.json | 4 ++-- .../fixtures/license-key-secret-disabled.output.service.json | 4 ++-- tests/fixtures/log-disabled.output.service.json | 4 ++-- .../fixtures/log-ingestion-via-extension.output.service.json | 4 ++-- tests/fixtures/log-level.output.service.json | 4 ++-- tests/fixtures/manual-wrapping.output.service.json | 2 +- .../provider-environment-log-level.output.service.json | 4 ++-- tests/fixtures/provider-environment.output.service.json | 4 ++-- tests/fixtures/provider-layer.output.service.json | 2 +- tests/fixtures/proxy.output.service.json | 4 ++-- tests/fixtures/stage-included.output.service.json | 4 ++-- .../fixtures/trusted-account-key-excluded.output.service.json | 4 ++-- .../fixtures/trusted-account-key-included.output.service.json | 4 ++-- 22 files changed, 40 insertions(+), 40 deletions(-) diff --git a/tests/fixtures/arm64.output.service.json b/tests/fixtures/arm64.output.service.json index 91ae688c..b507084d 100644 --- a/tests/fixtures/arm64.output.service.json +++ b/tests/fixtures/arm64.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16XARM64:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16XARM64:76" ], "package": { "exclude": [ @@ -52,7 +52,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:51" ], "package": { "exclude": [ diff --git a/tests/fixtures/debug-log-level.output.service.json b/tests/fixtures/debug-log-level.output.service.json index d7a46ddd..8d7222c4 100644 --- a/tests/fixtures/debug-log-level.output.service.json +++ b/tests/fixtures/debug-log-level.output.service.json @@ -32,7 +32,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -54,7 +54,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/debug.output.service.json b/tests/fixtures/debug.output.service.json index e56b52ec..4148f5a2 100644 --- a/tests/fixtures/debug.output.service.json +++ b/tests/fixtures/debug.output.service.json @@ -53,7 +53,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -75,7 +75,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/distributed-tracing-enabled.output.service.json b/tests/fixtures/distributed-tracing-enabled.output.service.json index 49f68513..1d02e08b 100644 --- a/tests/fixtures/distributed-tracing-enabled.output.service.json +++ b/tests/fixtures/distributed-tracing-enabled.output.service.json @@ -26,7 +26,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -50,7 +50,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/eu.output.service.json b/tests/fixtures/eu.output.service.json index a52c373a..96ae81e7 100644 --- a/tests/fixtures/eu.output.service.json +++ b/tests/fixtures/eu.output.service.json @@ -29,7 +29,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -55,7 +55,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/function-has-layers.output.service.json b/tests/fixtures/function-has-layers.output.service.json index 57d52307..81ce8bd8 100644 --- a/tests/fixtures/function-has-layers.output.service.json +++ b/tests/fixtures/function-has-layers.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "name": "aws", "stage": "prod", @@ -46,7 +46,7 @@ "runtime": "nodejs18.x", "layers": [ "arn:aws:lambda:us-east-1:123456789012:layer:SomeOtherLayer:1", - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ] }, "layer-nodejs18x2": { diff --git a/tests/fixtures/include.output.service.json b/tests/fixtures/include.output.service.json index 69e85f44..fbbbb17b 100644 --- a/tests/fixtures/include.output.service.json +++ b/tests/fixtures/include.output.service.json @@ -43,7 +43,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": [ "./**", diff --git a/tests/fixtures/includes-all-provider-layer.output.service.json b/tests/fixtures/includes-all-provider-layer.output.service.json index 9c4d2c33..48f9eb18 100644 --- a/tests/fixtures/includes-all-provider-layer.output.service.json +++ b/tests/fixtures/includes-all-provider-layer.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "name": "aws", "stage": "prod", diff --git a/tests/fixtures/lambda-extension-disabled.output.service.json b/tests/fixtures/lambda-extension-disabled.output.service.json index 54b0e077..27cd6fba 100644 --- a/tests/fixtures/lambda-extension-disabled.output.service.json +++ b/tests/fixtures/lambda-extension-disabled.output.service.json @@ -25,7 +25,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/lambda-extension-enabled.output.service.json b/tests/fixtures/lambda-extension-enabled.output.service.json index 1230d06d..ffb9f6eb 100644 --- a/tests/fixtures/lambda-extension-enabled.output.service.json +++ b/tests/fixtures/lambda-extension-enabled.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -47,7 +47,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/license-key-secret-disabled.output.service.json b/tests/fixtures/license-key-secret-disabled.output.service.json index d5aec226..9fbdd4d3 100644 --- a/tests/fixtures/license-key-secret-disabled.output.service.json +++ b/tests/fixtures/license-key-secret-disabled.output.service.json @@ -25,7 +25,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": [ @@ -53,7 +53,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": [ diff --git a/tests/fixtures/log-disabled.output.service.json b/tests/fixtures/log-disabled.output.service.json index bc028753..ecad43a4 100644 --- a/tests/fixtures/log-disabled.output.service.json +++ b/tests/fixtures/log-disabled.output.service.json @@ -31,7 +31,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -50,7 +50,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/log-ingestion-via-extension.output.service.json b/tests/fixtures/log-ingestion-via-extension.output.service.json index 74f3203c..33e941a5 100644 --- a/tests/fixtures/log-ingestion-via-extension.output.service.json +++ b/tests/fixtures/log-ingestion-via-extension.output.service.json @@ -28,7 +28,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": [ @@ -57,7 +57,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": [ diff --git a/tests/fixtures/log-level.output.service.json b/tests/fixtures/log-level.output.service.json index 34f92ecb..e4dbda4a 100644 --- a/tests/fixtures/log-level.output.service.json +++ b/tests/fixtures/log-level.output.service.json @@ -31,7 +31,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -53,7 +53,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/manual-wrapping.output.service.json b/tests/fixtures/manual-wrapping.output.service.json index b49b201e..05b7611a 100644 --- a/tests/fixtures/manual-wrapping.output.service.json +++ b/tests/fixtures/manual-wrapping.output.service.json @@ -40,7 +40,7 @@ ], "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "name": "aws", "region": "us-east-1", diff --git a/tests/fixtures/provider-environment-log-level.output.service.json b/tests/fixtures/provider-environment-log-level.output.service.json index c8c6f964..4c0b8920 100644 --- a/tests/fixtures/provider-environment-log-level.output.service.json +++ b/tests/fixtures/provider-environment-log-level.output.service.json @@ -34,7 +34,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -56,7 +56,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/provider-environment.output.service.json b/tests/fixtures/provider-environment.output.service.json index dda71b0b..a8740ed4 100644 --- a/tests/fixtures/provider-environment.output.service.json +++ b/tests/fixtures/provider-environment.output.service.json @@ -33,7 +33,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -55,7 +55,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/provider-layer.output.service.json b/tests/fixtures/provider-layer.output.service.json index 41ba833e..2bcdc05c 100644 --- a/tests/fixtures/provider-layer.output.service.json +++ b/tests/fixtures/provider-layer.output.service.json @@ -2,7 +2,7 @@ "service": "newrelic-lambda-layers-nodejs-example", "provider": { "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "name": "aws", "stage": "prod", diff --git a/tests/fixtures/proxy.output.service.json b/tests/fixtures/proxy.output.service.json index 6f9e125e..09a8b176 100644 --- a/tests/fixtures/proxy.output.service.json +++ b/tests/fixtures/proxy.output.service.json @@ -24,7 +24,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": [ @@ -52,7 +52,7 @@ ], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": [ diff --git a/tests/fixtures/stage-included.output.service.json b/tests/fixtures/stage-included.output.service.json index 13afb93f..7b49d851 100644 --- a/tests/fixtures/stage-included.output.service.json +++ b/tests/fixtures/stage-included.output.service.json @@ -30,7 +30,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/trusted-account-key-excluded.output.service.json b/tests/fixtures/trusted-account-key-excluded.output.service.json index 9feda615..7cf93a03 100644 --- a/tests/fixtures/trusted-account-key-excluded.output.service.json +++ b/tests/fixtures/trusted-account-key-excluded.output.service.json @@ -29,7 +29,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -48,7 +48,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], diff --git a/tests/fixtures/trusted-account-key-included.output.service.json b/tests/fixtures/trusted-account-key-included.output.service.json index e19eccf5..c86c10ce 100644 --- a/tests/fixtures/trusted-account-key-included.output.service.json +++ b/tests/fixtures/trusted-account-key-included.output.service.json @@ -30,7 +30,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:73" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], @@ -49,7 +49,7 @@ "events": [{ "schedule": "rate(5 minutes)" }], "handler": "newrelic-lambda-wrapper.handler", "layers": [ - "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:48" + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" ], "package": { "exclude": ["./**", "!newrelic-wrapper-helper.js"], From 0d68cf4566d94439ee3384af7750d0df5f36e8c0 Mon Sep 17 00:00:00 2001 From: mrickard Date: Wed, 29 Nov 2023 15:15:13 -0500 Subject: [PATCH 5/6] chore(test): Added one test fixture for tracking supported Node versions Signed-off-by: mrickard --- .../fixtures/node-versions.input.service.json | 80 +++++++++++++++++ .../node-versions.output.service.json | 86 +++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 tests/fixtures/node-versions.input.service.json create mode 100644 tests/fixtures/node-versions.output.service.json diff --git a/tests/fixtures/node-versions.input.service.json b/tests/fixtures/node-versions.input.service.json new file mode 100644 index 00000000..3b469a87 --- /dev/null +++ b/tests/fixtures/node-versions.input.service.json @@ -0,0 +1,80 @@ +{ + "service": "newrelic-lambda-layers-nodejs-example", + "provider": { + "name": "aws", + "stage": "prod", + "region": "us-east-1", + "stackTags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + }, + "tags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + } + }, + "plugins": [ + "serverless-newrelic-lambda-layers" + ], + "custom": { + "newRelic": { + "accountId": "${env:NEW_RELIC_ACCOUNT_ID}", + "apiKey": "${env:NEW_RELIC_PERSONAL_API_KEY}" + } + }, + "functions": { + "layer-nodejs16x": { + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "handler.handler", + "package": { + "exclude": [ + "./**" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs16.x" + }, + "layer-nodejs18x": { + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "handler.handler", + "package": { + "exclude": [ + "./**" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs18.x" + }, + "layer-nodejs20x": { + "events": [ + { + "schedule": "rate(5 minutes)" + } + ], + "handler": "handler.handler", + "package": { + "exclude": [ + "./**" + ], + "include": [ + "handler.js" + ] + }, + "runtime": "nodejs20.x" + } + } +} diff --git a/tests/fixtures/node-versions.output.service.json b/tests/fixtures/node-versions.output.service.json new file mode 100644 index 00000000..c292fa61 --- /dev/null +++ b/tests/fixtures/node-versions.output.service.json @@ -0,0 +1,86 @@ +{ + "service": "newrelic-lambda-layers-nodejs-example", + "provider": { + "name": "aws", + "stage": "prod", + "region": "us-east-1", + "stackTags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + }, + "tags": { + "environment": "us-testing", + "owning_team": "LAMBDA", + "product": "aws-lambda" + } + }, + "plugins": ["serverless-newrelic-lambda-layers"], + "configValidationMode": "warn", + "custom": { + "newRelic": { + "accountId": "${env:NEW_RELIC_ACCOUNT_ID}", + "apiKey": "${env:NEW_RELIC_PERSONAL_API_KEY}" + } + }, + "disabledDeprecations": [], + "functions": { + "layer-nodejs16x": { + "events": [{ "schedule": "rate(5 minutes)" }], + "handler": "newrelic-lambda-wrapper.handler", + "layers": [ + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS16X:76" + ], + "package": { + "exclude": ["./**", "!newrelic-wrapper-helper.js"], + "include": ["handler.js"] + }, + "runtime": "nodejs16.x", + "environment": { + "NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}", + "NEW_RELIC_APP_NAME": "layer-nodejs16x", + "NEW_RELIC_LAMBDA_HANDLER": "handler.handler", + "NEW_RELIC_NO_CONFIG_FILE": "true", + "NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}" + } + }, + "layer-nodejs18x": { + "events": [{ "schedule": "rate(5 minutes)" }], + "handler": "newrelic-lambda-wrapper.handler", + "layers": [ + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18X:51" + ], + "package": { + "exclude": ["./**", "!newrelic-wrapper-helper.js"], + "include": ["handler.js"] + }, + "runtime": "nodejs18.x", + "environment": { + "NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}", + "NEW_RELIC_APP_NAME": "layer-nodejs18x", + "NEW_RELIC_LAMBDA_HANDLER": "handler.handler", + "NEW_RELIC_NO_CONFIG_FILE": "true", + "NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}" + } + }, + "layer-nodejs20x": { + "events": [{ "schedule": "rate(5 minutes)" }], + "handler": "newrelic-lambda-wrapper.handler", + "layers": [ + "arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS20X:1" + ], + "package": { + "exclude": ["./**", "!newrelic-wrapper-helper.js"], + "include": ["handler.js"] + }, + "runtime": "nodejs20.x", + "environment": { + "NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}", + "NEW_RELIC_APP_NAME": "layer-nodejs20x", + "NEW_RELIC_LAMBDA_HANDLER": "handler.handler", + "NEW_RELIC_NO_CONFIG_FILE": "true", + "NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}" + } + } + } +} From 07264f34a2316e6faf17da024947009ffae7a8a0 Mon Sep 17 00:00:00 2001 From: mrickard Date: Wed, 29 Nov 2023 16:12:14 -0500 Subject: [PATCH 6/6] chore: Bumping version for release Signed-off-by: mrickard --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 61e63f8b..76f7001a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "serverless-newrelic-lambda-layers", - "version": "4.2.0", + "version": "4.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "serverless-newrelic-lambda-layers", - "version": "4.2.0", + "version": "4.3.0", "license": "Apache-2.0", "devDependencies": { "@types/fs-extra": "^9.0.13", diff --git a/package.json b/package.json index 6ccc7153..7e8850f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "serverless-newrelic-lambda-layers", - "version": "4.2.0", + "version": "4.3.0", "description": "Serverless plugin for NewRelic APM AWS Lambda layers.", "main": "dist/index.js", "files": [