Skip to content

Commit 9935be2

Browse files
committed
Fix lockfile sync in Version Packages workflow
Use --package-lock-only to update lockfile without modifying node_modules, preventing inconsistencies between CI and local runs.
1 parent 96bf4c9 commit 9935be2

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

.github/changeset-version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import fg from 'fast-glob';
44

55
// This script is used by the `release.yml` workflow to update the version of the packages being released.
66
// The standard step is only to run `changeset version` but this does not update the package-lock.json file.
7-
// So we also run `npm install`, which does this update.
7+
// So we also run `npm install --package-lock-only`, which updates the lockfile without touching node_modules.
88
// This is a workaround until this is handled automatically by `changeset version`.
99
// See https://github.com/changesets/changesets/issues/421.
1010
execSync('npx changeset version', {
1111
stdio: 'inherit'
1212
});
13-
execSync('npm install', {
13+
execSync('npm install --package-lock-only', {
1414
stdio: 'inherit'
1515
});
1616

package-lock.json

Lines changed: 17 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)