Assert that all packages have {"private": true}
so you can't accidentally publish private code.
It'll find all package.json
files in a directory that are not a subdirectory of node_modules
and assert that they contain {"private": true}
.
This is mostly useful for monorepos.
To install
npm install orangemug/assert-pkgs-private
Via code
const assertPkgsPrivate = require('assert-pkgs-private');
assertPkgsPrivate(__dirname+"/path/to/test-dir");
MIT