Skip to content

Commit 04b98fd

Browse files
authored
feat: drop Node 18 support and fix security alerts (#542)
- Update package.json "engines" to requiring Node >=20.0.0. - Update .github/workflows/ci.yaml to remove Node 18 from the test matrix and bump other jobs to Node 20. - Add package.json overrides for `diff` and `serialize-javascript` to resolve Dependabot alerts. This prepares the workspace for secure dependencies that require Node 20+ runtimes and ensures CI status checks pass. The mocha package (in devDependencies) is strictly locked on old versions of these dependencies. Since no newer stable Mocha release is available to bumped them naturally, overrides are used to force the upgrades.
1 parent 8a06cdf commit 04b98fd

3 files changed

Lines changed: 38 additions & 88 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
node: [18, 20]
16+
node: [20]
1717
steps:
1818
- uses: actions/checkout@v3
1919
- uses: actions/setup-node@v3
@@ -36,7 +36,7 @@ jobs:
3636
- uses: actions/checkout@v3
3737
- uses: actions/setup-node@v3
3838
with:
39-
node-version: 18
39+
node-version: 20
4040
- run: npm install --engine-strict
4141
- run: npm test
4242
env:
@@ -47,7 +47,7 @@ jobs:
4747
- uses: actions/checkout@v3
4848
- uses: actions/setup-node@v3
4949
with:
50-
node-version: 18
50+
node-version: 20
5151
- run: npm install
5252
- run: npm run lint
5353
docs:
@@ -56,7 +56,7 @@ jobs:
5656
- uses: actions/checkout@v3
5757
- uses: actions/setup-node@v3
5858
with:
59-
node-version: 18
59+
node-version: 20
6060
- run: npm install
6161
- run: npm run docs
6262
- uses: JustinBeckwith/linkinator-action@v1

package-lock.json

Lines changed: 30 additions & 82 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "Apache-2.0",
66
"author": "Google LLC",
77
"engines": {
8-
"node": ">=18.0.0"
8+
"node": ">=20.0.0"
99
},
1010
"bin": {
1111
"code-suggester": "./build/src/bin/code-suggester.js"
@@ -67,6 +67,8 @@
6767
"webpack-cli": "^5.0.0"
6868
},
6969
"overrides": {
70-
"tmp": "0.2.5"
70+
"tmp": "0.2.5",
71+
"diff": "^8.0.3",
72+
"serialize-javascript": "^7.0.4"
7173
}
7274
}

0 commit comments

Comments
 (0)