Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-sync-versions-operator-core.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smooai/smooth": patch
---

fix(release): `sync-versions.mjs` no longer stamps a `version` onto the external `smooth-operator` git dependency. Step 2 skipped `smooai-smooth-operator-core`, but the step-3 "add missing version" branch didn't — so each release injected `version = "<workspace>"` onto the git dep, which the pinned rev can't satisfy (`failed to select a version for smooai-smooth-operator-core = ^X.Y.Z`), blocking the Changesets version PR's Rust checks. Step 3 now applies the same skip. Pearl th-1ee32b.
15 changes: 14 additions & 1 deletion scripts/sync-versions.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,24 @@ const updates = [
// 3. Add version to any smooth-X workspace dep that doesn't have
// one yet. Match "smooth-X = { path = "crates/smooth-X", ... }"
// and splice `version = "X.Y.Z",` in right after the opening brace.
//
// SAME EXCEPTION AS STEP 2: skip the EXTERNAL operator-core git
// dep (`smooth-operator = { git, rev, package =
// "smooai-smooth-operator-core" }`). It carries no version on
// `main`, so this add-branch would otherwise stamp the workspace
// version onto it — pointing at an operator-core release that
// doesn't exist at the pinned rev and breaking `cargo` resolution
// on the version PR (`failed to select a version for
// smooai-smooth-operator-core = ^X.Y.Z`). Step 2 skipped it but
// step 3 forgot to. Pearl th-1ee32b.
const addVersionPattern =
/^(smooth-[a-z-]+\s*=\s*\{)(?!([^}\n]*\bversion\b))([^}\n]*)(\})/gm;
next = next.replace(
addVersionPattern,
(_, pre, _v, body, close) => {
(match, pre, _v, body, close) => {
if (match.includes("smooai-smooth-operator-core")) {
return match;
}
const trimmed = body.trimStart();
const separator = trimmed.length > 0 ? " " : "";
return `${pre} version = "${version}",${separator}${trimmed}${close}`;
Expand Down
Loading