Skip to content

chore(release): delegate analysis and notes to official semantic-release plugins - #56

Merged
zeldrisho merged 1 commit into
mainfrom
chore/semantic-release-standard-plugins
Aug 12, 2026
Merged

chore(release): delegate analysis and notes to official semantic-release plugins#56
zeldrisho merged 1 commit into
mainfrom
chore/semantic-release-standard-plugins

Conversation

@zeldrisho

@zeldrisho zeldrisho commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

Replaces the hand-rolled, git-cliff-style commit parser and changelog renderer in scripts/semantic-release-plugin.ts with the official @semantic-release/commit-analyzer and @semantic-release/release-notes-generator plugins using the conventionalcommits preset.

Root cause found: conventional-changelog-conventionalcommits was missing from the dependency graph entirely — both official plugins declare it, but the lockfile snapshots omitted it, so the standard conventionalcommits preset could never load. That is why a custom git-cliff-flavored parser existed in the first place.

Changes

  • scripts/semantic-release-plugin.ts — now a thin wrapper that delegates analyzeCommits/generateNotes to the official plugins with preset: "conventionalcommits", keeping only the per-package commit path filter (semantic-release core analyzes the whole repository range, which would otherwise bump a package for another package's commits).
  • scripts/semantic-release-options.ts — canonical repository URL is injected only into the notes context for compare/commit links; semantic-release's push-permission verification keeps targeting the actual git origin (matters under branch protection).
  • package.json / pnpm-lock.yaml — declare @semantic-release/commit-analyzer, @semantic-release/release-notes-generator, and conventional-changelog-conventionalcommits in root devDependencies so the preset resolves from the workspace root under pnpm's strict module layout.
  • scripts/semantic-release-plugins.d.ts — ambient types for the untyped official plugins.
  • tests/release.test.ts — integration test now asserts the preset's real output (### Bug Fixes, compare links).
  • docs/release.md — documents the official-plugin delegation and branch-protected dry-run planning mode.

Behavior preserved

  • Version policy unchanged: breaking → major, featminor, fix/perf/revertpatch, other types appear in notes without triggering a release.
  • PR-based release flow untouched: dry-run planning → chore: release packages PR → owner merges → tags/GitHub releases/npm publish via protected environment. No direct-to-main commits, no GitHub Apps.
  • Existing changelog entries keep their old headings; only new entries use the preset's ### Bug Fixes style.

Validation

  • vp run validate passes (check, coverage tests, contract tests, tarball inspection, packaged smoke tests)
  • vp test — 288/288 tests pass
  • No package under packages/* is touched, so no package release is triggered

Summary by CodeRabbit

  • Documentation

    • Updated the release guide with clearer versioning, changelog, dry-run, and publication guidance.
  • Release Improvements

    • Release notes and version decisions now follow the Conventional Commits standard.
    • Generated changelogs include grouped sections and version comparison links.
    • Package-specific release filtering remains supported.
  • Tests

    • Expanded release validation to cover grouped bug fixes and generated comparison links.