Skip to content

Commit

Permalink
fix(version): use --no-frozen-lockfile instead of --fix-lockfile
Browse files Browse the repository at this point in the history
- to fix a regression or a change in behavior with pnpm 7.4.0, the pnpm maintainer is suggesting to use `pnpm i --lockfile-only --no-frozen-lockfile`  instead of `--fix-lockfile`
  • Loading branch information
ghiscoding committed Jun 30, 2022
1 parent 9f1ad41 commit a6120b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -161,7 +161,7 @@ describe('run install lockfile-only', () => {

const lockFileOutput = await runInstallLockFileOnly('pnpm', cwd);

expect(execSpy).toHaveBeenCalledWith('pnpm', ['install', '--lockfile-only', '--fix-lockfile'], { cwd });
expect(execSpy).toHaveBeenCalledWith('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile'], { cwd });
expect(lockFileOutput).toBe('pnpm-lock.yaml');
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/version/src/lib/update-lockfile-version.ts
Expand Up @@ -131,7 +131,7 @@ export async function runInstallLockFileOnly(
inputLockfileName = 'pnpm-lock.yaml';
if (await validateFileExists(path.join(cwd, inputLockfileName))) {
log.verbose('lock', `updating lock file via "pnpm install --lockfile-only"`);
await exec('pnpm', ['install', '--lockfile-only', '--fix-lockfile'], { cwd });
await exec('pnpm', ['install', '--lockfile-only', '--no-frozen-lockfile'], { cwd });
outputLockfileName = inputLockfileName;
}
break;
Expand Down

0 comments on commit a6120b9

Please sign in to comment.