Yarn publishing its versions on its own was inconvenient for people using private npm mirrors, so it makes sense to offer a way to fallback to the npm store when requested. This diff changes the logic so that we use the `@yarnpkg/cli-dist` package when the `COREPACK_NPM_REGISTRY` variable is set. It should be backward-compatible, since the `registry` field is still the same.
Node.js segfaults when using `npm@>=9.7.0` and `v8-compile-cache`
```console
$ docker run -it node:20.3.0-slim corepack npm@9.7.1 --version
[SIGSEGV]
```
If a large number of versions are cached on the host system, trying to
read the whole cache at once can be quite memory intensive. Instead, we
can use an iterative approach that doesn't hold the whole directory
content in memory.
This is useful when `DEBUG=corepack` is set because it tells you where it installed to.
Alternatively, we could add this to the `Install finished` debug line at the end.
* chore: update dependencies, remove unused ones
* fix types
* Updates snapshots
* Fixes prepack
* try with Node.js 16.x
* Update more packages
* Upgrade to Jest 28
* Bump other packages
* Bump other packages
* Use Node.js 14.19.2
* Revert "try with Node.js 16.x"
This reverts commit 45aa8a3a96.
This reverts commit 4a275f68b6.
* Use specific Node.js version
* trying something
* Pin exact Node.js version number
* Bump Jest to 28.1.0
* dist-upgrade
* Don't pin Node.js version when it's not necessary
* Update more dependencies
* Update more dependencies
* Revert "Pin exact Node.js version number"
This reverts commit dd72a68061.
Co-authored-by: Maël Nison <nison.mael@gmail.com>