@nstcactus/semver-release
v1.0.0
Published
A script to automate semver releases following keepachangelog.com conventions
Maintainers
Readme
@nstcactus/semver-release
A Node.js utility to automate software releases following Semantic Versioning and Keep a Changelog conventions.
Features
- Automated Changelog: Moves content from
## [Unreleased]to## [x.y.z] - YYYY-MM-DD. - Link updating: Automatically updates
[unreleased]and adds new version diff links at the end of the file. - Smart Detection: Detects the last version from the second level-2 heading in
CHANGELOG.md. - Git Integration: Creates a commit with message
release: x.y.zand an annotated tag.
Installation
# Install globally from NPM
npm install -g @nstcactus/semver-release
# Or install as a dev dependency in your project
npm install --save-dev @nstcactus/semver-release
# Or don't install it and use npx to run it. Read on for details.Usage
You can run it without installation using npx:
npx @nstcactus/semver-release [options]Or if installed globally:
semver-release [options]Or if installed locally as a dev dependency:
npx semver-release [options]
# or
node ./node_modules/.bin/semver-release [options]Arguments
| Argument | Description |
|:------------------|:--------------------------------------------------------------------------------|
| (no arg) | Defaults to --minor release. |
| --major | Increment the major version (e.g., 1.2.3 -> 2.0.0). |
| --minor | Increment the minor version (e.g., 1.2.3 -> 1.3.0). |
| --patch | Increment the patch version (e.g., 1.2.3 -> 1.2.4). |
| --version <ver> | Specify the new version explicitly (e.g., 1.2.3-rc.1). Bypasses confirmation. |
| --force | Disable the confirmation prompt. |
| --no-prefix | Disable the v prefix for git tags (default: tags are prefixed with v). |
| --no-commit | Update CHANGELOG.md but do not perform git commit or tag. |
| --help | Display usage information. |
Tests
Just run:
npm test