pin-latest
Small utility for converting package.json
versions from latest
to the actual latest version.
Quickstart
Install
npm i -g pin-latest
# or
yarn global add pin-latest
# or
npx pin-latest
Given the following package.json
:
{
"name": "example-project",
"dependencies": {
"react": "latest"
}
}
Running pin-latest
will result in the following output:
$ pin-latest .
{
"name": "example-project",
"dependencies": {
"react": "^16.13.1"
}
}
To save changes pass the --write
flag:
$ pin-latest .
package.json updated.
$ cat package.json
{
"name": "example-project",
"dependencies": {
"react": "^16.13.1"
}
}
Usage
$ pin-latest --help
Usage
$ pin-latest <project-directory>
Options
--exact, -t Set the exact version
--write, -w Write changes
--version, -v Version number
--help, -h Displays
…