From b7d73bd2b8c20a37f9123edb1795a757d0e9a90b Mon Sep 17 00:00:00 2001 From: konojunya Date: Sun, 6 Sep 2026 11:56:16 +0900 Subject: [PATCH] Prepare CLI 0.5.2 with graph-aware rendering --- Cargo.lock | 10 +++---- Cargo.toml | 6 ++--- THIRD_PARTY_LICENSES.md | 4 +-- distribution/distribution-contract.json | 2 +- distribution/generated/share/man/man1/stack.1 | 2 +- docs/releases/v0.5.2.md | 10 +++++++ scripts/distribution-contract.test.mjs | 9 ++++++- scripts/release-security.test.mjs | 2 +- scripts/resolve-release-context.test.mjs | 26 +++++++++---------- scripts/test_package_release.py | 2 +- scripts/validate-distribution-contract.mjs | 2 +- 11 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 docs/releases/v0.5.2.md diff --git a/Cargo.lock b/Cargo.lock index 981b7b2..c08dab7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -375,7 +375,7 @@ checksum = "bdba45c0f7a85ef0ec0bfb766b387dbd90fc6141237ac74b559d08a424750bc6" [[package]] name = "stack-diagram-cli" -version = "0.5.1" +version = "0.5.2" dependencies = [ "roxmltree", "serde", @@ -391,9 +391,9 @@ dependencies = [ [[package]] name = "stack-engine" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3177ed242771e530b8d245553a93a620b44f417a2f9968923edd45ee16f15c" +checksum = "f2f2185aa0e08800d801160e81133a9400483af57c08b391b7433485d21c1e00" dependencies = [ "roxmltree", "serde_json", @@ -414,9 +414,9 @@ dependencies = [ [[package]] name = "stack-theme" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98e0418c819d61897beded19d5333b4f6c7a8dcf1be46d0a8c62409ff2e6db7" +checksum = "87b3f19b223133b8da80e0a10c4cf5a7ec3024fb48105c1f9f2e0d635a9e8d56" dependencies = [ "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index a9feee3..2d3da2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "stack-diagram-cli" -version = "0.5.1" +version = "0.5.2" edition = "2024" rust-version = "1.85" publish = ["crates-io"] @@ -28,8 +28,8 @@ serde_json = "=1.0.151" serde_yaml_ng = "=0.10.0" sha2 = "=0.11.0" stack-compiler = "=0.1.0" -stack-engine = "=0.7.0" -stack-theme = "=0.5.0" +stack-engine = "=0.8.0" +stack-theme = "=0.6.0" ureq = { version = "=3.4.0", default-features = false, features = ["rustls"] } zip = { version = "=6.0.0", default-features = false, features = ["deflate-flate2-zlib-rs"] } diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 3443c1a..247d5ea 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -6,9 +6,9 @@ Audit date: 2026-09-05 | Component | Version or revision | License | Source | Distribution note | | --- | --- | --- | --- | --- | -| `stack-engine` / `stack-formatter` | `0.7.0` / `0.1.0` (crates.io) | Apache-2.0 | | Linked into the native binary; validates and renders caller-owned provider packs without bundling vendor assets. | +| `stack-engine` / `stack-formatter` | `0.8.0` / `0.1.0` (crates.io) | Apache-2.0 | | Linked into the native binary; validates and renders caller-owned provider packs without bundling vendor assets. | | `stack-compiler` | `0.1.0 (crates.io)` | Apache-2.0 | | Linked directly for protocol-neutral language intelligence and transitively through `stack-engine`; performs no runtime I/O. | -| `stack-theme` | `0.5.0 (crates.io)` | Apache-2.0 | | Linked directly and through `stack-engine`; its 30 fallback and 12 explicit core SVGs are Stack-authored Apache-2.0 assets. It also provides the asset-free provider-pack contract and types. | +| `stack-theme` | `0.6.0 (crates.io)` | Apache-2.0 | | Linked directly and through `stack-engine`; its fallback icons and 30 explicit core SVGs are Stack-authored Apache-2.0 assets. It also provides the asset-free provider-pack contract and types. | | `roxmltree` | `0.21.1` | MIT OR Apache-2.0 | | Parses untrusted local SVG into a read-only tree before allowlisted serialization. | | `sha2`, `digest`, `block-buffer`, `crypto-common`, `hybrid-array`, `const-oid`, `typenum` | `0.11.0`, `0.11.3`, `0.12.1`, `0.2.2`, `0.4.14`, `0.10.2`, `1.20.1` | MIT OR Apache-2.0 | | Computes complete archive and per-asset SHA-256 identities. | | `zip` | `6.0.0` | MIT | | Reads audited, allowlisted entries from verified official ZIP archives. | diff --git a/distribution/distribution-contract.json b/distribution/distribution-contract.json index 90c0c18..8e94e8e 100644 --- a/distribution/distribution-contract.json +++ b/distribution/distribution-contract.json @@ -6,7 +6,7 @@ "sourceCargoPackage": "stack-diagram-cli", "publishedCargoPackage": "stack-diagram-cli", "sourceVersionFile": "Cargo.toml", - "currentSourceVersion": "0.5.1", + "currentSourceVersion": "0.5.2", "minimumRustVersion": "1.85", "currentReleaseVersion": "0.5.1" }, diff --git a/distribution/generated/share/man/man1/stack.1 b/distribution/generated/share/man/man1/stack.1 index 9023761..64f0889 100644 --- a/distribution/generated/share/man/man1/stack.1 +++ b/distribution/generated/share/man/man1/stack.1 @@ -1,4 +1,4 @@ -.TH STACK 1 "" "Stack CLI 0.5.1" "Stack CLI Manual" +.TH STACK 1 "" "Stack CLI 0.5.2" "Stack CLI Manual" .SH NAME stack \- Stack diagram toolchain .SH SYNOPSIS diff --git a/docs/releases/v0.5.2.md b/docs/releases/v0.5.2.md new file mode 100644 index 0000000..be4981e --- /dev/null +++ b/docs/releases/v0.5.2.md @@ -0,0 +1,10 @@ +# Stack CLI 0.5.2 + +- Upgrade the shared rendering engine to 0.8.0 and the core theme catalog to 0.6.0. +- Generate graph-aware layouts with measured label spacing and connectors that avoid text, blocks, and parallel group borders. +- Render database nodes as rounded cards with the existing database icon. +- Use exact CSS pixel SVG coordinates to prevent browser font clamping and malformed-looking shapes. + +Commands, configuration, machine-readable contracts, and the Rust 1.85 minimum remain unchanged. SVG geometry and bytes intentionally change; review any snapshots or exported diagrams when upgrading. Custom palette authoring is not part of this release. + +Upgrade through the package manager that owns the installation. There is no self-update command. A new source version does not activate a distribution channel until its release artifacts and clean-install checks have succeeded. diff --git a/scripts/distribution-contract.test.mjs b/scripts/distribution-contract.test.mjs index 4c77ed0..f469b0f 100644 --- a/scripts/distribution-contract.test.mjs +++ b/scripts/distribution-contract.test.mjs @@ -44,7 +44,7 @@ test("source version drift is rejected", () => { test("a stale stable release in the availability message is rejected", () => { const candidate = changed((value) => { value.availability.message = value.availability.message.replace( - `Stack CLI ${value.product.currentSourceVersion}`, + `Stack CLI ${value.product.currentReleaseVersion}`, "Stack CLI 0.0.0", ); }); @@ -54,6 +54,13 @@ test("a stale stable release in the availability message is rejected", () => { ); }); +test("release preparation preserves the last verified distribution version", () => { + const candidate = changed(value => { value.product.currentSourceVersion = "0.99.0"; }); + const futureSource = cargoToml.replace(/^version = "[^"]+"/m, 'version = "0.99.0"'); + assert.notEqual(candidate.product.currentSourceVersion, candidate.product.currentReleaseVersion); + assert.deepEqual(validateDistributionContract(candidate, futureSource), { targets: 4, channels: 4 }); +}); + test("an unverified crates.io package name is rejected", () => { const candidate = changed((value) => { value.product.publishedCargoPackage = "stack-cli"; diff --git a/scripts/release-security.test.mjs b/scripts/release-security.test.mjs index 2b28c17..9c03332 100644 --- a/scripts/release-security.test.mjs +++ b/scripts/release-security.test.mjs @@ -12,7 +12,7 @@ import { verifyReleaseMetadata, } from "./release-security.mjs"; -const version = "0.5.1"; +const version = "0.5.2"; const commit = "0123456789abcdef0123456789abcdef01234567"; const provenancePredicate = "https://slsa.dev/provenance/v1"; const sbomPredicate = "https://spdx.dev/Document/v2.3"; diff --git a/scripts/resolve-release-context.test.mjs b/scripts/resolve-release-context.test.mjs index 6a8d6d8..c922a93 100644 --- a/scripts/resolve-release-context.test.mjs +++ b/scripts/resolve-release-context.test.mjs @@ -20,17 +20,17 @@ test("main dispatch resolves a non-publishing verification run", () => { ref: "refs/heads/main", refName: "main", sha, - requestedVersion: "0.5.1", + requestedVersion: "0.5.2", cargoToml, contract, }), { - version: "0.5.1", - tag: "v0.5.1", + version: "0.5.2", + tag: "v0.5.2", sourceRef: "refs/heads/main", publish: false, verifiedChannels: "", - minimumSupportedCliVersion: "0.5.1", + minimumSupportedCliVersion: "0.5.2", }, ); }); @@ -39,20 +39,20 @@ test("an exact version tag resolves a publishing run", () => { assert.deepEqual( resolveReleaseContext({ eventName: "push", - ref: "refs/tags/v0.5.1", - refName: "v0.5.1", + ref: "refs/tags/v0.5.2", + refName: "v0.5.2", sha, requestedVersion: "", cargoToml, contract, }), { - version: "0.5.1", - tag: "v0.5.1", - sourceRef: "refs/tags/v0.5.1", + version: "0.5.2", + tag: "v0.5.2", + sourceRef: "refs/tags/v0.5.2", publish: true, verifiedChannels: "github-release", - minimumSupportedCliVersion: "0.5.1", + minimumSupportedCliVersion: "0.5.2", }, ); }); @@ -60,7 +60,7 @@ test("an exact version tag resolves a publishing run", () => { test("removed self-update cannot be activated", () => { const activated = structuredClone(contract); activated.channels.push({ id: "self-update", state: "available" }); - assert.throws(() => resolveReleaseContext({eventName: "push", ref: "refs/tags/v0.5.1", refName: "v0.5.1", sha, cargoToml, contract: activated}), /self-update has been removed/); + assert.throws(() => resolveReleaseContext({eventName: "push", ref: "refs/tags/v0.5.2", refName: "v0.5.2", sha, cargoToml, contract: activated}), /self-update has been removed/); }); test("manual runs from another ref or version are rejected", () => { @@ -72,7 +72,7 @@ test("manual runs from another ref or version are rejected", () => { contract, }; assert.throws( - () => resolveReleaseContext({ ...common, ref: "refs/heads/topic", requestedVersion: "0.5.1" }), + () => resolveReleaseContext({ ...common, ref: "refs/heads/topic", requestedVersion: "0.5.2" }), /must run from main/, ); assert.throws( @@ -107,7 +107,7 @@ test("source and contract version drift is rejected", () => { ref: "refs/heads/main", refName: "main", sha, - requestedVersion: "0.5.1", + requestedVersion: "0.5.2", cargoToml, contract: drifted, }), diff --git a/scripts/test_package_release.py b/scripts/test_package_release.py index 8328631..ab2893e 100644 --- a/scripts/test_package_release.py +++ b/scripts/test_package_release.py @@ -9,7 +9,7 @@ class PackageReleaseTest(unittest.TestCase): - version = "0.5.1" + version = "0.5.2" target = "aarch64-apple-darwin" source_date_epoch = 1_788_566_400 diff --git a/scripts/validate-distribution-contract.mjs b/scripts/validate-distribution-contract.mjs index 31e7c8f..3778862 100644 --- a/scripts/validate-distribution-contract.mjs +++ b/scripts/validate-distribution-contract.mjs @@ -70,7 +70,7 @@ export function validateDistributionContract(contract, cargoToml) { invariant(contract.product?.publishedCargoPackage === "stack-diagram-cli", "published Cargo package must be stack-diagram-cli"); invariant(contract.availability?.state === "available", "distribution must be available after the verified stable release"); invariant( - contract.availability?.message?.includes(`Stack CLI ${cargoVersion}`) && + contract.availability?.message?.includes(`Stack CLI ${contract.product.currentReleaseVersion}`) && contract.availability.message.includes("GitHub Releases") && contract.availability.message.includes("Homebrew") && contract.availability.message.includes("Aqua"),