Skip to content

fix: include full history in first release - #367

Open
Jason10191019999 wants to merge 2 commits into
fastify:mainfrom
Jason10191019999:fix/first-release-without-tags
Open

Jason10191019999 wants to merge 2 commits into
fastify:mainfrom
Jason10191019999:fix/first-release-without-tags

Conversation

@Jason10191019999

Copy link
Copy Markdown

Summary

  • When no matching tag exists, treat the default fromCommit=HEAD as an unspecified starting point instead of producing an empty HEAD...HEAD range.
  • Only pass from and to to simple-git when a starting commit is present, allowing its default full-history log for a first release.
  • Preserve explicit commit ranges and tagged-release behavior.
  • Add a regression test using a real temporary Git repository with two commits and no tags.

Fixes #186

Validation

  • The new regression test failed before the fix with 0 == 2; it now includes both commits and passes.
  • npm test: 62 passed, 0 failed; statement, branch, function, and line coverage all remain 100%.
  • npm run lint: passed.
  • git diff --check: passed.

No npm package was published and no GitHub release was created during local validation.

@Jason10191019999

Copy link
Copy Markdown
Author

The previous failure on Node 22 / windows-latest was not a test assertion: the node:test runner aborted test\command-publish.test.js with Unable to deserialize cloned data due to invalid or unsupported version. (ERR_TEST_FAILURE from the runner's IPC), which then cascaded into the 100% coverage threshold error. The full suite passes locally on Windows with 100% coverage, and all other matrix jobs passed. I've pushed an empty commit to retrigger CI — could a maintainer approve the pending workflow run? Thanks!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERROR: There are ZERO commit to release! is thrown when doing a very first release of a package

1 participant