-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
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
Generating a complete lock-file without installing #5738
Comments
|
I like the idea. Shouldn't be too hard to implement. |
I found myself needing this today as well. Would this be a difficult thing to implement? |
Wow, a feature that npm has that yarn doesn't. Must be a first :) |
A few other sites ask why this is necessary. In my case, I need to generate the lockfile because one of the dependencies of some package is failing to build, so I can't install. However I can't trace it down without having a lockfile to show what those dependencies are. |
This would be awesome for when you keep your yarn.lock tracked in git, but build your app inside Docker. Without this feature, you always have a useless node_modules folder. Following https://stackoverflow.com/questions/44438303/is-it-possibile-to-generate-a-yarn-lock-file-without-installing-the-packages you could perhaps work around this with:
|
@sesam wouldn't this have the issues of creating a different lockfile compared to generating it through |
This feature is extremely relevant for DevOps teams looking to bump package versions across multiple repos in our codebase. We are running Setting up a shared package cache via a Docker Volume helps, but it still takes a substantial amount of time and bandwidth downloading packages that are ultimately unused. |
My use case is splitting local changes I made to package.json into multiple separate git commits, which happens reasonably often. Right now the only way to commit the lockfile that corresponds to package.json in each commit is to reinstall all packages multiple times, which feels completely unnecessary. |
Any updates for this please? |
Closing as wontfix. While we don't plan to implement this in the core (it's a fringe feature that I'm not sure would be used enough to be worth the maintenance cost for our team), it's trivial to implement as a Yarn 2 plugin. I believe using our API this way is the best option since it will allow you to implement your whole upgrade process, based on the exact logic you want, without having to spawn multiple processes (which would quickly become the bottleneck). |
Now your DevOps team gets to learn how to develop Yarn plugins in Node.js. |
Support for generating/updating a lockfile without creating yarn install --mode update-lockfile |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
yarn generate-lock-entry
emits a file with only root dependencies.If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
To have a command/option for emitting a complete lock-file like with
yarn install
.Please mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: