sproutboat 0.11.2 → 0.11.4

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,43 @@ maintained going forward by the `release` skill.
10
10
 
11
11
  ## [Unreleased]
12
12
 
13
+ ## [0.11.4] - 2026-09-14
14
+ ### Fixed
15
+ - Bumped `@sproutboat/runtime` to `^0.6.5`, undoing a severe performance
16
+ regression that `v0.11.3` shipped (baronunread/sproutboat#181). `0.6.4`'s
17
+ encode fix was correct for the large inputs it targeted and badly wrong for
18
+ small ones: an app hashing ~150-byte values through `crypto.subtle.digest`
19
+ on every request lost **64% of its throughput** (4,700 to 1,680 req/s),
20
+ tripled its p50 (4.6ms to 13.4ms) and grew 41% in RSS. The encoder now only
21
+ reaches for an array once 512 bytes have accumulated, so a small input runs
22
+ exactly like `v0.11.2` while a large one keeps the `#180` fix.
23
+ - Upgrading the CLI is the only way to pick this up. The runtime prelude is
24
+ embedded in the CLI binary when that binary is built, so a project's own
25
+ `@sproutboat/runtime` dependency has no effect on `--standalone` or
26
+ `--target host` builds. Anyone on `v0.11.3` should move to this release;
27
+ `v0.11.2` is the last unaffected version before it.
28
+
29
+ ### Changed
30
+ - The `darwin-x64` platform package is now cross-compiled on the arm64 macOS
31
+ runner instead of built natively on `macos-13`. GitHub's only x64 macOS pool
32
+ routinely left that leg queued for 30+ minutes and blocked two releases,
33
+ including `v0.11.3`, where the root package published while its own
34
+ `optionalDependency` on `@sproutboat/cli-darwin-x64` was still waiting on it.
35
+ Nothing in the package needs x64 hardware to produce. `scripts/build-cli.ts`
36
+ gains `--target <os>-<arch>` for this.
37
+
38
+ ## [0.11.3] - 2026-09-14
39
+ ### Fixed
40
+ - Bumped `@sproutboat/runtime` to `^0.6.4`, picking up the encode-side half of
41
+ the same `O(n^2)` string-building bug `v0.11.2` fixed on the decode side.
42
+ `__sbToBytes` sits behind every `crypto.subtle` call a handler makes:
43
+ `digest`, `importKey`, `sign`, `verify` and the PBKDF2/scrypt path all funnel
44
+ their data, keys, salts and signatures through it, so hashing a request body
45
+ was quadratic in the body's size. `__sbHexOrBytes`, which decodes the
46
+ `expected` side of an HMAC verify, was worse still; it rewrote its
47
+ accumulator's last character on every odd nibble, copying the whole string
48
+ twice per byte (baronunread/sproutboat#180).
49
+
13
50
  ## [0.11.2] - 2026-09-14
14
51
  ### Fixed
15
52
  - Bumped `@sproutboat/runtime` to `^0.6.3`. `v0.11.1` bumped it to `^0.6.2`,
@@ -470,7 +507,9 @@ its own package.
470
507
  - Renamed the package to `sproutboat` (was `@sproutboat/cli`); dropped the
471
508
  `sprout` bin alias in favour of a user-defined shell alias.
472
509
 
473
- [Unreleased]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.2...HEAD
510
+ [Unreleased]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.4...HEAD
511
+ [0.11.4]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.3...v0.11.4
512
+ [0.11.3]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.2...v0.11.3
474
513
  [0.11.2]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.1...v0.11.2
475
514
  [0.11.1]: https://github.com/baronunread/sproutboat-cli/compare/v0.11.0...v0.11.1
476
515
  [0.11.0]: https://github.com/baronunread/sproutboat-cli/compare/v0.10.3...v0.11.0
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.11.2 · runs on Bun (use `bunx`, not `npx`)
6
+ **Package:** `sproutboat` 0.11.4 · runs on Bun (use `bunx`, not `npx`)
7
7
 
8
8
  ## Commands
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sproutboat",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
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,7 +64,7 @@
64
64
  "@sproutboat/artifact": "^0.2.0",
65
65
  "@sproutboat/assets": "^0.2.0",
66
66
  "@sproutboat/config": "^0.3.0",
67
- "@sproutboat/runtime": "^0.6.3",
67
+ "@sproutboat/runtime": "^0.6.5",
68
68
  "@sproutboat/toolchain": "^0.4.0",
69
69
  "@sproutboat/wire": "^0.5.0",
70
70
  "esbuild": "^0.28.2"
@@ -78,10 +78,10 @@
78
78
  "typescript": "7.0.2"
79
79
  },
80
80
  "optionalDependencies": {
81
- "@sproutboat/cli-darwin-arm64": "0.11.2",
82
- "@sproutboat/cli-darwin-x64": "0.11.2",
83
- "@sproutboat/cli-linux-arm64": "0.11.2",
84
- "@sproutboat/cli-linux-x64": "0.11.2"
81
+ "@sproutboat/cli-darwin-arm64": "0.11.4",
82
+ "@sproutboat/cli-darwin-x64": "0.11.4",
83
+ "@sproutboat/cli-linux-arm64": "0.11.4",
84
+ "@sproutboat/cli-linux-x64": "0.11.4"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=18"
@@ -9,6 +9,11 @@
9
9
  * --compile` can target any `bun-<os>-<arch>` regardless of host — verified
10
10
  * against real Linux/macOS output, not just docs). For a maintainer building
11
11
  * every platform package locally without waiting on CI.
12
+ *
13
+ * `--target <os>-<arch>`: build exactly one named target, host or not. CI's
14
+ * darwin-x64 leg uses this to cross-build on an arm64 macOS runner, because
15
+ * GitHub's only x64 macOS image (`macos-13`) routinely sits queued for half an
16
+ * hour while every other leg finishes in one minute.
12
17
  */
13
18
  import { chmod, copyFile, mkdir } from "node:fs/promises";
14
19
  import { resolve } from "node:path";
@@ -113,5 +118,16 @@ async function buildOne(target: Target): Promise<void> {
113
118
  await chmod(out, 0o755);
114
119
  }
115
120
 
121
+ function named(spec: string): Target {
122
+ const match = TARGETS.find((t) => `${t.platform}-${t.arch}` === spec);
123
+ if (!match)
124
+ throw new Error(
125
+ `unknown target ${spec}; expected one of ${TARGETS.map((t) => `${t.platform}-${t.arch}`).join(", ")}`,
126
+ );
127
+ return match;
128
+ }
129
+
116
130
  const all = process.argv.includes("--all");
117
- for (const target of all ? TARGETS : [hostTarget()]) await buildOne(target);
131
+ const only = process.argv[process.argv.indexOf("--target") + 1];
132
+ const selected = all ? TARGETS : process.argv.includes("--target") ? [named(only ?? "")] : [hostTarget()];
133
+ for (const target of selected) await buildOne(target);