We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package.json
--lockfile-only
readPackage
7.16.0
foo/package.json
{ "name": "foo" }
.pnpmfile.cjs
module.exports = { hooks: { readPackage(pkg, ctx) { pkg.dependencies = { lodash: "*" }; return pkg; } } }
pnpm-workspace.yaml
packages: - foo
pnpm i --lockfile-only
pnpm-lock.yaml
pnpm-lock.yaml and package.json which have invalid state are updated.
pnpm-lock.yaml and all package.json modified in readPackage hook are updated with changes from readPackage.
Note that this behavioural difference is different from running pnpm install alone.
pnpm install
node -v
v16.18.0
The text was updated successfully, but these errors were encountered:
I'm still not sure why pnpm-lock.yaml is required for the bug to manifest, but I did manage to fix the issue. I'll have a PR up later today.
Sorry, something went wrong.
fix: --lockfile-only and readPackage hook modifying workspace pac…
868f2fb
…kages (#5678) close #5670
Successfully merging a pull request may close this issue.
pnpm version:
7.16.0
Code to reproduce the issue:
foo/package.json
.pnpmfile.cjs
pnpm-workspace.yaml
pnpm i --lockfile-only
to generatepnpm-lock.yaml
pnpm i --lockfile-only
to triggerpackage.json
mutation bugExpected behavior:
pnpm-lock.yaml
andpackage.json
which have invalid state are updated.Actual behavior:
pnpm-lock.yaml
and allpackage.json
modified inreadPackage
hook are updated with changes fromreadPackage
.Note that this behavioural difference is different from running
pnpm install
alone.Additional information:
node -v
prints:v16.18.0
The text was updated successfully, but these errors were encountered: