Skip to content

Commit f1873b2

Browse files
kaigritunKai Gritun
andauthored
fix(core): use --lockfile-only for Bun updateLockFile (#34375)
## Current Behavior The Bun package manager config uses `--frozen-lockfile` for `updateLockFile`: ```typescript updateLockFile: 'bun install --frozen-lockfile', ``` However, `--frozen-lockfile` **prevents** changes to the lockfile, causing `nx release` to fail when trying to update the lockfile after version bumps. ## Expected Behavior Use `--lockfile-only` which generates/updates the lockfile without installing dependencies: ```typescript updateLockFile: 'bun install --lockfile-only', ``` This is consistent with other package managers: - npm: `npm install --package-lock-only` - pnpm: `pnpm install --lockfile-only` - yarn berry: `yarn install --mode update-lockfile` ## Background When Bun support was added in PR #22602 (April 2024), `--lockfile-only` didn't exist in Bun. Bun has since added this flag. Closes #34344 Co-authored-by: Kai Gritun <[email protected]>
1 parent 81c157d commit f1873b2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nx/src/utils/package-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export function getPackageManagerCommand(
231231
return {
232232
install: 'bun install',
233233
ciInstall: 'bun install --no-cache',
234-
updateLockFile: 'bun install --frozen-lockfile',
234+
updateLockFile: 'bun install --lockfile-only',
235235
add: 'bun install',
236236
addDev: 'bun install -D',
237237
rm: 'bun rm',

0 commit comments

Comments
 (0)