Repository navigation
fix(release): commit a hybrid package's Cargo.toml in a direct release - #691
Merged
Merged
Conversation
Contributor
|
Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 18h 34m · ✅ ready to merge Release Preview — v0.41.2 → v0.41.3
These changes will be added to the release PR (#614) when merged: Changelogmonorepo 0.41.2 → 0.41.3
After merge — predicted release
Updated automatically by ReleaseKit |
goosewobbler
force-pushed
the
fix/678-hybrid-cargo-toml-commit
branch
2 times, most recently
from
October 23, 2026 03:14
370ebd0 to
b2e0569
Compare
A hybrid package (package.json plus Cargo.toml or pubspec.yaml in one directory) records a single update, its package.json, and the direct release's git-commit stage stages only update paths and additionalFiles. The bumped Cargo.toml was left out of the release commit and the tree was left dirty. - Publish's prepare stage stages each Cargo.toml it writes, next to the synced locks. - flushPendingWrites returns the paths it wrote, and the direct release passes them to publish with the notes files. Files only the version step writes are committed too: a hybrid's Cargo.toml when publish.cargo.enabled is false, an async-mode hybrid's pubspec.yaml, and the synced Cargo.lock files in that config. Closes #678 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
goosewobbler
force-pushed
the
fix/678-hybrid-cargo-toml-commit
branch
from
October 23, 2026 12:28
b2e0569 to
8ffab2d
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
Merged
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.
Description
In a direct-commit release, a hybrid package (a directory with
package.jsonandCargo.tomlorpubspec.yaml) records one update: itspackage.json.git-commitstages onlyupdates[].filePathplusadditionalFiles, so the bumpedCargo.tomlwas left out of the release commit and the tree was left dirty.Two places write that
Cargo.toml, and now both stage it:publish.cargo.enabled) adds eachCargo.tomlit writes toctx.additionalFiles, next to the synced locks. This also covers a standalonereleasekit publish.publish.cargo.enabledsays, so the prepare fix alone leavespublish.cargo.enabled: falsebroken (e.g. a napi-rs crate).flushPendingWritesnow returns the paths it wrote, andreleasepasses them to publish alongside the notes files. That commits everything the version step wrote, including an async-mode hybrid'spubspec.yamland, with cargo publishing off, theCargo.lockfiles fix(version)!: sync every committed Cargo.lock that records a bumped crate #674 syncs.VersionOutputis unchanged.Not fixed here:
pubspec.yaml(group is Group strategy tags Dart packages without bumping pubspec.yaml or recording the update #649), so there's nothing for the commit to pick up.releasekit versionthenreleasekit publishseparately withpublish.cargo.enabled: falsestill leaves the hybrid'sCargo.tomluncommitted; publish has no record of it without aVersionOutputchange.Related Issue(s)
Closes #678.
Type of Change
feat— New featurefix— Bug fixdocs— Documentation changerefactor— Code refactoringtest— Adding or updating testschore— Maintenance, dependencies, toolingScope
@releasekit/version@releasekit/notes@releasekit/publish@releasekit/release@releasekit/config@releasekit/coreChecklist
pnpm lint)pnpm test)pnpm typecheck)Testing Notes
test/integration/direct-release-hybrid.spec.tsruns the builtreleasekit releaseon a temp repo with a napi-style package (package.json,Cargo.toml, committedCargo.lock) and apackage.json+pubspec.yamlpackage, in async mode with cargo publishing off. It asserts the release commit holds all three at the new version and the tree is clean, and fails with therelease.tschange reverted.Cargo.toml;flushPendingWritesreturns each written path once;runReleasepasses the flushed files and notes files to publish.package.jsonandgit statusshowedM Cargo.toml; after, everything is committed and the tree is clean.mainafter fix(version)!: sync every committed Cargo.lock that records a bumped crate #674: core, version, publish and release suites pass, and so do all integration specs, hybrid and cargo-lock-sync included.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no blocking issue remains.Summary
Direct releases now commit the native manifests and lockfiles written during versioning, even when Cargo publishing is disabled.
Reviews (2) · Last reviewed commit: "fix(release): commit a hybrid package's ..." · Reviewed by Greptile