Skip to content

Commit

Permalink
fix: bumped min node version
Browse files Browse the repository at this point in the history
BREAKING CHANGE: bumped min node version to 20
  • Loading branch information
Lukas Siemon committed Jan 29, 2025
1 parent f3ee733 commit 0f52414
Show file tree
Hide file tree
Showing 14 changed files with 2,031 additions and 984 deletions.
28 changes: 14 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@ workflows:
node-multi-build:
jobs:
- gally-create-pr
- test-node-v18:
- test-node-v20:
requires:
- gally-create-pr
- test-node-v21:
- test-node-v23:
requires:
- gally-create-pr
- test-node-v20:
- test-node-v22:
requires:
- gally-create-pr
- gally-auto-approve:
requires:
- gally-create-pr
- test-node-v18
- test-node-v21
- test-node-v20
- test-node-v23
- test-node-v22
filters:
branches:
only: /dependabot\/.*/
- release:
requires:
- gally-create-pr
- test-node-v18
- test-node-v21
- test-node-v20
- test-node-v23
- test-node-v22
filters:
branches:
only: master
Expand All @@ -40,7 +40,7 @@ jobs:
- run: ga promote $CIRCLE_BRANCH
release:
docker:
- image: cimg/node:20.11
- image: cimg/node:22.13
steps:
- checkout
- run:
Expand Down Expand Up @@ -87,9 +87,9 @@ jobs:
- run: >-
ga approve $CIRCLE_PR_NUMBER --condition
"base.ref=dev&state=open&user.login=dependabot-preview[bot]"
test-node-v18:
test-node-v20:
docker:
- image: cimg/node:18.19
- image: cimg/node:20.18
steps:
- checkout
- run:
Expand Down Expand Up @@ -119,9 +119,9 @@ jobs:
- run: >-
(git add . && git diff-index --quiet HEAD --) || (git status && exit
1);
test-node-v20:
test-node-v23:
docker:
- image: cimg/node:20.11
- image: cimg/node:23.6
steps:
- checkout
- run:
Expand Down Expand Up @@ -151,9 +151,9 @@ jobs:
- run: >-
(git add . && git diff-index --quiet HEAD --) || (git status && exit
1);
test-node-v21:
test-node-v22:
docker:
- image: cimg/node:21.6
- image: cimg/node:22.13
steps:
- checkout
- run:
Expand Down
6 changes: 3 additions & 3 deletions .gally.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"strict": true,
"contexts": [
"ci/circleci: gally-create-pr",
"ci/circleci: test-node-v18",
"ci/circleci: test-node-v21",
"ci/circleci: test-node-v20"
"ci/circleci: test-node-v20",
"ci/circleci: test-node-v23",
"ci/circleci: test-node-v22"
]
},
"enforce_admins": false,
Expand Down
2 changes: 1 addition & 1 deletion .roboconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"packageName": "lambda-monitor",
"projectName": "lambda-monitor",
"owner": "simlu",
"nodeVersion": "18",
"nodeVersion": "20",
"ownerName": "Lukas Siemon",
"mergeBot": "MrsFlux",
"nccEnabled": false
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ if (require.main === module) {
- Then enter docker container with `. manage.sh`
- Then run `yarn install && u && t`
- Create `.depunusedignore`
```text
```
@blackflux/robo-config-plugin
@blackflux/eslint-plugin-rules
object-hash
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM public.ecr.aws/sam/build-nodejs18.x
FROM public.ecr.aws/sam/build-nodejs20.x

WORKDIR /user

Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,44 +45,44 @@
"homepage": "https://github.com/blackflux/lambda-monitor#readme",
"dependencies": {
"@aws-sdk/client-cloudwatch-logs": "3.385.0",
"@aws-sdk/client-lambda": "3.385.0",
"@aws-sdk/client-resource-groups-tagging-api": "3.385.0",
"@aws-sdk/client-lambda": "3.734.0",
"@aws-sdk/client-resource-groups-tagging-api": "3.734.0",
"@aws-sdk/client-s3": "3.385.0",
"@aws-sdk/client-sqs": "3.385.0",
"@blackflux/axios": "2.0.2",
"@blackflux/axios": "3.0.0",
"aws-sdk-wrap": "13.3.2",
"datadog-light": "4.0.0",
"joi-strict": "3.0.1",
"lambda-async": "3.0.0",
"datadog-light": "5.0.0",
"joi-strict": "4.0.0",
"lambda-async": "4.0.0",
"lambda-cfn-hook": "3.0.5",
"lambda-monitor-logger": "5.1.0",
"lambda-monitor-logger": "5.1.1",
"lodash.get": "4.4.2",
"lru-cache-ext": "4.1.1",
"object-scan": "19.0.5",
"lru-cache-ext": "5.0.0",
"object-scan": "20.0.0",
"promise-pool-ext": "3.3.0",
"smart-fs": "4.0.1"
"smart-fs": "5.0.1"
},
"devDependencies": {
"@babel/core": "7.26.0",
"@babel/eslint-parser": "7.25.9",
"@babel/core": "7.26.7",
"@babel/eslint-parser": "7.26.5",
"@babel/register": "7.25.9",
"@blackflux/eslint-plugin-rules": "3.0.1",
"@blackflux/robo-config-plugin": "9.4.3",
"c8": "10.1.2",
"@blackflux/eslint-plugin-rules": "4.0.0",
"@blackflux/robo-config-plugin": "10.0.0",
"c8": "10.1.3",
"chai": "5.1.2",
"eslint": "8.57.0",
"eslint": "9.19.0",
"eslint-config-airbnb-base": "15.0.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-json": "4.0.1",
"eslint-plugin-markdown": "5.1.0",
"eslint-plugin-mocha": "10.5.0",
"js-gardener": "5.0.4",
"lambda-tdd": "7.1.0",
"js-gardener": "6.0.2",
"lambda-tdd": "8.0.0",
"minimist": "1.2.8",
"mocha": "10.8.2",
"nock": "13.5.5",
"node-tdd": "5.2.5",
"robo-config": "6.0.1"
"node-tdd": "6.0.0",
"robo-config": "7.0.0"
},
"licenses": [
{
Expand All @@ -91,7 +91,7 @@
}
],
"engines": {
"node": ">= 18"
"node": ">= 20"
},
"files": [
"lib"
Expand Down
4 changes: 1 addition & 3 deletions src/logic/logger/message/datadog.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export default ({ message }) => {
let parsedMessage = {};
try {
parsedMessage = JSON.parse(message);
} catch (e) {
/* ignored */
}
} catch { /* ignored */ }
if (get(parsedMessage, ['type']) === 'distribution-metric') {
datadogDistributionMetric.enqueue(...get(parsedMessage, ['args']));
}
Expand Down
2 changes: 1 addition & 1 deletion src/logic/logger/message/email.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ export default ({ logEvent }) => {
}
}
});
} catch (e) { /* ignored */ }
} catch { /* ignored */ }
};
2 changes: 1 addition & 1 deletion src/logic/logger/message/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ export default ({
...JSON.parse(logEvent.message)
};
sqs.enqueue(process.env.BUNDLER_QUEUE_URL, result);
} catch (e) { /* ignored */ }
} catch { /* ignored */ }
};
2 changes: 1 addition & 1 deletion src/logic/logger/message/s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export default ({ logGroup, message }) => {
`${logGroup.slice(1)}/${key}`,
JSON.stringify(data)
);
} catch (e) { /* ignored */ }
} catch { /* ignored */ }
};
6 changes: 3 additions & 3 deletions src/plugin/tasks/struct/snippets/HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Only enable CloudTrail if it is not already enabled for your account. Otherwise
- Sync github settings with `ga sync`. This will create three branches `dev`, `stage` and `prod` in the upstream repo
- Sync environment variables to AWS (adjust and fill in as necessary):

