sproutboat 0.42.0 → 0.44.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 +38 -0
- package/SURFACE.md +1 -1
- package/package.json +8 -8
- package/src/node-shims.ts +10 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,44 @@ maintained going forward by the `release` skill.
|
|
|
10
10
|
|
|
11
11
|
## Unreleased
|
|
12
12
|
|
|
13
|
+
## [0.44.0] - 2026-10-29
|
|
14
|
+
|
|
15
|
+
Built on `@sproutboat/runtime` 0.36.0, `@sproutboat/toolchain` 0.21.0 and
|
|
16
|
+
`@sproutboat/wire` 0.20.4.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`AsyncLocalStorage`** from `node:async_hooks`, as Workers has it: `run`, `exit`, `getStore` and the static
|
|
21
|
+
`snapshot`. `enterWith` and `disable` throw, as there. The store follows a request across awaits,
|
|
22
|
+
microtasks, timers, intervals, async `fetch`, WebSocket callbacks and `ctx.waitUntil`, and requests
|
|
23
|
+
interleaved in one process never see each other's. The static `bind` is not provided: Porffor compiles a
|
|
24
|
+
`.bind(` call on a function value to `Function.prototype.bind`, so use `snapshot()`. The import used to
|
|
25
|
+
build and then throw "not a constructor" when the app ran, so there is no compatibility date for it. Cost: a
|
|
26
|
+
promise reaction is 56 bytes instead of 40.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **`x-sb-cpu-ms` is per request when requests interleave in one process.** A request is charged the thread
|
|
31
|
+
CPU time of the slices in which it ran, not the process delta across its handler, so a request is no longer
|
|
32
|
+
charged for its neighbours' work. From compatibility date `2026-11-02` an async handler is stamped too
|
|
33
|
+
(logs show it as `cpuMs`); earlier dates still send no stamp for an async handler. A synchronous
|
|
34
|
+
handler's stamp is thread time, which leaves out the egress threads.
|
|
35
|
+
|
|
36
|
+
## [0.43.0] - 2026-10-29
|
|
37
|
+
|
|
38
|
+
Built on `@sproutboat/runtime` 0.35.0, `@sproutboat/toolchain` 0.20.1 and
|
|
39
|
+
`@sproutboat/wire` 0.20.3.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- **A collection no longer frees the entries block of Promise's pending-rejections array.** In a long-running
|
|
44
|
+
native process (a standalone binary, or a worker under sproutd), the first rejections that grew that array
|
|
45
|
+
past its static capacity moved its entries to the heap, and the collector then skipped the whole array as
|
|
46
|
+
malformed. Every collection freed the block, and the next rejection wrote into memory that now belonged to
|
|
47
|
+
another object: a string or an array of a request suspended at an `await` could change silently. A
|
|
48
|
+
standalone binary showed it in about 1 fresh process in 5 under interleaved requests, with no failure
|
|
49
|
+
reported anywhere. Rebuild standalone binaries to pick up the fix.
|
|
50
|
+
|
|
13
51
|
## [0.42.0] - 2026-10-28
|
|
14
52
|
|
|
15
53
|
Built on `@sproutboat/runtime` 0.35.0, `@sproutboat/toolchain` 0.20.0 and
|
package/SURFACE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sproutboat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.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.
|
|
68
|
-
"@sproutboat/toolchain": "^0.
|
|
69
|
-
"@sproutboat/wire": "^0.20.
|
|
67
|
+
"@sproutboat/runtime": "^0.36.0",
|
|
68
|
+
"@sproutboat/toolchain": "^0.21.0",
|
|
69
|
+
"@sproutboat/wire": "^0.20.4"
|
|
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.44.0",
|
|
82
|
+
"@sproutboat/cli-darwin-x64": "0.44.0",
|
|
83
|
+
"@sproutboat/cli-linux-arm64": "0.44.0",
|
|
84
|
+
"@sproutboat/cli-linux-x64": "0.44.0"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
87
87
|
"node": ">=18"
|
package/src/node-shims.ts
CHANGED
|
@@ -371,7 +371,17 @@ export { NodeURL as URL, NodeURLSearchParams as URLSearchParams, urlFormat as fo
|
|
|
371
371
|
export default { URL: NodeURL, URLSearchParams: NodeURLSearchParams, format: urlFormat, parse: urlParse, resolve: urlResolve };
|
|
372
372
|
`;
|
|
373
373
|
|
|
374
|
+
// AsyncLocalStorage comes from the runtime (sproutboat-packages: the prelude defines it on globalThis,
|
|
375
|
+
// over an async context kept by the patched Porffor). Bun's own node:async_hooks polyfill builds but
|
|
376
|
+
// its AsyncLocalStorage is not a constructor in a compiled handler. Aliased, like the node:url shim.
|
|
377
|
+
const NODE_ASYNC_HOOKS_SHIM = `
|
|
378
|
+
const SbAsyncLocalStorage = globalThis.AsyncLocalStorage;
|
|
379
|
+
export { SbAsyncLocalStorage as AsyncLocalStorage };
|
|
380
|
+
export default { AsyncLocalStorage: SbAsyncLocalStorage };
|
|
381
|
+
`;
|
|
382
|
+
|
|
374
383
|
export const NODE_SHIMS = {
|
|
384
|
+
"node:async_hooks": NODE_ASYNC_HOOKS_SHIM,
|
|
375
385
|
"node:path": NODE_PATH_SHIM,
|
|
376
386
|
"node:querystring": NODE_QUERYSTRING_SHIM,
|
|
377
387
|
"node:url": NODE_URL_SHIM,
|