@sproutboat/wire 0.16.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 CHANGED
@@ -1,5 +1,58 @@
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
+
39
+ ## 0.17.0
40
+
41
+ ### Minor Changes
42
+
43
+ - 829ed12: Request bodies stream, from compatibility date `2026-10-27`, as in workerd:
44
+
45
+ - **Ingress.** The native server runs the handler as soon as a request's headers arrive. `request.body` hands out the bytes as they come in, and the server pauses the socket while more than 1 MiB waits unread, so a large upload read through the stream keeps memory flat (a 128 MiB upload peaks at 38 MiB RSS). `text()`, `json()`, `arrayBuffer()` and `bytes()` read the whole body and return Promises.
46
+ - **Limit.** `SB_REQUEST_BODY_MAX` defaults to 100 MiB for streamed bodies (it stays 1 MiB before the date, where the body is held in memory whole). A larger `Content-Length` gets `413 Payload Too Large` before the handler runs; a chunked body that grows past it closes the connection, and the handler's stream fails.
47
+ - **Service bindings and `fetch()`.** On the broker transport, a `ReadableStream` request body goes out as it is read, in `FRAME_V1_MORE` frames after the request's head, instead of being read to the end first. The broker feeds them to the upstream request as a stream (with backpressure) and says so in its `ping` reply (`bodyStream: true`); against an older broker, bodies are sent whole as before. A streamed body can't follow a 307 or 308 redirect.
48
+
49
+ Internal trigger and RPC calls keep buffered bodies. Before `2026-10-27` nothing changes: the handler gets the whole body at once and `request.text()` answers synchronously, which a deployed handler may rely on, hence the new date.
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [829ed12]
54
+ - @sproutboat/runtime@0.28.0
55
+
3
56
  ## 0.16.0
4
57
 
5
58
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutboat/wire",
3
- "version": "0.16.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.27.0"
26
+ "@sproutboat/runtime": "^0.29.0"
27
27
  }
28
28
  }