Skip to content

Commit 196049c

Browse files
odanadoclaude
andauthored
fix: remove fixed engines field and add npm install cooldown (#23)
# Description Closes #7. The `engines` field pinned exact versions of Node.js and npm. It propagates to consumers, so installing `@line/liff-cli` printed `EBADENGINE` warnings on any other version. I removed it and moved the npm requirement to `devEngines`, which is not propagated. I also added new configs to `.npmrc` as a mitigation against supply chain attacks. - `min-release-age=3`: It makes npm ignore versions published less than 3 days ago. - `strict-allow-scripts=true` in `.npmrc` and `allowScripts` in `package.json`: prevent install scripts of third-party packages from running. --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 82aac91 commit 196049c

4 files changed

Lines changed: 39 additions & 29 deletions

File tree

‎.npmrc‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
engine-strict=true
21
save-exact=true
32
registry=https://registry.npmjs.org/
3+
min-release-age=3
4+
strict-allow-scripts=true

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
22.2.0
1+
24.21.0

‎package-lock.json‎

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

‎package.json‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,24 @@
2323
"release": "changelogen --release"
2424
},
2525
"keywords": [],
26-
"engines": {
27-
"node": "22.2.0",
28-
"npm": "10.7.0"
26+
"devEngines": {
27+
"packageManager": {
28+
"name": "npm",
29+
"version": ">=11.16.0",
30+
"onFail": "error"
31+
}
32+
},
33+
"allowScripts": {
34+
"esbuild": false,
35+
"fsevents": false,
36+
"msw": false,
37+
"node-pty": false
2938
},
3039
"license": "Apache-2.0",
3140
"devDependencies": {
3241
"@types/http-proxy": "1.17.15",
3342
"@types/inquirer": "9.0.7",
34-
"@types/node": "22.2.0",
43+
"@types/node": "24.13.6",
3544
"@typescript-eslint/eslint-plugin": "6.7.3",
3645
"@typescript-eslint/parser": "6.7.3",
3746
"changelogen": "0.5.5",

0 commit comments

Comments
 (0)