chore(deps): migrate to conventional-changelog-writer v9#78
Merged
Conversation
Completes the writer v9 bump deferred in the previous commit. v9 replaces the Handlebars template engine with function-based templates, so this is a real migration rather than a version bump: - conventional-changelog-writer 6 -> 9.1.1, plus its now-required companion conventional-changelog-conventionalcommits 6 -> 10.2.1 (only the v10 preset emits the function-based partials the v9 writer consumes). - Both packages are ESM-only; load them via dynamic import from this CommonJS module, matching how main.ts loads @actions/core. - parseArray -> writeChangelogString; preset.writerOpts -> preset.writer. - Translate changelogSections from the preset's old `hidden` boolean to its new `effect` enum. - Pin context.commit to 'commit' (the writer now defaults it to 'commits', which would break every generated commit link). - Preserve the public commitPartial/headerPartial/mainTemplate config surface: these stay Handlebars strings and are compiled with handlebars into the function form the new writer expects. Snapshots updated to drop the redundant blank lines the old Handlebars templates emitted between sections; changelog content is unchanged.
mattt
force-pushed
the
mattt/merge-dependabot-prs
branch
from
July 6, 2026 18:32
b1b6439 to
ff1ff33
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates the changelog generation stack to conventional-changelog-writer v9 (and the v10 conventional commits preset), adapting the codebase to ESM-only dependencies by switching to dynamic imports and vendoring a couple of previously require()-based utilities. It also refreshes affected Vitest snapshots and updates a few workflow and dependency versions.
Changes:
- Migrate changelog notes generation to the v9 writer API (function-based templates) and add tests for custom template overrides.
- Replace ESM-only dependencies (
unist-util-visit*,detect-indent,@actions/core) with local shims or dynamic imports to keep the CommonJS + ncc workflow working. - Update lockfile / dependency versions and refresh snapshots affected by formatting/link changes.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/strategies/snapshots/rust.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/ruby.ts.snap | Snapshot update (blank lines removed; compare URL encoding change). |
| test/strategies/snapshots/php.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/php-yoshi.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/ocaml.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/helm.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/go-yoshi.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/dotnet-yoshi.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/dart.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/strategies/snapshots/base.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/plugins/compatibility/snapshots/linked-versions-workspace.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/plugins/compatibility/snapshots/linked-versions-group-title.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/plugins/snapshots/linked-versions.ts.snap | Snapshot update reflecting changelog whitespace changes. |
| test/changelog-notes/default-changelog-notes.ts | Adds test coverage for custom template overrides in changelog notes. |
| test/changelog-notes/snapshots/default-changelog-notes.ts.snap | Snapshot updates for new writer output formatting. |
| test/snapshots/manifest.ts.snap | Snapshot updates for new writer output formatting. |
| src/util/unist-visit.ts | Adds a local visit/visitWithAncestors implementation to avoid ESM-only unist utilities. |
| src/util/json-stringify.ts | Switches indent detection to a locally vendored implementation. |
| src/util/detect-indent.ts | Vendors detect-indent to avoid ESM-only dependency issues. |
| src/main.ts | Loads @actions/core via dynamic import and refactors action entrypoint error handling. |
| src/commit.ts | Replaces unist-util-visit* usage with the local visitor utilities. |
| src/changelog-notes/default.ts | Refactors changelog generation to use writer v9 APIs and Handlebars compilation for backward-compatible template strings. |
| pnpm-lock.yaml | Updates lockfile for migrated dependencies and related version bumps. |
| package.json | Bumps conventional-changelog-writer/preset versions, updates supporting deps, and adds Handlebars. |
| .github/workflows/self-test.yml | Updates actions/checkout major version. |
| .github/workflows/release.yml | Updates actions/checkout major version. |
| .github/workflows/ci.yaml | Updates actions/checkout major version. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Addresses PR review feedback. The v9 writer's compare-URL builder percent-encodes tag names, turning the '/' in monorepo component tags (e.g. "google-cloud-automl/v1.2.3") into '%2F' — which GitHub does not resolve in /compare links. Override the preset's formatCompareUrl to reproduce the unescaped URL release-please has always generated. (The review's other note — that the conventionalcommits factory is async and exposes `.writerOpts` — describes the pre-v9 API; v10's createPreset is synchronous and exposes `.writer`. Documented inline.)
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.
Closes #71