Skip to content

v0.53.0

Choose a tag to compare

@baronunread baronunread released this 09 Nov 03:14
· 54 commits to main since this release
a8e2239

Built on @sproutboat/runtime 0.43.0, @sproutboat/wire 0.22.3 and @sproutboat/toolchain 0.24.2. The runtime change is the opt-in SB_LOG=json log below; without it nothing an app can observe changes, so there is no new compatibility date. Every app is recompiled on its next build, since the runtime prelude changed.

Added

  • sproutboat tail --file <log|-> follows a standalone binary's request and error records (#268). Run the binary with SB_LOG=json (runtime 0.43.0 writes them) and tail --file prints the last 10 matching records, then new ones as they are written, in pretty lines or one JSON record per line (--format json). --status, --method and --search filter; --lines sets the snapshot size and --no-follow prints it and exits; --file - reads a pipe such as journalctl -f -o cat. An error follows its request's filters, and errors from background work always show. A missing file is waited for, a rotated or truncated file is reread from its start, a line over 64 KiB is skipped and counted, control characters are replaced before printing, and only known fields are written, so output stays bounded and parseable. It needs no login or network and ends with exit 0 on Ctrl-C. The existing control plane tail (live stream, --format json, filters, --recent, --sprout) is unchanged. See "Logs" in docs/standalone.md.
  • sproutboat run launches a standalone binary with its settings supplied at launch (#275). sproutboat run [project-dir] --env-file prod.env --port 80 --data-dir /var/lib/app starts dist/<name> (or --binary) with an environment built from three layers, highest first: --port and --data-dir, the --env-file files (repeat the flag; a later file overrides an earlier one), then the inherited environment. Like wrangler deploy, it fails before the binary starts when a declared secret (the config's secrets plus --require) is unset or empty; --check validates and prints a summary without starting it. The summary names each secret and the layer it came from, never a value, nothing is written to disk, and the binary and its artifact metadata are untouched, so the identical binary moves between development and production. SIGINT, SIGTERM and SIGHUP are passed to the binary and its exit status is returned. examples/vars-secrets walks through it.

Changed

  • init scaffolds the Workers-style handler. New projects get compatibility date 2026-09-28 and fetch(request, env, ctx), so env and ctx are available without a date bump. Existing sproutboat.jsonc files are never rewritten, and projects on older dates keep their behavior.
  • sproutboat dev takes local secrets the way Wrangler does (#275). .dev.vars or the .env files, never both (a warning names the ignored ones); --env <name> selects .dev.vars.<name> and the .env.<name> files; the .env files layer .env.<name>.local, .env.local, .env.<name>, .env; CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENV=false turns them off; --env-file <file> (repeatable, later overrides earlier) replaces the default set. The process environment is not passed to the app, except for declared secret names when CLOUDFLARE_INCLUDE_PROCESS_ENV=true and no .dev.vars is in use, and files win over it. A declared secret with no value is a warning and dev still starts. Files use dotenv syntax; a line that is not an assignment is skipped with a file:line warning that never repeats the line.
  • .dev.vars is now parsed with dotenv syntax. It used to be a simpler format. The differences that can matter: an unquoted value ends at a # (it used to keep it), quotes may be single, double or backtick, double quotes expand \n, and the last of a repeated name wins. A line that is not an assignment is skipped with a warning instead of silently.
  • docs/standalone.md no longer lists <data>/secrets.json: a standalone binary has only ever read secrets from the environment.

Fixed

  • The native conformance harnesses no longer hang on a stalled response (#276). The broker and standalone kitchen-sink harnesses and the small-example smoke runner give every HTTP and raw-socket request a deadline (SB_HARNESS_REQUEST_TIMEOUT_MS, default 30 s) that covers the whole body, and bound readiness (SB_HARNESS_READY_TIMEOUT_MS) and compilation (SB_HARNESS_BUILD_TIMEOUT_MS) separately, so a slow build cannot look like a hung handler. A timeout, or a child that exits during a request, reports the step, backend, runtime and toolchain versions and the child's recent stderr with secret values removed. Only the run's own children are stopped and its temp dir removed, on failure and on SIGINT or SIGTERM. Fault-injection tests cover a server that never completes a body and a child that exits mid-request. This is repository tooling; the shipped CLI does not change.