Skip to content

fix(version)!: default to conventionalcommits and reject unsupported presets - #694

Merged
goosewobbler merged 2 commits into
mainfrom
fix/652-default-preset
Oct 23, 2026
Merged

goosewobbler merged 2 commits into
mainfrom
fix/652-default-preset

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Description

The default version.preset (conventional) could never load. On a tagged repo the failed preset import rejected unobserved across an await, so release / standing-pr update crashed with exit 1 and no JSON envelope.

  • version.preset is now an enum of the shipped presets, conventionalcommits (default) and angular. Anything else fails config load with a CONFIG_ERROR (exit 2) listing the supported names. The enum shows in the JSON schema and the generated config docs.
  • Presets come from static imports and are created eagerly. They resolve from releasekit's own dependencies in any install layout, including the bundled release/dist the Action runs, and there's no lazy preset promise left to reject unobserved. The preset map is typed by the config enum, so adding a preset to one without the other fails typecheck.
  • Dropped the conventional-changelog-conventional-commits alias dependency and the dead preset fallbacks.
  • The e2e, package-isolation and examples-smoke harnesses no longer install or hoist presets at the consumer level, so CI now checks that loading doesn't depend on layout.
  • Docs give one default and one supported list.

Breaking: "preset": "conventional" / "conventional-commits" now fail validation. Use "conventionalcommits" or omit the key. (conventional never loaded; conventional-commits only worked through a hoisted alias, and never from the bundled CLI.)

Related Issue(s)

Closes #652

Type of Change

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

  • New tests: an unknown or legacy preset throws a ConfigError (config); release and standing-pr update write a CONFIG_ERROR envelope to --output and exit 2 (release); test/e2e/preset.sh covers no preset on a tagged repo (exit 0, conventionalcommits rules: feat!: → 2.0.0) and "nonsense" tagged/untagged (exit 2, CONFIG_ERROR on stdout / --output, no crash output).
  • Ran locally: scripts/test-packages.ts (strict pnpm, no hoisting), scripts/test-e2e.ts (all 19 shell tests, no consumer presets), the examples-smoke minimal fixture dry-run, and version's integration suite after rebasing onto test(version): run the integration suite in CI and fix its stale sync-tags fixture #685.
  • Not addressed: a config error's stderr is still the multi-line validation message, printed twice by release, as for every config error today. releasekit-version's config-error exit code is left to feat(cli)!: envelope the version and publish commands, unwrap on the pipe #616.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were established.

Summary

Changes version.preset to default to conventionalcommits and accept only the two shipped presets.

  • Version calculations use a supported preset by default.

No actionable issues were established. goosewobbler explicitly identifies rejection of the legacy preset names as an intentional breaking change. goosewobbler leaves duplicate config-error stderr unchanged and defers the standalone version-command exit code to #616.

Reviews (1) · Last reviewed commit: "fix(version)!: default to conventionalco..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 20h 11m · ✅ ready to merge

Release Preview — v0.41.2 → v0.42.0

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.42.0

Added

  • BREAKING envelope the version and publish commands, unwrap on the pipe (cli) (PR #616)

Changed

  • drop the preset troubleshooting entry and the history in preset comments

Fixed

  • BREAKING default to conventionalcommits and reject unsupported presets (version) (#652)

All packages → 0.42.0 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.42.0 0.42.0

Updated automatically by ReleaseKit

…presets

The default version.preset ("conventional") never loaded, and on a tagged
repo the failed preset import rejected unobserved across an await, killing
release / standing-pr update with no JSON envelope.

- version.preset is now an enum of the shipped presets (angular,
  conventionalcommits), defaulting to conventionalcommits; anything else is a
  ConfigError (CONFIG_ERROR, exit 2) listing the supported names.
- Presets load via static imports and are created eagerly, so they resolve
  from releasekit's own dependencies in any install layout (including the
  bundled release CLI the Action runs) and no lazy promise can reject
  unobserved.
- Drop the conventional-changelog-conventional-commits alias dependency and
  the dead preset fallbacks; the e2e, package and examples-smoke harnesses no
  longer install or hoist presets at the consumer level.

BREAKING CHANGE: version.preset accepts only "conventionalcommits" (the
default) and "angular". "conventional" and "conventional-commits" now fail
config validation; use "conventionalcommits" or omit the key.

Closes #652

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@goosewobbler
goosewobbler force-pushed the fix/652-default-preset branch from 1d4679c to 9c82142 Compare October 23, 2026 12:57
… comments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Default version.preset ("conventional") can't be loaded; a bad preset crashes release/standing-pr with an unhandled rejection and no envelope

1 participant