fix(release): correct commit-analyzer releaseRules precedence - #91
Merged
Conversation
@semantic-release/commit-analyzer applies releaseRules in array order
where the LAST matching rule wins, not the first. The unscoped
{ type: chore, release: false } catch-all was listed after the scoped
chore(deps)/chore(deps-dev) rules, so it silently overrode them for
every chore commit — meaning security dependency bumps committed as
chore(deps) never actually triggered a patch release (confirmed by
running @semantic-release/commit-analyzer directly against the commit
message from PR #87 before/after this reorder).
Fix: move the unscoped chore catch-all before the scoped overrides so
last-match-wins produces the intended precedence.
Verified locally against representative commit messages:
- chore(deps): ... -> patch
- chore(deps-dev): ... -> patch
- chore: ... (no scope) -> no release
- chore(release): ... -> no release
- fix: ... -> patch
- docs: ... -> no release
- feat!: ... with BREAKING CHANGE -> major
lint: npx eslint . -> 0 errors
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Member
Author
|
🎉 This PR is included in version 1.5.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
chore(deps): ...security dependency patch never triggered a release:@semantic-release/commit-analyzerresolvesreleaseRulesby last matching rule wins, not first match..releaserc.jsonlisted the unscoped{ type: "chore", release: false }catch-all after the scopedchore(deps)/chore(deps-dev)rules, so it silently overrode them for every chore commit.@semantic-release/commit-analyzerand running it against the PR chore(deps): patch transitive dev-dep vulnerabilities #87 commit message both before and after this reorder — confirmednullbefore,patchafter.chorecatch-all before the scoped overrides.Verified behavior post-fix for representative commit types:
chore(deps): ...chore(deps-dev): ...chore: ...(no scope)chore(release): ...fix: ...docs: ...feat!: ...+BREAKING CHANGEOnce this merges, the next semantic-release run will re-analyze the still-unreleased
chore(deps)commit from PR #87 with the corrected rules and should cut a 1.5.1 patch release.Test plan
npx eslint .→ 0 errorsnpm run build→ passes (incl. Obsidian 1.11.0 compat check)npx vitest run→ 494 passed (33 files)🤖 Generated with Claude Code