Skip to content

chore: approve install scripts for npm v12 allowScripts - #5340

Merged
dreamorosi merged 2 commits into
mainfrom
chore/npm-v12-allow-scripts
Jun 12, 2026
Merged

dreamorosi merged 2 commits into
mainfrom
chore/npm-v12-allow-scripts

Conversation

@svozza

@svozza svozza commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

npm v12 (estimated July 2026) flips allowScripts from opt-out to opt-in: dependency install scripts (preinstall/install/postinstall) will be silently skipped unless explicitly allowlisted in package.json. This PR commits the allowlist to the root package.json now, covering the only three dependencies in our tree that run install scripts, so installs keep working unchanged when npm v12 ships.

Consumers of our published packages are unaffected — none of the workspace packages declare install scripts.

Changes

  • Add allowScripts block to root package.json (generated via npm approve-scripts on npm 11.16.0):
    • esbuild and fsevents approved name-only (unpinned, via --no-allow-scripts-pin) so dependabot version bumps don't strand a stale pin that would silently re-block the script under v12
    • protobufjs@7.5.8 approved pinned; only the nested copy under @valkey/valkey-glide has a postinstall (removed in protobufjs v8), so the entry can be deleted when valkey-glide moves to protobufjs 8
  • Verified: npm approve-scripts --allow-scripts-pending reports no unreviewed install scripts, and npm install completes with no allowScripts warnings and no lockfile changes

Issue number: closes #5321


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

npm v12 (~July 2026) flips allowScripts to opt-in; without an
allowlist, dependency install scripts are silently skipped.

- esbuild, fsevents: name-only (unpinned) so dependabot bumps don't
  strand a stale pin
- protobufjs@7.5.8: pinned; only the nested copy under
  @valkey/valkey-glide has a postinstall (removed in v8), so the
  entry dies with valkey-glide's next protobufjs major

Closes #5321
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation Bot added size/XS PR between 0-9 LOC and removed size/XS PR between 0-9 LOC labels Jun 12, 2026
@dreamorosi
dreamorosi merged commit 325b00c into main Jun 12, 2026
39 checks passed
@dreamorosi
dreamorosi deleted the chore/npm-v12-allow-scripts branch June 12, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR between 0-9 LOC

2 participants