@sproutboat/toolchain 0.10.1 → 0.10.2

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,11 @@
1
1
  # @sproutboat/toolchain
2
2
 
3
+ ## 0.10.2
4
+
5
+ ### Patch Changes
6
+
7
+ - bc3fd25: `Response.body` and `Request.body` are `ReadableStream`s only from compatibility date `2026-10-21`. 0.19.0 changed this for every app, which broke handlers that read `request.body` as a string, such as `JSON.parse(request.body)` in the CLI's own D1 example. An app with an earlier `compatibility_date` keeps the raw body, as before. To opt in, move `compatibility_date` to `2026-10-21` or later and rebuild.
8
+
3
9
  ## 0.10.1
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sproutboat/toolchain",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {
@@ -72,8 +72,11 @@ export const REQUEST_CLASS_SOURCE = String.raw`class Request {
72
72
  // body is a ReadableStream, as in Fetch: a stream body itself, else a stream made once over
73
73
  // the bytes. The value as given stays in _bodyInit, which the native writer, streaming and
74
74
  // the prelude read; assigning body (the native ingress does) sets it.
75
+ // From compatibility date 2026-10-21. Before it, body is the value as given, as it always
76
+ // was here (apps read request.body as a string); a deployed handler keeps its behaviour.
75
77
  static _bodyAsStream(message) {
76
78
  const init = message._bodyInit;
79
+ if (!(globalThis.__sbCompat >= '2026-10-21')) return init;
77
80
  if (init == null) return null;
78
81
  if (Request._isStream(init)) return init;
79
82
  if (message._bodyStream == null) {
@@ -21,7 +21,7 @@ export const PATCH_SOURCES = [
21
21
  * patch.ts as the module patch.ts is everywhere else. Kept current by fingerprint.test.ts
22
22
  * (UPDATE_FINGERPRINT=1 bun test packages/toolchain/src/fingerprint.test.ts).
23
23
  */
24
- export const RELEASED_FINGERPRINT = "9a717433bb3b";
24
+ export const RELEASED_FINGERPRINT = "300297573305";
25
25
 
26
26
  /** The fingerprint of the sources in dir, or null where they are not on disk. */
27
27
  export function sourceFingerprint(dir: string): string | null {