Verdaccio is an open source local NPM registry. We use it to test out publishing and link together projects internally before publishing

  • NOTE: only run verdaccio when you need to test publishing. otherwise, this will pollute the yarn.lock file with localhost entries which will fail in CI/CD

Setup Verdaccio

npm install -g verdaccio

No note with name found

  • create a user
npm login {user}
# follow login instructions
# this allows you to run `npm publish`

Switch to local npm

# source helpers 
. bootstrap/scripts/
# change registry to local endpoint
# run local endpoint

Switch back to remote endpoint

# switch back to remote endpoint

Publishing Packages Locally

After you setup a local npm registry, you can run the following commands to publish locally

lerna publish from-package --ignore-scripts
# updates meta.json with latest package versions
node bootstrap/scripts/genMeta.js