Skip to content

fbluemle/package-lock-fix

Repository files navigation

package-lock-fix

Add missing integrity and resolved fields to a package-lock.json file.

ci

Usage

npx npm-lockfile-fix <path/to/package-lock.json> [options]

Options

  • -r, --only-without-resolved - Only patch dependencies without a resolved field
  • -o, --output <file> - Leave input file unmodified and output to specified file
  • --cout - Leave input file unmodified and output to stdout
  • --indent <number> - Number of spaces to indent output with (default: 2)

Examples

Fix lockfile in place

npx npm-lockfile-fix ./package-lock.json

Output to stdout

npx npm-lockfile-fix ./package-lock.json --cout

Save to different file

npx npm-lockfile-fix ./package-lock.json -o ./fixed-package-lock.json

Development

Install dependencies

yarn

Run tests

yarn test

Build

yarn build

Credits

Heavily inspired by a similar Python/Nix CLI tool: npm-lockfile-fix.

License

MIT

About

Add missing integrity and resolved fields to a package-lock.json file

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •