Skip to content

ci: set ignore-scripts=false to fix executable build#2300

Merged
pranavz28 merged 1 commit into
masterfrom
ci/npmrc-ignore-scripts-false
Jun 18, 2026
Merged

ci: set ignore-scripts=false to fix executable build#2300
pranavz28 merged 1 commit into
masterfrom
ci/npmrc-ignore-scripts-false

Conversation

@pranavz28

Copy link
Copy Markdown
Contributor

Problem

The Build Executables workflow has failed for the last 3 releases (since v1.32.0-beta.8), most recently on v1.32.0. The job dies in scripts/executable.sh at:

cp: ./build/*: No such file or directory

Root cause

The release-automation PR added a root .npmrc with ignore-scripts=true. The Build Executables runner uses Node 14 → npm 6, and npm 6 honors ignore-scripts even for explicit npm run <script> (npm 7+ later relaxed this). So npm run build_cjs (BABEL_ENV=dev babel packages -d build) became a silent no-op — build/ was never created — and the following cp -R ./build/* packages/ failed.

yarn build two lines earlier is unaffected because it runs via lerna + Nx, whose task runner executes package scripts directly rather than through npm run.

Verified by elimination: same runner image, same Node version, and the exact v1.32.0 source tree all build build_cjs fine; the only delta at the first failing tag was this .npmrc.

Fix

Set ignore-scripts=false so npm run build_cjs executes on the npm-6 runner.

🤖 Generated with Claude Code

The release-automation .npmrc set `ignore-scripts=true`. On the
Build Executables runner (Node 14 / npm 6), npm honors ignore-scripts
even for explicit `npm run`, so `npm run build_cjs` became a silent
no-op: `build/` was never produced and `cp -R ./build/* packages/`
failed with "No such file or directory". This has broken the executable
build for the last 3 releases (since v1.32.0-beta.8).

`yarn build` (lerna+nx) is unaffected because nx runs package scripts
through its own task runner rather than `npm run`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pranavz28
pranavz28 requested a review from a team as a code owner June 17, 2026 11:41
@pranavz28

Copy link
Copy Markdown
Contributor Author

🤖 Claude Code Review — stack:pr-review

PR: #2300Head: e4672ccScope: single-file CI config change (.npmrc)

Summary: Flips ignore-scripts from truefalse in the repo-root .npmrc to fix the Build Executables release job, which has failed for the last 3 releases (since v1.32.0-beta.8).

Review Table

Priority Category Check Status Notes
High Security No hardcoded secrets or credentials Pass Config-only
High Security Auth / input / IDOR / SQLi N/A No such surface in this change
High Security Supply-chain: install-script execution Pass (note) Re-enables lifecycle scripts on install — see Findings. Restores pre-existing behavior; repo-local & CI-only
High Correctness Logic correct, handles edge cases Pass On npm 6 (Node 14 / Build Executables), ignore-scripts=true suppresses even explicit npm run, so npm run build_cjs no-ops → empty build/cp fails. false restores it
Medium Testing Existing tests still pass Pass 45/45 gating checks green at time of review
Medium Quality Follows existing patterns Pass false is npm's default and the repo's effective behavior before the .npmrc was added
Medium Quality Focused (single concern) Pass One line, one purpose
Low Quality Rationale documented Pass Captured in commit message + PR body

Findings

1. Supply-chain hardening trade-off (informational, not blocking)

  • File: .npmrc:1
  • Issue: ignore-scripts=true blocks dependency preinstall/install/postinstall scripts during npm install/yarn install. Setting it to false re-enables them.
  • Why it's acceptable here:
    • This .npmrc is repo-local and governs only this monorepo's own dev/CI installs. npm excludes .npmrc from published tarballs, so consumers of @percy/* are unaffected.
    • false is npm's default and the repo's effective behavior for years before the .npmrc was introduced by the release-automation PR — this restores known-good state rather than introducing new risk.
    • As committed, the hardening flag broke the executable release build: npm 6 (Node 14 on the Build Executables runner) honors ignore-scripts even for explicit npm run, silently no-op'ing npm run build_cjs so build/ was never produced and cp -R ./build/* packages/ failed.
  • Alternative (if keeping the hardening is desired): keep ignore-scripts=true and instead bypass npm's script runner in scripts/executable.sh (npm run build_cjsBABEL_ENV=dev ./node_modules/.bin/babel packages -d build). Either approach is reasonable.

Overall: ✅ Pass

Verdict: Approve — minimal, correct fix that unblocks the release executable build and restores the repository's long-standing default behavior. The only consideration is the supply-chain trade-off, documented above, which has no impact on published packages.

@pranavz28
pranavz28 merged commit 167090a into master Jun 18, 2026
46 checks passed
@pranavz28
pranavz28 deleted the ci/npmrc-ignore-scripts-false branch June 18, 2026 09:11
@pranavz28 pranavz28 added the 🐛 bug Something isn't working label Jun 18, 2026
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.

2 participants