From 41cb07072c956a157ad6e76f15c5ce2a5d86fb94 Mon Sep 17 00:00:00 2001 From: Nick Carton Date: Mon, 11 May 2026 16:56:32 +0200 Subject: [PATCH] fix(release-plz): cascade rust crate bumps into wasm crate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a `version` field to the wasm crate's dep on the rust crate (via workspace.dependencies for centralization). release-plz uses changes to a dependent's manifest as the trigger for cascading version bumps; a path-only dep with no version field gives it nothing to edit, so wasm's version stayed frozen while rust bumped. PR #52 surfaced this — rust went 0.0.13 -> 0.0.14 but wasm/Cargo.toml + wasm/package.json stayed at 0.0.13, so the npm package would have shipped a stale version. With this change release-plz will update the workspace.dependencies version on each release, which cascades into a wasm crate bump, which the existing sync step in release-plz.yml mirrors into wasm/package.json. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 5 +++++ wasm/Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b9321a2..4e69ee0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,6 +10,11 @@ repository = "https://github.com/bulletxyz/bullet-rust-sdk" [workspace.dependencies] bon = "3.9.0" bullet-exchange-interface = { version = "0.3", features = ["schema"] } +# Versioned path dep so release-plz cascades rust crate bumps into the wasm +# crate (otherwise a path-only dep is treated as "no version requirement" and +# the wasm crate's version stays frozen while rust bumps). release-plz keeps +# the version field in lockstep with rust/Cargo.toml on every release PR. +bullet-rust-sdk = { path = "rust", version = "0.0.13" } # Optimize WASM binary size without affecting the rust crate [profile.release] lto = true diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml index 4265340..7200a29 100644 --- a/wasm/Cargo.toml +++ b/wasm/Cargo.toml @@ -11,7 +11,7 @@ publish = false # ships to npm as @bulletxyz/sdk-wasm, not crates.io crate-type = ["cdylib", "rlib"] [dependencies] -bullet-rust-sdk = { path = "../rust" } +bullet-rust-sdk = { workspace = true } bullet-exchange-interface.workspace = true wasm-bindgen = "0.2"