diff --git a/.changeset/config.json b/.changeset/config.json index 83ac66b..fbf14e3 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,7 +2,7 @@ "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json", "changelog": ["@changesets/changelog-github", { "repo": "dunky-dev/state-machine" }], "commit": false, - "fixed": [["@dunky.dev/*"]], + "fixed": [], "linked": [], "access": "public", "baseBranch": "origin/main", diff --git a/.changeset/pin-internal-deps.md b/.changeset/pin-internal-deps.md new file mode 100644 index 0000000..bfe0a70 --- /dev/null +++ b/.changeset/pin-internal-deps.md @@ -0,0 +1,18 @@ +--- +'@dunky.dev/react-state-machine': patch +'@dunky.dev/native-state-machine': patch +'@dunky.dev/opentui-state-machine': patch +--- + +Internal dependencies on sibling workspace packages are now pinned to an +exact version instead of a caret range, and every package versions +independently — the `@dunky.dev/*` lockstep group is gone, so a release +never bumps a package whose code didn't change. + +A caret range between two packages that both sit above a shared dependency +lets a consumer's install resolve to two different physical copies of it +once those packages' required ranges drift apart, silently breaking anything +identity-sensitive in that shared dependency (a singleton, a `WeakMap`, +module-level state). Pinning exact collapses that to one resolvable version: +a mismatch now fails at publish time instead of surfacing as a runtime bug +in a consumer's app. diff --git a/.npmrc b/.npmrc index a4a51cb..bcb6a02 100644 --- a/.npmrc +++ b/.npmrc @@ -8,5 +8,5 @@ ignore-workspace-root-check=true link-workspace-packages=true package-manager-strict=false prefer-workspace-packages=true -save-workspace-protocol=rolling +save-workspace-protocol=true strict-peer-dependencies=false diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 02c0719..4452116 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -182,3 +182,19 @@ whether it needs props/platform or not: | **connect** | A function returning the logical surface a view spreads onto elements. | | **bindings** | The substrate-agnostic event + attr vocabulary — lives in `shared/bindings`, consumed by every target's normalize. Each ledger is typed by the contract (`HandlerTargets`/`AttrTargets`): every key mapped or a `null` drop — a new binding is a compile error until each target decides. | | **compose** | Run several machines as one unit (orthogonal regions): bundled `start`/`stop` + `sync` + `combine`. | + +## Versioning + +Every package versions independently; `.changeset/config.json` keeps `fixed` +and `linked` empty, so no group is ever forced to share a version number — +an untouched package never gets an empty bump. + +Internal workspace dependencies pin exact (`workspace:*`), never a caret +range (`workspace:^`). Independent versions mean siblings drift apart at +their own pace, so a caret range between two packages that share a further +dependency can let a consumer's install resolve to two different physical +copies of it — a dependency diamond. Anything identity-sensitive further +down (a singleton, a `WeakMap`, module-level state) breaks silently across +the two copies. An exact pin collapses the diamond to one resolvable +version: a mismatch fails at publish time, not at runtime in a consumer's +app. diff --git a/packages/native/package.json b/packages/native/package.json index 7944333..588ea25 100644 --- a/packages/native/package.json +++ b/packages/native/package.json @@ -34,10 +34,10 @@ "build": "tsdown" }, "dependencies": { - "@dunky.dev/react-state-machine": "workspace:^", - "@dunky.dev/state-machine": "workspace:^", - "@dunky.dev/state-machine-bindings": "workspace:^", - "@dunky.dev/state-machine-utils": "workspace:^" + "@dunky.dev/react-state-machine": "workspace:*", + "@dunky.dev/state-machine": "workspace:*", + "@dunky.dev/state-machine-bindings": "workspace:*", + "@dunky.dev/state-machine-utils": "workspace:*" }, "peerDependencies": { "react": "*", diff --git a/packages/opentui/package.json b/packages/opentui/package.json index 3459792..79f74f8 100644 --- a/packages/opentui/package.json +++ b/packages/opentui/package.json @@ -34,7 +34,7 @@ "build": "tsdown" }, "dependencies": { - "@dunky.dev/state-machine-bindings": "workspace:^", - "@dunky.dev/state-machine-utils": "workspace:^" + "@dunky.dev/state-machine-bindings": "workspace:*", + "@dunky.dev/state-machine-utils": "workspace:*" } } diff --git a/packages/react/package.json b/packages/react/package.json index 32fc7d1..737c0e8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -34,11 +34,11 @@ "build": "tsdown" }, "dependencies": { - "@dunky.dev/state-machine": "workspace:^", - "@dunky.dev/state-machine-utils": "workspace:^" + "@dunky.dev/state-machine": "workspace:*", + "@dunky.dev/state-machine-utils": "workspace:*" }, "devDependencies": { - "@dunky.dev/state-machine-bindings": "workspace:^", + "@dunky.dev/state-machine-bindings": "workspace:*", "@testing-library/react": "^16.1.0", "@types/react": "^19.2.15", "@types/react-dom": "^19.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0364c56..24ef84d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,16 +127,16 @@ importers: packages/native: dependencies: '@dunky.dev/react-state-machine': - specifier: workspace:^ + specifier: workspace:* version: link:../react '@dunky.dev/state-machine': - specifier: workspace:^ + specifier: workspace:* version: link:../core '@dunky.dev/state-machine-bindings': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/bindings '@dunky.dev/state-machine-utils': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/utils react: specifier: '*' @@ -148,23 +148,23 @@ importers: packages/opentui: dependencies: '@dunky.dev/state-machine-bindings': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/bindings '@dunky.dev/state-machine-utils': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/utils packages/react: dependencies: '@dunky.dev/state-machine': - specifier: workspace:^ + specifier: workspace:* version: link:../core '@dunky.dev/state-machine-utils': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/utils devDependencies: '@dunky.dev/state-machine-bindings': - specifier: workspace:^ + specifier: workspace:* version: link:../shared/bindings '@testing-library/react': specifier: ^16.1.0