Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

semver

> 编程语言
Open source

Nx plugin to automate semantic versioning and CHANGELOG generation.

769 stars0 likes2 views
WebsiteGitHub

About

Nx plugin to automate semantic versioning and CHANGELOG generation.

@jscutlery/semver

Nx plugin for versioning using SemVer and CHANGELOG generation powered by Conventional Commits.

Setup

Install

bash
npm install -D @jscutlery/semver
nx g @jscutlery/semver:install

This package allows you to manage your Nx workspace using one of two modes: Synced or Independent.

Independent mode (default)

Allow multiple projects to be versioned independently. This way you release only what you want and consumers don't get updates they don't need. This allows small, rapid and incremental adoption of your packages.

Synced mode

Allow multiple projects to be versioned in a synced/locked mode. Use this if you want to automatically tie all package versions together. This mode is useful when you are working with only one product. One issue with this approach is that a major change in any project will result in all projects having a new major version.

Usage

Release

Independent mode

Release project independently by running:

nx run my-project:version [...options]

You can leverage the affected command to only version changed packages:

nx affected --target version [...options]

Synced mode

Release workspace by running:

nx run workspace:version [...options]

When run, this executor does the following

  1. Optionally verifies npm registry authentication (with --verifyNpmAuth).
  2. Retrieve the current version by looking at the last git tag.
  3. Bump package.json version based on the commits.
  4. Generates CHANGELOG based on the commits (uses conventional-changelog-conventionalcommits under the hood).
  5. Creates a new commit including the package.json file and updated CHANGELOG.
  6. Creates a new tag with the new version number.
  7. Pushes the version to the remote repository.
  8. Runs post-targets hook to publish the version on NPM, GitHub or GitLab.

Available options

name type default description
--dryRun boolean false run with dry mode
--noVerify boolean false skip git hooks
--enforceAtomicPush boolean false enforce an atomic push without retrying a non atomic one in case of failure
--push boolean false push the release to the remote repository
--verifyNpmAuth boolean false verify npm registry authentication before versioning (details)
--syncVersions boolean false lock/sync versions between projects
--skipRootChangelog boolean false skip generating root changelog
--skipProjectChangelog boolean false skip generating project changelog
--origin string 'origin' push against git remote repository
--baseBranch string 'main' push against git base branch
--changelogHeader string undefined custom Markdown header for changelogs
--releaseAs string undefined specify the level of change (details)
--preid string undefined specify the prerelease identifier (eg: alpha, beta) (details)
--tagPrefix string undefined specify the tag prefix (details)
--tagSign boolean false Make a GPG-signed git tag, using git --sign
--postTargets string[] [] specify the list of target to execute post-release (details)
--trackDeps boolean false bump dependent packages (bump A if A depends on B) (details)
--trackDepsWithReleaseAs boolean false enables --trackDeps when using it with --releaseAs
--allowEmptyRelease boolean false force a patch increment even if library source didn't change
--skipCommitTypes string[] [] treat commits with specified types as non invoking version bump (details)
--skipCommit boolean false skips generating a new commit, leaves all changes in index, tag would be put on last commit (details)
--skipStage boolean false skips add to git stage, useful when you want to run nx cmd in parallel (details)
--commitMessageFormat string undefined format the auto-generated message commit (details)
--preset string | object 'conventionalcommits' customize Conventional Changelog options (details)
--commitParserOptions object undefined customize the commit parserConfig (details)

Guides

Overwrite default configuration

You can customize the default configuration using the definition file:

json
{
  "executor": "@jscutlery/semver:version",
  "options": {
    "baseBranch": "master",
    "preset": "atom",
    "tagPrefix": "{projectName}@"
  }
}

Customizing Conventional Changelog

This tool comes with a list of pre-configured presets:

  • conventionalcommits (default)

  • angular

    Complete list of presets

    • conventionalcommits (default)
    • angular
    • atom
    • codemirror
    • ember
    • eslint
    • express
    • jquery
    • jshint

The preset is highly configurable, following the conventional-changelog-config-spec. As an example, suppose you're using GitLab, rather than GitHub, you might modify the following variables:

json
{
  "executor": "@jscutlery/semver:version",
  "options": {
    "preset": {
      "commitUrlFormat": "{{host}}/{{owner}}/{{repository}}/commit/{{hash}}",
      "compareUrlFormat": "{{host}}/{{owner}}/{{repository}}/compare/{{previousTag}}...{{currentTag}}",
      "issueUrlFormat": "{{host}}/{{owner}}/{{repository}}/issues/{{id}}",
      "types": [
        { "type": "feat", "section": "✨ Features" },
        { "type": "fix", "section": " Bug Fixes" },
        { "type": "chore", "hidden": true }
      ]
    }
  }
}

[!NOTE] When customizing a preset it will implicitly use the conventionalcommits preset and override the default settings with the given configuration.

It is possible to customize any preset by passing its name.

json
{
  "executor": "@jscutlery/semver:version",
  "options": {
    "preset": {
      "name": "angular",
      "types": [
        { "type": "feat", "section": "✨ Features" },
        { "type": "fix", "section": " Bug Fixes" }

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptautomationconventional-commitsmonoreponx-plugin

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言