@cratestack/link-batch 0.17.2 → 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/README.md +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -57,19 +57,19 @@ const [a, b, c] = await Promise.all([
|
|
|
57
57
|
no idempotency key are never auto-collapsed, since the server does no dedup of its own and
|
|
58
58
|
silently merging two textually-identical but unmarked mutations would be unsafe. Pass a custom
|
|
59
59
|
`dedupe` for full value-based collapsing, or `() => null` to disable dedup and only batch. Dedup
|
|
60
|
-
runs
|
|
60
|
+
runs _within_ a partition — it never collapses calls across two different envelopes.
|
|
61
61
|
- **Correlation**: results are fanned back out by matching each response frame's `id`, not array
|
|
62
62
|
position — the server's `/rpc/batch` contract already guarantees order (see
|
|
63
63
|
`docs/design/rpc-transport.md` §3.2), but id-based matching is strictly more robust and mirrors
|
|
64
64
|
the repo's own Rust client-side batch debouncer (`examples/rpc-batch-debounce`).
|
|
65
65
|
- **Failure isolation**: a partition that fails (network error, non-OK response) only rejects the
|
|
66
|
-
callers queued in
|
|
66
|
+
callers queued in _that_ partition — it never affects a concurrently in-flight partition.
|
|
67
67
|
|
|
68
68
|
### Known limitations
|
|
69
69
|
|
|
70
70
|
- Aborting an individual call's `AbortSignal` only cancels it if its batch hasn't been sent yet —
|
|
71
71
|
it does not cancel an in-flight `/rpc/batch` request.
|
|
72
72
|
- **(Fixed in #273, kept here for anyone reading an older version's docs)** Before #273, the
|
|
73
|
-
synthesized `/rpc/batch` request reused the
|
|
73
|
+
synthesized `/rpc/batch` request reused the _first_ queued call's `headers`/`fetchFn`/`codec` for
|
|
74
74
|
the whole flush — per-call custom headers on later calls in the same window were silently dropped
|
|
75
75
|
from the aggregate request instead of applied. This is why partitioning exists now.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cratestack/link-batch",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "A batshit-style automatic batch scheduler for CrateStack's generated TypeScript RPC client, shipped as an RpcLink.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"lint": "biome check ."
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@cratestack/ts-types": "0.
|
|
41
|
+
"@cratestack/ts-types": "0.18.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"typescript": "^7.0.2",
|