• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

clay / claycli / 28601919018
87%
master: 87%

Build:
Build:
LAST BUILD BRANCH: jordan/vite-modulepreload
DEFAULT BRANCH: master
Ran 02 Jul 2026 03:30PM UTC
Jobs 1
Files 30
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 03:29PM UTC coverage: 87.372% (+0.3%) from 87.084%
28601919018

push

github

jjpaulino
🍕 Harden browser-compat stubs + add kiln-edit bundle smoke test

Prevent the class of edit-mode crash where a Node-builtin browser stub is
import-unsafe (throws at module evaluation) — the family the safe-buffer #253
crash belongs to — and add a real-bundle smoke test so these regress in CI
instead of in an editor's console.

#1 CI boot-smoke test (browser-compat.bundle.test.js)
- Runs the real kiln-edit plugin pipeline (browser-compat + node-resolve +
  commonjs) over the libraries that have broken before (safe-buffer,
  create-hash) and evaluates the emitted bundle in a Buffer-less VM. A
  stub-shape regression now fails CI.

#2 Prefer real browser globals over bespoke shims, at zero bundle cost
- Codify the stub import-safety invariant and add a shared preferGlobal()
  helper (single source of truth for "use globalThis.X, else minimal shim").
- buffer/node-fetch already did this; apply it to url (globalThis.URL /
  URLSearchParams). No heavyweight polyfills added.

Fixes surfaced by the smoke test
- string_decoder was an empty stub, but cipher-base (crypto-browserify ->
  create-hash/createHmac) does `new StringDecoder(enc)` inside .digest(enc):
  an empty stub throws "StringDecoder is not a constructor" the instant a
  hash/HMAC is stringified in the browser. Promoted to a minimal rich stub
  whose StringDecoder delegates to Buffer.toString(encoding).
- node:-prefixed rich builtins (node:buffer, node:stream, ...) were listed in
  SIMPLE_STUBS, forcing them to empty stubs and re-opening the subclass-at-eval
  crash. resolveId already normalizes the node: prefix, so the explicit entries
  are removed; rich node: forms now route to the rich stub.

Adds safe-buffer + create-hash as devDependencies (smoke-test fixtures only).

Co-authored-by: Cursor <cursoragent@cursor.com>

758 of 935 branches covered (81.07%)

Branch coverage included in aggregate %.

6 of 6 new or added lines in 1 file covered. (100.0%)

1622 of 1789 relevant lines covered (90.67%)

12.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 28601919018.1 02 Jul 2026 03:30PM UTC 30
87.37
GitHub Action Run
Source Files on build 28601919018
  • Tree
  • List 30
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28601919018
  • db18ce89 on github
  • Prev Build on v6.0.0-rc.4 (#28599039437)
  • Next Build on jordan/harden-browser-stubs (#28602937239)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc