ci: set ignore-scripts=false to fix executable build#2300
Merged
Conversation
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>
rishigupta1599
approved these changes
Jun 18, 2026
Contributor
Author
🤖 Claude Code Review —
|
| 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=trueblocks dependencypreinstall/install/postinstallscripts duringnpm install/yarn install. Setting it tofalsere-enables them. - Why it's acceptable here:
- This
.npmrcis repo-local and governs only this monorepo's own dev/CI installs. npm excludes.npmrcfrom published tarballs, so consumers of@percy/*are unaffected. falseis npm's default and the repo's effective behavior for years before the.npmrcwas 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-scriptseven for explicitnpm run, silently no-op'ingnpm run build_cjssobuild/was never produced andcp -R ./build/* packages/failed.
- This
- Alternative (if keeping the hardening is desired): keep
ignore-scripts=trueand instead bypass npm's script runner inscripts/executable.sh(npm run build_cjs→BABEL_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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inscripts/executable.shat:Root cause
The release-automation PR added a root
.npmrcwithignore-scripts=true. The Build Executables runner uses Node 14 → npm 6, and npm 6 honorsignore-scriptseven for explicitnpm run <script>(npm 7+ later relaxed this). Sonpm run build_cjs(BABEL_ENV=dev babel packages -d build) became a silent no-op —build/was never created — and the followingcp -R ./build/* packages/failed.yarn buildtwo lines earlier is unaffected because it runs vialerna+ Nx, whose task runner executes package scripts directly rather than throughnpm run.Verified by elimination: same runner image, same Node version, and the exact
v1.32.0source tree all buildbuild_cjsfine; the only delta at the first failing tag was this.npmrc.Fix
Set
ignore-scripts=falsesonpm run build_cjsexecutes on the npm-6 runner.🤖 Generated with Claude Code