sproutboat 0.18.0 → 0.20.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 +56 -1
- package/SURFACE.md +1 -1
- package/package.json +8 -8
- package/src/bundle.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,60 @@ maintained going forward by the `release` skill.
|
|
|
10
10
|
|
|
11
11
|
## Unreleased
|
|
12
12
|
|
|
13
|
+
## [0.20.0] - 2026-10-21
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Workers RPC over service bindings. A target whose default export extends
|
|
18
|
+
`WorkerEntrypoint` (from `cloudflare:workers`) exposes its methods:
|
|
19
|
+
`await env.SERVICE.add(2, 3)` runs `add(2, 3)` on it and resolves to the result.
|
|
20
|
+
- Arguments and results are copied as structured clone does (`Date`, binary data,
|
|
21
|
+
`Map`, `Set`, `undefined`, `NaN`, `-0`).
|
|
22
|
+
- An error the method throws rejects the call with the same class and message.
|
|
23
|
+
- `cloudflare:workers` also provides `DurableObject`, `RpcTarget` and `env`.
|
|
24
|
+
- Compatibility date `2026-10-22` changes how `fetch()` and `env.SERVICE.fetch()`
|
|
25
|
+
behave in a deployed app:
|
|
26
|
+
- They return promises and no longer block. The app keeps serving other requests
|
|
27
|
+
while a call is in flight, concurrent calls overlap, and a deployment can call
|
|
28
|
+
itself through a binding.
|
|
29
|
+
- Responses stream: the call resolves when the headers arrive, and `response.body`
|
|
30
|
+
receives chunks as they come.
|
|
31
|
+
- Redirects are followed as Fetch does (`redirect: "manual"` and `"error"` work).
|
|
32
|
+
- A service-binding target that throws makes the caller throw the same error, and
|
|
33
|
+
the target sees the URL its caller passed.
|
|
34
|
+
|
|
35
|
+
Apps with an earlier `compatibility_date` keep getting a `Response` right away, as
|
|
36
|
+
before. Move the date to `2026-10-22` and rebuild to opt in.
|
|
37
|
+
- `fetch()` and service bindings honour `init.signal`. Aborting stops the work
|
|
38
|
+
downstream too.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- Every `Set-Cookie` header of a fetched response is kept, not just the last one.
|
|
43
|
+
- A fetched response without a `Content-Type` no longer gains `text/plain`.
|
|
44
|
+
- `atob()` and `btoa()` were wrong for strings from `JSON.parse` or `TextDecoder`;
|
|
45
|
+
they are now correct for any string.
|
|
46
|
+
- A `fetch` or service call is no longer retried once the broker may have run it.
|
|
47
|
+
|
|
48
|
+
toolchain 0.11.0, runtime 0.21.1, wire 0.14.
|
|
49
|
+
|
|
50
|
+
## [0.19.0] - 2026-10-21
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- From compatibility date `2026-10-21`, `Response.body` and `Request.body` are
|
|
55
|
+
`ReadableStream`s for every body type, as in Fetch and workerd: `res.body.getReader()`,
|
|
56
|
+
`res.body.pipeThrough(...)` and `new Response(upstream.body)` work on any response,
|
|
57
|
+
including the incoming request. Apps with an earlier `compatibility_date` keep the raw
|
|
58
|
+
body (`JSON.parse(request.body)`, as the examples do); move the date and rebuild to opt in.
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
|
|
62
|
+
- `env.BUCKET.put(key, request.body)`, `env.KV.put(key, request.body)` and
|
|
63
|
+
`fetch(url, { body: request.body })` take the request body, stream or not.
|
|
64
|
+
- A non-ASCII request body is no longer UTF-8 encoded twice by `arrayBuffer()`,
|
|
65
|
+
`blob()` or KV `put` (`é` arrived as `é`), and R2 `put` accepts bytes.
|
|
66
|
+
|
|
13
67
|
## [0.18.0] - 2026-10-20
|
|
14
68
|
|
|
15
69
|
### Added
|
|
@@ -906,7 +960,8 @@ its own package.
|
|
|
906
960
|
- Renamed the package to `sproutboat` (was `@sproutboat/cli`); dropped the
|
|
907
961
|
`sprout` bin alias in favour of a user-defined shell alias.
|
|
908
962
|
|
|
909
|
-
[Unreleased]: https://github.com/baronunread/sproutboat-cli/compare/v0.
|
|
963
|
+
[Unreleased]: https://github.com/baronunread/sproutboat-cli/compare/v0.19.0...HEAD
|
|
964
|
+
[0.19.0]: https://github.com/baronunread/sproutboat-cli/compare/v0.18.0...v0.19.0
|
|
910
965
|
[0.18.0]: https://github.com/baronunread/sproutboat-cli/compare/v0.17.0...v0.18.0
|
|
911
966
|
[0.17.0]: https://github.com/baronunread/sproutboat-cli/compare/v0.16.0...v0.17.0
|
|
912
967
|
[0.16.0]: https://github.com/baronunread/sproutboat-cli/compare/v0.15.0...v0.16.0
|
package/SURFACE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sproutboat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.20.0",
|
|
4
4
|
"description": "Wrangler-shaped CLI for Sproutboat. Deploys workers to any control plane via --api-url / SPROUTBOAT_API_URL.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"@sproutboat/artifact": "^0.3.0",
|
|
65
65
|
"@sproutboat/assets": "^0.3.0",
|
|
66
66
|
"@sproutboat/config": "^0.5.0",
|
|
67
|
-
"@sproutboat/runtime": "^0.
|
|
68
|
-
"@sproutboat/toolchain": "^0.
|
|
69
|
-
"@sproutboat/wire": "^0.
|
|
67
|
+
"@sproutboat/runtime": "^0.21.1",
|
|
68
|
+
"@sproutboat/toolchain": "^0.11.0",
|
|
69
|
+
"@sproutboat/wire": "^0.14.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@oxlint/plugins": "1.85.0",
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
"typescript": "7.0.2"
|
|
79
79
|
},
|
|
80
80
|
"optionalDependencies": {
|
|
81
|
-
"@sproutboat/cli-darwin-arm64": "0.
|
|
82
|
-
"@sproutboat/cli-darwin-x64": "0.
|
|
83
|
-
"@sproutboat/cli-linux-arm64": "0.
|
|
84
|
-
"@sproutboat/cli-linux-x64": "0.
|
|
81
|
+
"@sproutboat/cli-darwin-arm64": "0.20.0",
|
|
82
|
+
"@sproutboat/cli-darwin-x64": "0.20.0",
|
|
83
|
+
"@sproutboat/cli-linux-arm64": "0.20.0",
|
|
84
|
+
"@sproutboat/cli-linux-x64": "0.20.0"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18"
|
package/src/bundle.ts
CHANGED
|
@@ -79,6 +79,9 @@ export async function bundleHandler(entryPath: string, projectDir: string): Prom
|
|
|
79
79
|
splitting: false,
|
|
80
80
|
sourcemap: "none",
|
|
81
81
|
plugins: [nodeShimsPlugin],
|
|
82
|
+
// WorkerEntrypoint, DurableObject, RpcTarget and env are runtime globals; the
|
|
83
|
+
// compiler turns this import into them, so it stays in the bundle as written.
|
|
84
|
+
external: ["cloudflare:workers"],
|
|
82
85
|
});
|
|
83
86
|
} catch (cause) {
|
|
84
87
|
// An unresolvable specifier arrives as an AggregateError whose `errors`
|