Generating a complete lock-file without installing

Do you want to request a feature or report a bug?


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.

Yarn: 1.6.0

Author: Fantashit

2 thoughts on “Generating a complete lock-file without installing

  1. 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.

  2. This feature is extremely relevant for DevOps teams looking to bump package versions across multiple repos in our codebase. We are running yarn upgrade for hundreds of repos within Docker containers, and the installation of dependencies is causing each repo to take 10s of minutes. We only want to bump the package.json and yarn.lock in the migration, and rely on our CICD pipeline to handle the actual installation and testing of the changes.

    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.

Comments are closed.