Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 4 behind
What ships is what runs: the committed range bundle boots under the stub page #36
Check · Review · Land · Live done — Landed and live in production.
`src/range/bundle.test.ts` boots the committed artifact: it finds `static/range.<hash>.js` with `isBundleOf("range", …)` over `STATIC_DIR` from `scripts/build.ts`, installs the stub page from `src/range/dom.ts`, imports the bundle so the entry self-boots, and then holds it to drawn text — both canvases sized to their box, a `tick` line and a `yaw` line in the readout, the test's clock stepping the…
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
src/range/bundle.test.tsboots the committed artifact: it findsstatic/range.<hash>.jswithisBundleOf("range", …)overSTATIC_DIRfromscripts/build.ts, installs the stub page fromsrc/range/dom.ts, imports the bundle so the entry self-boots, and then holds it to drawn text — both canvases sized to their box, atickline and ayawline in the readout, the test's clock stepping the tick count from 1 to 2,KeyWturningheld nothingintoheld forwardand back, and a canvas with no 2D context putting "No 2D canvas" on the page instead of throwing. Every boot undoes itsinstall(), and a last test asserts nodocumentis left on the globals for another file to inherit. A broken bundle really does fail: replacing the file withexport const boot = () => {}fails three of the four, and removing it fails withexpected exactly one range.<hash>.js in …/static, found 0 — run \bun run build\and commit the bundle.Two things worth a look. A cache-busting query does not work under Bun —
import(url + "?a=1")and?a=2evaluate the module once, which I verified before relying on it — so each boot also copies the committed bytes to its own path in amkdtempdirectory (removed inafterAll, nothing written into the repository); the query is still there for the runtimes that honour it, and the comment says which one does the work. And no module that ships changed: the only edit outside the new test issrc/range/independence.test.ts, widened by one line so a.test.ts— which is in no bundle, the same licence it already givesbun:testandnode:— may importscripts/build.ts, with a case pinning that a shipping module still may not. The stub indom.tsneeded nothing added; the shooter's bundle stays out of scope as the issue asks.bun test: 279 pass, 0 fail, the new file in 45 ms.🤖 Generated with Claude Code
Closes #35