Files
pnpm/network/git-utils
Zoltan Kochan 53668a42b8 fix: support explicit versions and --no-commit-hooks / --no-git-tag-version in pnpm version (#11299)
* fix: support explicit versions and --no-commit-hooks / --no-git-tag-version in `pnpm version`

Registers options under their canonical names so nopt correctly parses the
`--no-*` variants, accepts an explicit semver argument alongside bump types,
and creates a git commit + annotated tag for the bump (honoring
`--no-git-tag-version`, `--no-commit-hooks`, `--sign-git-tag`, `--message`,
and `--tag-version-prefix`). Also fixes `--no-git-checks` which was parsed
incorrectly. Closes #11271.

* chore: add gpgsign and newversion to cspell; set gpg sign config in version test

* fix: address Copilot review feedback on pnpm version

* fix: skip git commit and tag in recursive version runs

* fix: address Copilot review feedback on pnpm version
2026-04-20 00:26:32 +02:00
..

@pnpm/git-utils

Utilities for git

npm version

Installation

pnpm add @pnpm/git-utils

Usage

'use strict'
const { getCurrentBranchName } = require('@pnpm-utils').default

main()
async function main() {
  const branchName = await getCurrentBranch();
  console.log(branchName)
}

License

MIT