@sproutboat/wire 0.17.0 → 0.18.0
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.
- package/CHANGELOG.md +36 -0
- package/package.json +2 -2
- package/src/broker.test.ts +327 -97
- package/src/broker.ts +323 -170
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @sproutboat/wire
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8df17ef: Durable Objects like workerd from compatibility date `2026-10-28`:
|
|
8
|
+
|
|
9
|
+
- **Input gate.** While an object's storage read is in flight, no other event
|
|
10
|
+
(`stub.fetch()`, an alarm) enters it, so `const v = await storage.get("n"); await
|
|
11
|
+
storage.put("n", v + 1)` is safe under concurrent calls. Ten concurrent increments used
|
|
12
|
+
to end at 1. An event that awaits anything else (a fetch, a timer) lets the next one
|
|
13
|
+
in, as in workerd. `blockConcurrencyWhile()` and `transaction()` hold the gate until
|
|
14
|
+
they settle, and `stub.fetch()` always returns a Promise.
|
|
15
|
+
- **Storage returns Promises** (`get`, `put`, `delete`, `deleteAll`, `list`, the alarm
|
|
16
|
+
methods), and adds `sync()` and `transaction()` (with `txn.rollback()`; a throw rolls
|
|
17
|
+
back; a transaction reads its own writes).
|
|
18
|
+
- **Structured values.** Date, Map, Set, RegExp, ArrayBuffer and typed arrays, BigInt,
|
|
19
|
+
`undefined` inside containers, NaN, the infinities and -0 round-trip.
|
|
20
|
+
`put(k, undefined)` throws a TypeError and a function throws a DataCloneError, before
|
|
21
|
+
anything is written.
|
|
22
|
+
- `list()` takes `start`, `startAfter`, `end` and `reverse`, and `limit: 0` throws.
|
|
23
|
+
`setAlarm()` refuses a value that is not a Date or a number. `deleteAll()` also drops
|
|
24
|
+
the alarm.
|
|
25
|
+
|
|
26
|
+
Earlier dates keep synchronous JSON storage and no gate. Values written from
|
|
27
|
+
`2026-10-28` start with `#sb1:`, and every date reads both formats.
|
|
28
|
+
|
|
29
|
+
Both transports' `do.storage.list` take `start`, `startAfter`, `end` and `reverse`, and
|
|
30
|
+
match the prefix exactly (SQL `LIKE` also matched `_` and `%` as wildcards, ignoring
|
|
31
|
+
case, so a prefix such as `user_` listed other keys).
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [8df17ef]
|
|
36
|
+
- Updated dependencies [8df17ef]
|
|
37
|
+
- @sproutboat/runtime@0.29.0
|
|
38
|
+
|
|
3
39
|
## 0.17.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutboat/wire",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@sproutboat/assets": "^0.3.0",
|
|
26
|
-
"@sproutboat/runtime": "^0.
|
|
26
|
+
"@sproutboat/runtime": "^0.29.0"
|
|
27
27
|
}
|
|
28
28
|
}
|