Replies: 3 comments 1 reply
-
|
If the |
Beta Was this translation helpful? Give feedback.
-
|
If you want the lockfile to stay the source of truth, it should not be updated, even after manually modifying the This also stimulates using |
Beta Was this translation helpful? Give feedback.
-
|
I think that this is a situation where pinning your dependencies in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am all for semver. I don't use pinned versions in mijn
package.json, that is what 🔒 lock-files are for.I really like the choice PNPM made about differentiating the
installandaddcommands 🙌One thing I'd like to see is that running
pnpm installdoesn't update the lock-file. I have read the reasoning behind Yarn's choice to DO update the lock-file and it comes down to this:This is the explanation behind Yarn's decision. And
npmacts the same out of legacy. But times have changed ...I disagree that⚠️ warning when running
pnpm installshould implicitly updates the lock-file. I advocate for this being an explicit instruction, for the sake of clarity and consistency. When the lock-file is out of sinc with thepackage.json, this should trigger apnpm install. The developer should then explicitly update the lock-file to become in sync with thepackage.json:pnpm install --no-frozen-lockfile ## Or a new flag if `--frozen-lockfile` could be removed in favor of being the default pnpm install --update-lockIf this change would be too much of a breaking change, it could be enabled by a configuration in the
pnpm-workspace.yaml:I would ❤️ to hear the view of others and a proper discussion about the feasibility.
PS: Comming from the PHP ecosphere, I have a lot of experience with Composer which inspired this proposition.
Beta Was this translation helpful? Give feedback.
All reactions