Release Workflow
Purpose
This guide describes how Nrgy.js packages are versioned and published. Most contributors and agents will not need to run these commands — releases are typically driven by maintainers.
Release-Relevant Files
- Root CHANGELOG.md records project-level changes.
- Per-package
CHANGELOG.mdfiles track package-level releases. - Package names and install commands must come from current
package.jsonfiles. - Versioning rules live in lerna.json.
- Release commands live in the root package.json.
Release Preparation
- Make sure the working tree contains only the intended changes.
- Run
npm run check. - Run
npm run test. - Run
npm run build. - Verify that the relevant docs and changelog entries are up to date.
Versioning
Use the dry run first:
bash
npm run preview:new-versionCreate versions only after the dry run looks correct:
bash
npm run new-versionpreview:new-versionrunslerna version --dry-run.new-versionrunslerna versionwith conventional commits enabled.- Before versioning, the
preversionhook runsnpm run check,npm run build, andnpm run test, then stages all changes withgit add --all.
Publishing
After the packages are versioned and the release commit is ready, publish from the already versioned packages:
bash
npm run new-publishnew-publishrunslerna publish from-package.- Package releases are based on the versions already written into the package manifests.
Release Notes and Validation
- Review the root
CHANGELOG.mdand the packageCHANGELOG.mdfiles after versioning. - Confirm that generated docs and package READMEs still match the released API.
- If the website docs changed, run the site build from website/package.json before publishing.