@gera2ld/locky v0.1.1
@gera2ld/locky
Transform yarn.lock
files for different registries.
Requires Node.js greater than v10.0.
Why
yarn.lock
has a resolved
field that contains the full URL to the tarball of each dependency. When installing with the lock file, the package manager will download the package with the resolved
URL instead of resolving it with the name and version.
There is a chance that different users have different network conditions, and they may expect different registry to use, resulting as different resolved URLs to download.
For example, in China the NPM registry is slow and people use taobao registry instead. But for people outside China, it is just the opposite.
With this package, you can always transform the lock file with resolved URLs on an expected registry so that other people could easily install them.
Installation
You can even use it without installation, via npx
.
Or install it globally:
$ yarn global add @gera2ld/locky
Usage
Usage: locky yarn [options] <target>
Transform a yarn.lock file
Options:
-t, --throw Throw exception if lock file is changed
-h, --help display help for command
# transform the yarn.lock to resolve to npm registry
$ locky yarn npm
# use with npx
$ npx @gera2ld/locky yarn npm