chore: add npmrc file with ignore-scripts. yes, and offline configuration#29882
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes affect only the npm package management behavior and have zero impact on:
No E2E tests need to run for these changes. They are purely developer tooling/configuration changes with no user-facing or test-facing impact. Performance Test Selection: |
|



Description
The .npmrc file configures npm's behavior for this project. Here's what each line does:
ignore-scripts = true Prevents npm from automatically running lifecycle scripts (like preinstall, postinstall, prepare, etc.) defined in package.json of installed dependencies. This is a security measure — it stops potentially malicious packages from executing arbitrary code during installation. The tradeoff is that some packages that rely on build scripts (like native modules) won't set themselves up automatically, which is why this project uses yarn setup instead of a plain install.
yes = false Disables automatic "yes" responses to prompts. This ensures npm will actually pause and ask for confirmation on interactive prompts rather than silently accepting defaults — useful to avoid unintended actions during scripted environments.
offline = true Forces npm to only use the local cache and never hit the network. If a package isn't already cached, the install fails rather than fetching it. This is a reproducibility and security measure — it ensures installs are deterministic and prevents supply-chain attacks from packages being silently swapped on the registry.
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Adds a repo-wide
.npmrcthat changes dependency-install behavior (disables lifecycle scripts and forces offline/cache-only installs), which can break installs in CI/dev environments if assumptions differ.Overview
Adds a committed
.npmrcconfiguring npm toignore-scripts, disable auto-yes, and run inofflinemode.Updates
.gitignoreto stop excluding.npmrc, so these npm defaults are versioned and applied consistently across the project.Reviewed by Cursor Bugbot for commit d54246b. Bugbot is set up for automated code reviews on this repo. Configure here.