Skip to content

Commit

Permalink
Merge pull request #401 from newrelic/mrickard/remove-node-14
Browse files Browse the repository at this point in the history
chore!: Dropped support for Node 14
  • Loading branch information
mrickard committed Jan 19, 2024
2 parents 00f2fc2 + 5f8f4f9 commit d2add0e
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 36 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ custom:

This plugin currently supports the following AWS runtimes:

- nodejs14.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-newrelic-lambda-layers",
"version": "4.3.0",
"version": "5.0.0",
"description": "Serverless plugin for NewRelic APM AWS Lambda layers.",
"main": "dist/index.js",
"files": [
Expand Down
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const logShim = {
};

const wrappableRuntimeList = [
"nodejs14.x",
"nodejs16.x",
"nodejs18.x",
"nodejs20.x",
Expand Down Expand Up @@ -751,11 +750,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", "nodejs20.x"].indexOf(
runtime
) !== -1
) {
if (["nodejs16.x", "nodejs18.x", "nodejs20.x"].indexOf(runtime) !== -1) {
return "newrelic-lambda-wrapper.handler";
}

Expand Down
6 changes: 0 additions & 6 deletions tests/fixtures/debug.input.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
},
"disabledDeprecations": [],
"functions": {
"layer-nodejs14x": {
"events": [{ "schedule": "rate(5 minutes)" }],
"handler": "handler.handler",
"package": { "exclude": ["./**"], "include": ["handler.js"] },
"runtime": "nodejs14.x"
},
"layer-nodejs16x": {
"events": [{ "schedule": "rate(5 minutes)" }],
"handler": "handler.handler",
Expand Down
22 changes: 0 additions & 22 deletions tests/fixtures/debug.output.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,6 @@
},
"disabledDeprecations": [],
"functions": {
"layer-nodejs14x": {
"events": [{ "schedule": "rate(5 minutes)" }],
"handler": "newrelic-lambda-wrapper.handler",
"layers": [
"arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS14X:118"
],
"package": {
"exclude": ["./**", "!newrelic-wrapper-helper.js"],
"include": ["handler.js"]
},
"runtime": "nodejs14.x",
"environment": {
"NEW_RELIC_ACCOUNT_ID": "${env:NEW_RELIC_ACCOUNT_ID}",
"NEW_RELIC_APP_NAME": "layer-nodejs14x",
"NEW_RELIC_LAMBDA_HANDLER": "handler.handler",
"NEW_RELIC_LOG": "stdout",
"NEW_RELIC_LOG_ENABLED": "true",
"NEW_RELIC_LOG_LEVEL": "debug",
"NEW_RELIC_NO_CONFIG_FILE": "true",
"NEW_RELIC_TRUSTED_ACCOUNT_KEY": "${env:NEW_RELIC_ACCOUNT_ID}"
}
},
"layer-nodejs16x": {
"events": [{ "schedule": "rate(5 minutes)" }],
"handler": "newrelic-lambda-wrapper.handler",
Expand Down

0 comments on commit d2add0e

Please sign in to comment.