Skip to content

Bug: Pre-release strategy forces Minor bump (0.1.1-rc.0 → 0.1.2-rc.0) ignoring recent tag and fix-only commits #2641

@michalby24

Description

@michalby24

Thanks for stopping by to let us know something could be better!

Please provide the following details.

Environment details

  • OS: ubuntu-latest (Github Actions)
  • Node.js version: Github action default
  • npm version: 11.6.2
  • release-please version: 17.1.3

Steps to reproduce

  1. Configure release-please with the node strategy in a monorepo setup (using the packages config).
  2. Enable pre-releases on a specific branch (e.g., next) with prerelease: true and prerelease-type: "rc".
  3. Establish a baseline release with a tag, e.g., v0.1.1-rc.0.
    • Manifest: { ".": "0.1.1-rc.0" }
    • Git Tag: v0.1.1-rc.0
    • GitHub Release: v0.1.1-rc.0 exists.
  4. Create a new commit with a patch-level scope, e.g., fix: verify automatic rc increment.
  5. Run the Release Please action.

Expected Behavior:
The next version should be 0.1.1-rc.1 (incrementing the pre-release counter for a patch fix).

Actual Behavior:
Release Please proposes 0.1.2-rc.0 (bumping the minor version and resetting the pre-release counter, despite only having fix commits).

Logs:

Run googleapis/release-please-action@v4
Running release-please version: 17.1.3
...
✔ Collecting release commit SHAs
❯ Found release for path ., v0.1.1-rc.0
❯ release for path: ., version: 0.1.1-rc.0, sha: ---
✔ Collecting commits since all latest releases
❯ Set(1) { '---' }
...
✔ Splitting 1 commits by path
✔ Building candidate release pull request for path: .
❯ type: node
❯ targetBranch: next
❯ commits: 1
...
❯ Fetching package.json from branch next
✔ updating from 0.1.1-rc.0 to 0.1.2-rc.0

It appears the pre-release strategy is calculating the next version as a Minor bump (0.1.2) rather than maintaining the Patch scope (0.1.1) for the RC iteration, even though the only new commit is a fix.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions