Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
I'm seeing an unexpected warning about a better-sqlite@13.0.2 having an install script.
added 2 packages, and audited 3 packages in 342ms
found 0 vulnerabilities
npm warn install-scripts 1 package had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts better-sqlite3@13.0.2 (install: node-gyp rebuild)
npm warn install-scripts
npm warn install-scripts Run `npm install-scripts ls` to review, or `npm install-scripts approve <pkg>` to allow.
Expected Behavior
While better-sqlite3 uses node-gyp, the automatic creation of an install script when publishing is disabled by the inclusion of the gypfile: false option in its package.json. See WiseLibs/better-sqlite3#1503 and WiseLibs/better-sqlite3#1505.
I'm not seeing any indication of an install script for this version of better-sqlite3 in the packument API response: https://registry.npmjs.com/better-sqlite3.
The expectation is that there's no warning at all when installing better-sqlite3@13.0.2.
Steps To Reproduce
Create a project with the following package.json:
{
"type": "module",
"dependencies": {
"better-sqlite3": "13.0.2"
}
}
Run npm install
Environment
- npm: 12.0.2
- Node.js: 24.18.0
- OS Name: macOS 26.5.2 (Tahoe)
- System Model Name: MacBook Air M5
- npm config:
; node bin location = /Users/andrewchou/.local/share/mise/installs/node/24.18.0/bin/node
; node version = v24.18.0
; npm local prefix = /Users/andrewchou/code/github/achou11/npm-allow-scripts-issue-repro
; npm version = 12.0.2
; cwd = /Users/andrewchou/code/github/achou11/npm-allow-scripts-issue-repro
; HOME = /Users/andrewchou
; Run `npm config ls -l` to show all defaults
Is there an existing issue for this?
This issue exists in the latest npm version
This is not just a request to bump a dependency for a CVE
Current Behavior
I'm seeing an unexpected warning about a
better-sqlite@13.0.2having an install script.Expected Behavior
While
better-sqlite3usesnode-gyp, the automatic creation of an install script when publishing is disabled by the inclusion of thegypfile: falseoption in its package.json. See WiseLibs/better-sqlite3#1503 and WiseLibs/better-sqlite3#1505.I'm not seeing any indication of an install script for this version of better-sqlite3 in the packument API response: https://registry.npmjs.com/better-sqlite3.
The expectation is that there's no warning at all when installing
better-sqlite3@13.0.2.Steps To Reproduce
Create a project with the following
package.json:{ "type": "module", "dependencies": { "better-sqlite3": "13.0.2" } }Run
npm installEnvironment