`npm pack` with missing file checks
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.flake8
README.md
npm-pack-check.py

README.md

Like npm pack, but checks that all package.json files exist and tries to find requirements missing from files.

This shouldn’t be run on untrusted packages. prepack and postpack scripts can be avoided with npm pack --ignore-scripts, but it’s possible there are other ways to convince npm pack to do something unsafe.

npm() {
    if [[ "$#" = 1 && pack = "$1" ]]; then
        npm-pack-check
    else
        command npm "$@"
    fi
}