A script that resets the resolves registry URLs in package lock to the official NPM registry.
Last updated 8 months ago by splashdust .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install package-lock-sanitizer 
SYNC missed versions from official npm registry.

package-lock.json sanitizer

This tool rewrites the resolved URLs in package-lock.json, replacing the registry part of the URL with the offcial NPM registry URL (by default).

This is useful if you are working behind some kind of NPM proxy with an internal URL that you don't want to expose outside of your organisation. Add this script as a pre-commit hook to make sure that you don't commit those URLs to your repository.


Run this to see all the options

$ package-lock-sanitizer --help

Example usage as a pre-commit hook with Husky: (in package.json)

"husky": {
    "hooks": {
        "pre-commit": "npm run package-lock-sanitizer && git add package-lock.json"

Current Tags

  • 1.0.0                                ...           latest (8 months ago)

1 Versions

  • 1.0.0                                ...           8 months ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (6)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2017 © |