Skip to content

Plugin: updater-npm

Updates the version field in a package.json file. Use it to keep Node.js packages aligned with the version selected by SemRel.

Terminal window
go install github.com/SemRels/updater-npm@latest

Each plugin is a standalone Go binary. Keep it on your PATH or reference it with path: in .semrel.yaml. If you keep secrets in a .env file, load them with semrel --env-file .env release.

version: 1
plugins:
- name: updater-npm
path: updater-npm
args:
file: package.json
NameRequiredDefaultDescription
SEMREL_PLUGIN_FILEnopackage.jsonPackage manifest to update.
  • SEMREL_NEXT_VERSION
  • SEMREL_CURRENT_VERSION
  • SEMREL_TAG_NAME
  • SEMREL_DRY_RUN

For a 1.4.0 release, the updater can change "version": "1.3.2" to "version": "1.4.0" in package.json.