@laboverwire/stitch 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@
6
6
 
7
7
  - _Nothing yet._
8
8
 
9
+ ## 0.6.1
10
+
11
+ ### Fixed
12
+
13
+ - **`create()` now rejects and rolls back the optimistic local row when the broker refuses an online insert.** On a live connection, a broker `Conflict` (409) or `Ownership` (403) response previously swallowed the error and resolved `create()` with an id, leaving a phantom local row. As of `@laboverwire/stitch-wasm` 0.4.0 the optimistic write is rolled back (memory + persistence + offline queue) and the promise rejects, carrying the stringified error (`conflict for <entity>/<id>` / `ownership denied for <entity>/<id>`). This makes `create()` usable for exclusive-key claims that must distinguish a win from a loss. Behavior change: code that treats `create()` as infallible should add a `.catch`.
14
+
15
+ ### Changed
16
+
17
+ - Raised the `@laboverwire/stitch-wasm` floor to `^0.4.0`, which implements the create-conflict rollback above. Additive to the wrapper's own API; no `@laboverwire/stitch` type or signature changes. The create binding the adapter calls is unchanged (`create(entity, scopeId, data, tag?) => Promise<string>`); only its rejection behavior on a live-connection 409/403 differs. A create without an `id` still returns a fresh UUID.
18
+
9
19
  ## 0.6.0
10
20
 
11
21
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laboverwire/stitch",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Reactive state synchronization library bridging an in-memory store, IndexedDB persistence, and MQTT-based remote sync.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "LabOverWire",
@@ -74,7 +74,7 @@
74
74
  }
75
75
  },
76
76
  "dependencies": {
77
- "@laboverwire/stitch-wasm": "^0.3.0"
77
+ "@laboverwire/stitch-wasm": "^0.4.0"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "react": "^19.0.0",