sproutboat 0.45.0 → 0.47.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
@@ -10,6 +10,52 @@ maintained going forward by the `release` skill.
10
10
 
11
11
  ## Unreleased
12
12
 
13
+ ## [0.47.0] - 2026-10-30
14
+
15
+ Built on `@sproutboat/runtime` 0.38.0, `@sproutboat/toolchain` 0.21.1 and `@sproutboat/wire` 0.21.1.
16
+
17
+ ### Added
18
+
19
+ - **`crypto.subtle` like workerd from `2026-11-06`**: RSASSA-PKCS1-v1_5, RSA-PSS, RSA-OAEP, ECDSA (P-256, P-384, P-521), ECDH,
20
+ Ed25519 (and `NODE-ED25519`), X25519, AES-GCM, AES-CBC, AES-CTR and AES-KW, PBKDF2 and HKDF for every hash, `generateKey`,
21
+ `importKey` and `exportKey` in raw, spki, pkcs8 and jwk, `deriveBits`, `deriveKey`, `wrapKey`, `unwrapKey` and
22
+ `crypto.DigestStream`, with workerd's DOMException error names. Earlier dates answer as before. The primitives are
23
+ BearSSL's and Monocypher's, and standalone and broker builds both carry them.
24
+
25
+ ### Changed
26
+
27
+ - **A build whose handler never names `subtle`, `DigestStream` or `CryptoKey` carries none of the crypto code** (its generated
28
+ program is unchanged); a broker build whose handler does use `crypto.subtle` links the cached BearSSL library for it.
29
+
30
+ ## [0.46.0] - 2026-10-30
31
+
32
+ Built on `@sproutboat/runtime` 0.37.1, `@sproutboat/toolchain` 0.21.1 and
33
+ `@sproutboat/wire` 0.21.0. Each change below that an existing app could observe starts at a new
34
+ compatibility date; earlier dates answer as before.
35
+
36
+ ### Added
37
+
38
+ - **D1 like workerd from `2026-11-03`**: a PRAGMA outside D1's allow-list fails with `not authorized`,
39
+ and `exec()` errors and empty statements follow workerd.
40
+ - **Durable Objects like workerd from `2026-11-04`**: `alarm(alarmInfo)` with `{ retryCount, isRetry }`,
41
+ multi-statement `sql.exec()`, `ctx.storage.kv`, `ctx.abort()`, `ctx.props`, transactions on one object
42
+ that run one after another, a transaction that refuses use after `rollback()` or commit, structured
43
+ clone that keeps shared and circular references, and the argument checks of `get`, `put`, `list` and
44
+ `setAlarm`.
45
+ - **Queues like workerd from `2026-11-05`**: the v8 content type keeps shared and circular references, holes
46
+ and invalid dates, message fields are read-only, `send()` and `sendBatch()` check their arguments, and a
47
+ delivery with non-ASCII text reaches the consumer as UTF-8 instead of mojibake.
48
+ - **`DOMException` is a constructible global**, and abort and timeout reasons are instances of it.
49
+ - **`TextDecoder` decodes UTF-16LE, UTF-16BE and windows-1252**; `Blob.prototype.stream()` exists; a
50
+ constructed `Response` has `url` "" and `redirected` false.
51
+
52
+ ### Fixed
53
+
54
+ - **`crypto.getRandomValues` fills every byte** of a wider view (a `Uint32Array` came back below 256).
55
+ - **A collector crash (SIGBUS)**: a minor collection scanned the entries block an array left behind when it
56
+ grew, and marked blocks that had been freed and reused. A request that rejects more promises than
57
+ Promise's pending list has room for could end the process some hundreds of requests later.
58
+
13
59
  ## [0.45.0] - 2026-10-29
14
60
 
15
61
  ### Added
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.45.0
6
+ **Package:** `sproutboat` 0.47.0
7
7
 
8
8
  ## Commands
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutboat",
3
- "version": "0.45.0",
3
+ "version": "0.47.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.6.0",
67
- "@sproutboat/runtime": "^0.36.0",
68
- "@sproutboat/toolchain": "^0.21.0",
69
- "@sproutboat/wire": "^0.20.4"
67
+ "@sproutboat/runtime": "^0.38.0",
68
+ "@sproutboat/toolchain": "^0.21.1",
69
+ "@sproutboat/wire": "^0.21.1"
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.45.0",
82
- "@sproutboat/cli-darwin-x64": "0.45.0",
83
- "@sproutboat/cli-linux-arm64": "0.45.0",
84
- "@sproutboat/cli-linux-x64": "0.45.0"
81
+ "@sproutboat/cli-darwin-arm64": "0.47.0",
82
+ "@sproutboat/cli-darwin-x64": "0.47.0",
83
+ "@sproutboat/cli-linux-arm64": "0.47.0",
84
+ "@sproutboat/cli-linux-x64": "0.47.0"
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,