You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a07ed24
Browse filesBrowse the repository at this point in the historyBrowse files
.npmrc sets strict-allow-scripts=true and the allowScripts map of
package.json pins approved name@version entries, so a dependency version bump
that leaves its pinned entry behind makes npm ci fail with ESTRICTALLOWSCRIPTS
before any check runs. Renovate hits this on every lefthook, esbuild or
fsevents bump and cannot fix it, because it only rewrites the dependency
fields and the lockfile.
Document the gate and `npm approve-scripts <package>` where a contributor
meets it: CONTRIBUTING.md (initial setup and the Lefthook section),
.github/copilot-instructions.md (bootstrap), and a comment beside the flag in
.npmrc.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,16 @@ accept pull requests.
95
95
npm ci
96
96
```
97
97
98
+
`.npmrc` sets `strict-allow-scripts=true`, so `npm ci` runs install scripts only for
99
+
entries of the `allowScripts` map in `package.json`, and each entry pins an exact
100
+
`name@version`. After a dependency version change, the stale entry makes `npm ci` fail
101
+
with `ESTRICTALLOWSCRIPTS` before any other check runs; that gate is separate from the
102
+
release-age gate above. Review the new version, then rewrite the entry:
103
+
104
+
```bash
105
+
npm approve-scripts <package>
106
+
```
107
+
98
108
4.**Set up environment variables** (optional, for testing)
99
109
100
110
```bash
@@ -230,6 +240,11 @@ afterward.
230
240
This project uses [lefthook](https://github.com/evilmartians/lefthook) to enforce
231
241
code quality automatically via git hooks. Hooks are installed automatically when you run `npm ci` or `npm install` (via the `prepare` lifecycle script).
232
242
243
+
Lefthook ships an install script, so its pinned `allowScripts` entry has to follow every
244
+
lefthook bump, including the ones a dependency PR opens. Otherwise `npm ci` fails with
245
+
`ESTRICTALLOWSCRIPTS`. Run `npm approve-scripts lefthook` on the branch to rewrite the
0 commit comments