Publishing packages to NPM

These are the notes/process I used when developing the Node Reach SDK package:

The “Standard” Release Process

Here is my understanding of the steps that are most commonly expected to be run when publishing a new version of an npm package.

  1. Safety Checks:
    1. git pull
    2. git status
    3. npm ci
    4. npm test
  2. Prepare the Release:
    1. npm run build
  3. Update the Changelog
  4. Update the Version Number:
    1. npm version
    2. Or by hand:
      1. Update version in package.json & package-lock.json
      2. git commit -am ‘2.0.0’
      3. git tag v2.0.0
  5. Publish to npm:
    1. npm publish
  6. Publish to Git:
    1. git push
    2. git push –tags
  7. Create a GitHub Release (optional)