[Feature] disable lockfile
See original GitHub issue- I’d be willing to implement this feature
- This feature can already be implemented through a plugin
Describe the user story
When developing libraries, having a lock file can prevent the detection of issues with newer packages, that ultimately will be pulled by dependents.
But maybe still locking dev-dependencies can be useful. This would be up to the developer?
Describe the solution you’d like
In a perfect world, we should be able to choose what dependencies to lock: all
, dev
, none
.
all
would primarily be used by applications (no dependents).dev
andnone
could be used for libraries (that have dependents).
It can be a field in .yarnrc.yml
, maybe lock: (all|dev|none)
?
Berry should be able to replace already installed dependencies by a new one if available (and not locked) when doing yarn install
. It can be annoying to delete the whole node_modules
folder every time. Edit: or should a dev use it would upgrade dev dependencies as well, which we might not want.yarn upgrade
in this case?
Describe the drawbacks of your solution
Maybe slower installs? I can live with that as long as it does what I want. Only impacts people disabling the lockfile.
Describe alternatives you’ve considered
Running yarn upgrade
often. But this pollutes the commit history in some way, and might lead to merge conflicts on the lockfile. Even though old yarn was able to resolve those conflicts, it is still annoying to land in that state.
Additional context
N/A
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
This isn’t something we’ll implement. More details here.
@arcanis
We have
yarn --no-lockfile
, why we can’t config it via.yarnrc
? It is not constant. And for some libraries, they’d prefer always keeping latest compatible version.See https://github.com/eslint/eslint-plugin-markdown/pull/182#discussion_r602799343