sproutboat 0.46.0 → 0.48.1

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
@@ -10,6 +10,54 @@ maintained going forward by the `release` skill.
10
10
 
11
11
  ## Unreleased
12
12
 
13
+ ## [0.48.1] - 2026-10-31
14
+
15
+ Same packages as 0.48.0 (`@sproutboat/runtime` 0.39.0, `@sproutboat/toolchain` 0.21.3, `@sproutboat/wire` 0.21.2). The v0.48.0 tag
16
+ published the four platform packages but not `sproutboat` itself, because the release job's test run timed out; 0.48.1 publishes all
17
+ five at one version.
18
+
19
+ ### Fixed
20
+
21
+ - **The release test run no longer times out**: the native restore test builds two standalone binaries cold, which took 476 s on CI at
22
+ 0.47.0 and over 600 s at 0.48.0 as the prelude grew; its limit is now 1,200 s.
23
+
24
+ ## [0.48.0] - 2026-10-30
25
+
26
+ Built on `@sproutboat/runtime` 0.39.0, `@sproutboat/toolchain` 0.21.3 and `@sproutboat/wire` 0.21.2. Each change below that an
27
+ existing app could observe starts at a new compatibility date; earlier dates answer as before.
28
+
29
+ ### Added
30
+
31
+ - **Database clients that need only `fetch` or WebSocket build and run unmodified from `2026-11-15`** (`@libsql/client`,
32
+ `@neondatabase/serverless`, `@supabase/supabase-js`, `@upstash/redis`, `@planetscale/database`; 113 of 117 comparisons with workerd
33
+ match, the rest being the wording of a network error). The build check for Node, Bun and Deno globals skips a use behind a
34
+ `typeof` test, a global the bundle declares itself, and mentions in strings and comments; `Error.captureStackTrace` exists.
35
+
36
+ ### Fixed
37
+
38
+ - **`fetch()` on a standalone binary returns a promise from `2026-10-22`**, so `fetch(url).then(...)` works and a refused request
39
+ rejects.
40
+ - **A fetched 204, 205 or 304 response** no longer throws "Response with null body status cannot have body".
41
+ - **A `Uint8Array` subclass that redefines a builtin method** (a `Buffer` polyfill's `toString("hex")`) reaches its own method.
42
+ - **A collector crash (SIGBUS)** when an object grew (toolchain 0.21.3).
43
+
44
+ ## [0.47.0] - 2026-10-30
45
+
46
+ Built on `@sproutboat/runtime` 0.38.0, `@sproutboat/toolchain` 0.21.1 and `@sproutboat/wire` 0.21.1.
47
+
48
+ ### Added
49
+
50
+ - **`crypto.subtle` like workerd from `2026-11-06`**: RSASSA-PKCS1-v1_5, RSA-PSS, RSA-OAEP, ECDSA (P-256, P-384, P-521), ECDH,
51
+ Ed25519 (and `NODE-ED25519`), X25519, AES-GCM, AES-CBC, AES-CTR and AES-KW, PBKDF2 and HKDF for every hash, `generateKey`,
52
+ `importKey` and `exportKey` in raw, spki, pkcs8 and jwk, `deriveBits`, `deriveKey`, `wrapKey`, `unwrapKey` and
53
+ `crypto.DigestStream`, with workerd's DOMException error names. Earlier dates answer as before. The primitives are
54
+ BearSSL's and Monocypher's, and standalone and broker builds both carry them.
55
+
56
+ ### Changed
57
+
58
+ - **A build whose handler never names `subtle`, `DigestStream` or `CryptoKey` carries none of the crypto code** (its generated
59
+ program is unchanged); a broker build whose handler does use `crypto.subtle` links the cached BearSSL library for it.
60
+
13
61
  ## [0.46.0] - 2026-10-30
14
62
 
15
63
  Built on `@sproutboat/runtime` 0.37.1, `@sproutboat/toolchain` 0.21.1 and
package/SURFACE.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Generated by `src/surface.test.ts` from `src/surface.ts` + the pinned
4
4
  > toolchain constants. Do not edit by hand — run `UPDATE_SURFACE=1 bun test`.
5
5
 
6
- **Package:** `sproutboat` 0.46.0
6
+ **Package:** `sproutboat` 0.48.1
7
7
 
8
8
  ## Commands
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutboat",
3
- "version": "0.46.0",
3
+ "version": "0.48.1",
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.6.0",
67
- "@sproutboat/runtime": "^0.37.1",
68
- "@sproutboat/toolchain": "^0.21.1",
69
- "@sproutboat/wire": "^0.21.0"
67
+ "@sproutboat/runtime": "^0.39.0",
68
+ "@sproutboat/toolchain": "^0.21.3",
69
+ "@sproutboat/wire": "^0.21.2"
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.46.0",
82
- "@sproutboat/cli-darwin-x64": "0.46.0",
83
- "@sproutboat/cli-linux-arm64": "0.46.0",
84
- "@sproutboat/cli-linux-x64": "0.46.0"
81
+ "@sproutboat/cli-darwin-arm64": "0.48.1",
82
+ "@sproutboat/cli-darwin-x64": "0.48.1",
83
+ "@sproutboat/cli-linux-arm64": "0.48.1",
84
+ "@sproutboat/cli-linux-x64": "0.48.1"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=18"
package/src/build.ts CHANGED
@@ -21,7 +21,7 @@ import { ensureZig, esbuildVersion, porfforVersion, toolchainStamp } from "./too
21
21
  import { PORFFOR_ARCHIVE_SHA256, PORFFOR_COMMIT_FULL } from "./porffor-toolchain";
22
22
  import { version as toolchainPackageVersion } from "@sproutboat/toolchain/package.json" with { type: "json" };
23
23
  import { version as cliVersion } from "../package.json" with { type: "json" };
24
- import { wrapNativeFetchHandler } from "./wrap";
24
+ import { reachesSubtle, wrapNativeFetchHandler } from "./wrap";
25
25
 
26
26
  export type BuildInput = {
27
27
  projectDir: string;
@@ -230,8 +230,13 @@ async function prepareBuild(input: BuildInput) {
230
230
  bakedAssets,
231
231
  input.transport,
232
232
  versionMetadata,
233
+ // Drop crypto.subtle (about 330 KB, and BearSSL on the link line) from a handler that never names it.
234
+ "auto",
233
235
  );
236
+ // The broker transport links no BearSSL of its own; a handler that uses crypto.subtle needs it.
237
+ const subtle = !embedded && reachesSubtle(source.toString());
234
238
  return {
239
+ subtle,
235
240
  sourceHash,
236
241
  target,
237
242
  embedded,
@@ -309,6 +314,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
309
314
  sourceHash,
310
315
  target,
311
316
  embedded,
317
+ subtle,
312
318
  host,
313
319
  bindings,
314
320
  assetDir,
@@ -327,7 +333,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
327
333
  toolchain: toolchainStamp(),
328
334
  toolchainPackageVersion,
329
335
  porffor: [PORFFOR_COMMIT_FULL, PORFFOR_ARCHIVE_SHA256],
330
- native: embedded ? [sqliteStamp(), bearsslStamp()] : [],
336
+ native: embedded ? [sqliteStamp(), bearsslStamp()] : subtle ? [bearsslStamp()] : [],
331
337
  integration: await integrationIdentity(),
332
338
  nativeRestore: input.withRestore ? NATIVE_RESTORE_IDENTITY : null,
333
339
  }),
@@ -347,7 +353,7 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
347
353
  const zigBin = host ? undefined : await ensureZig();
348
354
  const [sqliteObject, tls] = embedded
349
355
  ? await Promise.all([ensureSqliteObject({ target, zigBin }), ensureBearssl({ target, zigBin })])
350
- : [null, null];
356
+ : [null, subtle ? await ensureBearssl({ target, zigBin }) : null];
351
357
  const unitDir = unitDirFor(input);
352
358
  const unitLock = input.generatedPath ? null : await acquireArtifactLock(unitDir);
353
359
  try {
@@ -364,7 +370,11 @@ export async function buildArtifact(input: BuildInput): Promise<BuildOutput> {
364
370
  transport: input.transport,
365
371
  appName: input.config.name,
366
372
  assets: bakedAssets,
367
- extraLink: [...(sqliteObject ? [sqliteObject] : []), ...(tls ? tls.objects : [])],
373
+ // Without TLS (broker), the trust anchors are not wanted: only crypto.subtle uses the library.
374
+ extraLink: [
375
+ ...(sqliteObject ? [sqliteObject] : []),
376
+ ...(tls ? (embedded ? tls.objects : tls.objects.slice(0, -1)) : []),
377
+ ],
368
378
  extraCflags: tls ? ["-I", tls.includeDir] : [],
369
379
  optimize: input.optimize,
370
380
  versionMetadata,