Skip to content

chore(npm): approve install scripts for transitive dependencies - #19

Merged
Hug0-Drelon merged 2 commits into
masterfrom
chore/approve-install-scripts
Aug 10, 2026
Merged

chore(npm): approve install scripts for transitive dependencies#19
Hug0-Drelon merged 2 commits into
masterfrom
chore/approve-install-scripts

Conversation

@Hug0-Drelon

@Hug0-Drelon Hug0-Drelon commented Aug 10, 2026

Copy link
Copy Markdown
Member

What?

  • Add an allowScripts field to package.json for transitive dependencies that run install/postinstall scripts.
  • Resync package-lock.json with npm 10 so CI can run npm ci --omit=peer on Node 22.

Why?

  • npm install on npm 11 prints allow-scripts warnings for unreviewed install scripts (@parcel/watcher, core-js, core-js-pure, esbuild, fsevents, unrs-resolver). npm will eventually block unreviewed scripts; recording approvals now keeps installs clean and future-proof.
  • CI failed because the lockfile was generated with npm 11, which omits the optional peer esbuild@0.27.7 that npm 10 (Node 22 on CI) requires.

How?

  • Ran npm approve-scripts --all to pin each package to its currently installed version.
  • Regenerated package-lock.json with npm 10 so both esbuild@0.28.1 (direct) and esbuild@0.27.7 (optional peer) are present.

Test plan

  • npm install completes without allow-scripts warnings
  • npm ci --omit=peer succeeds with npm 10
  • npm run build succeeds

Record reviewed install scripts in allowScripts so npm install no longer warns about unreviewed postinstall hooks.
Regenerate the lockfile with npm 10 so esbuild@0.27.7 optional peer entries are present and npm ci --omit=peer succeeds on Node 22.
@Hug0-Drelon Hug0-Drelon self-assigned this Aug 10, 2026
@Hug0-Drelon Hug0-Drelon added the bug Something isn't working label Aug 10, 2026
@Hug0-Drelon
Hug0-Drelon merged commit 54a1f4c into master Aug 10, 2026
3 checks passed
@Hug0-Drelon
Hug0-Drelon deleted the chore/approve-install-scripts branch August 10, 2026 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant