Use when releasing a LiteJS package with lj release / lj r — version bumping, changelog generation, tagging, and publishing
Automates package releases: version bump, changelog, commit, tag, and publish instructions.
lj release [version] # full form
lj r [version] # shorthand
git fetch + verify upstream is ancestor of HEADrm -rf node_modules && npm installlj lintnpm outdated (local deps)npm outdated -g (global deps, if configured)YY.MM.0 or increment last segment)v<version> does not existlj buildlj test --brief test/index.js$EDITOR (default: vim) for reviewgit commit -a + git tag -a v<version>npm publish command| Flag | Default | Effect |
|---|---|---|
--no-build | build | Skip build step |
--no-install | install | Skip node_modules reinstall |
--no-lint | lint | Skip linting |
--no-test | test | Skip tests |
--no-update | update | Skip outdated check |
--no-upstream | upstream | Skip upstream check |
--no-global | global="" | Skip global outdated check |
--rewrite | false | Amend the last release tag instead of creating new |
--set-version | ["package.json#version"] | Files to update version in. file#path notation, supports JSON (dot path) and TOML ([section].key) |
Options can also be set in package.json#litejs or .github/litejs.json.
By default, only package.json#version is updated. Use --set-version to update additional files:
lj r --set-version="package.json#version" --set-version="tree-sitter.toml#package.version"
Or in .github/litejs.json:
{
"release": {
"setVersion": ["package.json#version", "tree-sitter.toml#package.version"]
}
}
Supported formats:
manifest.json#metadata.versionconfig.toml#package.version matches version under [package]YY.MM.0 (e.g. 26.2.0)26.1.0 -> 26.1.1)lj r 1.2.3 overrides auto-calculation1.2.3-beta.1) always increment last segmentCommits since last tag are grouped by subject line matching:
| Category | Pattern |
|---|---|
| New Features | /\badd\b/i |
| Removed Features | /\b(remove|drop)\b/i |
| API Changes | /\bapi\b/i |
| Breaking Changes | /\bbreak[ei]/i |
| Fixes | /fix\b/i |
| Enhancements | catch-all |
The generated message looks like:
Release v26.2.0
New Features:
- Add foo support (Author Name)
Fixes:
- Fix bar edge case (Author Name)
After the command completes it prints:
VERSION: 26.2.0
PUBLISH: npm publish
For pre-release versions it prints npm publish --tag next.
lj r # creates commit + tag locally
git push && git push --tags # triggers CI
# CI runs tests, verifies tag signature, creates GitHub release, publishes to npm
lj r --rewrite amends the last release — rebases onto previous tag, cherry-picks, then git commit --amend and git tag -f.
LiteJS repos use a shared GitHub Actions workflow (litejs/.github/.github/workflows/release.yml) triggered by refs/tags/v*:
npm publish --provenance --access public (tagged latest or next)Requires: RELEASE_SIGNERS variable and NPM_TOKEN secret in GitHub repo settings.
Each step can fail independently. The error message tells you which --no-* flag to use to skip it: