Enforce npm ci to prevent package-lock.json churn from peer dependencies#190
Merged
Enforce npm ci to prevent package-lock.json churn from peer dependencies#190
Conversation
…json usage - Add .npmrc to configure npm behavior (save-exact=true for new dependencies) - Update CONTRIBUTING.md with comprehensive npm dependency management section - Document the use of npm ci for routine development to avoid lockfile churn - Explain the "peer": true behavior in package-lock.json and why it's normal - Update devcontainer to use npm ci instead of npm install - Provide clear guidance on when to use npm install vs npm ci Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update npm setup for consistent peer dependency usage
Enforce npm ci to prevent package-lock.json churn from peer dependencies
Feb 8, 2026
rajbos
approved these changes
Feb 8, 2026
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.
The
package-lock.jsonfile was toggling"peer": trueproperties across environments. Root cause: npm 7+ adds these markers for unsatisfied peer dependencies (e.g.,reactfrom@vscode/webview-ui-toolkit), andnpm installmodifies the lockfile even withoutpackage.jsonchanges.Changes
.npmrc: Documents npm configuration (save-exact=true, peer dependency handling)npm cifor routine development (doesn't modify lockfile)npm installfor intentional dependency changes only"peer": truebehavior in lockfile.devcontainer/devcontainer.json: ChangedpostCreateCommandfromnpm installtonpm ciWhy npm ci
CI/CD already uses
npm ciexclusively. This change aligns local development with production builds.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.