```shell script
```
aws --region ${awsRegion} --profile local ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "INFO"}'
aws --region ${awsRegion} --profile dev ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "INFO"}'
aws --region ${awsRegion} --profile stage ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "WARNING"}'
Expand All @@ -44,7 +44,7 @@ aws --region ${awsRegion} --profile prod ssm put-parameter --cli-input-json '{"T

- Start docker container with `. manage.sh`

```shell script
```
yarn run sls-compile --stack data --region ${awsRegion} --env local && \
sls deploy --config serverless-local-data.config.yml --aws-profile local --force && \
yarn run sls-compile --stack data --region ${awsRegion} --env dev && \
Expand All @@ -60,7 +60,7 @@ sls deploy --config serverless-prod-data.config.yml --aws-profile prod --force
- Create the CircleCI contexts `PROJECT_NAME-local`, `PROJECT_NAME-dev`, `PROJECT_NAME-stage` and `PROJECT_NAME-prod` and
- Fill in the variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` for each context by accessing them with

```shell script
```
aws cloudformation describe-stacks --region ${awsRegion} --profile ENVIRONMENT \
--stack-name PROJECT_NAME-data-ENVIRONMENT \
--query '[Stacks[*].Outputs[?OutputKey==`DeployAccessKeyId`].OutputValue, Stacks[*].Outputs[?OutputKey==`DeploySecretAccessKey`].OutputValue]' --output text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"content-length": 211,
"content-type": "application/json",
"host": "api.datadoghq.com",
"user-agent": "axios/1.4.0",
"user-agent": "axios/1.7.9",
"accept-encoding": "gzip, compress, deflate, br"
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/projects/assorted/@default/HOWTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Only enable CloudTrail if it is not already enabled for your account. Otherwise
- Sync github settings with `ga sync`. This will create three branches `dev`, `stage` and `prod` in the upstream repo
- Sync environment variables to AWS (adjust and fill in as necessary):

```shell script
```
aws --region awsRegion --profile local ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "INFO"}'
aws --region awsRegion --profile dev ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "INFO"}'
aws --region awsRegion --profile stage ssm put-parameter --cli-input-json '{"Type": "String", "Name": "ROLLBAR_REPORT_LEVEL", "Value": "WARNING"}'
Expand All @@ -44,7 +44,7 @@ aws --region awsRegion --profile prod ssm put-parameter --cli-input-json '{"Type

- Start docker container with `. manage.sh`

```shell script
```
yarn run sls-compile --stack data --region awsRegion --env local && \
sls deploy --config serverless-local-data.config.yml --aws-profile local --force && \
yarn run sls-compile --stack data --region awsRegion --env dev && \
Expand All @@ -60,7 +60,7 @@ sls deploy --config serverless-prod-data.config.yml --aws-profile prod --force
- Create the CircleCI contexts `PROJECT_NAME-local`, `PROJECT_NAME-dev`, `PROJECT_NAME-stage` and `PROJECT_NAME-prod` and
- Fill in the variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` for each context by accessing them with

```shell script
```
aws cloudformation describe-stacks --region awsRegion --profile ENVIRONMENT \
--stack-name PROJECT_NAME-data-ENVIRONMENT \
--query '[Stacks[*].Outputs[?OutputKey==`DeployAccessKeyId`].OutputValue, Stacks[*].Outputs[?OutputKey==`DeploySecretAccessKey`].OutputValue]' --output text
Expand Down
Loading

0 comments on commit 0f52414

Please sign in to comment.