Follow these steps when releasing the Nightwatch Browserstack plugin:
- Merge the corresponding pull request (PR) using squash and merge.
- Clone a fresh copy of the repository locally to avoid publishing uncommitted files.
- Run
npm install(ornpm i) to install dependencies. - Run
npm audit fixto automatically resolve fixable vulnerabilities.
Note: This only changespackage-lock.json. It is safer than using--force, which may change package versions unexpectedly. - Commit and push any changes resulting from
npm audit fix. - Bump the version in
package.json(e.g.,3.6.2→3.7.0for a minor bump). - Run
npm installagain to updatepackage-lock.jsonafter the version bump. - Stage and commit the version bump changes.
Release commit names should match the version number, e.g.,3.7.0. - Add a tag:
git tag v3.7.0
- Push commits and tags:
git push origin main --tags
- Login to npm (if not already authenticated):
Requires an npm account.
npm login
- Publish the package to npm:
Requires an npm account with permission for this package (typically by joining the Nightwatch organization on npm). For accounts with 2FA, a mobile verification code will be requested.
npm publish
- Create a release on GitHub:
- Select the new tag.
- Generate release notes.
- Publish the release.