Hold the promise to the standard, and put Firefox where the build makes it checkable
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-01 17:07:00 +02:00
parent 9ed4bf5c8b
commit 5d437b9fbc
2 changed files with 11 additions and 8 deletions
+7 -5
View File
@@ -60,11 +60,13 @@ they never reach a consumer.
## 6. The package contract
- Runs on every runtime, not only Node — a browser as readily as a server. The shipped source is
ECMAScript and nothing else, at an ES2022 baseline: no host import, no host global, no DOM.
`tsconfig.build.json` is that gate, typechecking the shipped files alone with `types: []` and
`lib: ES2022`, so `node:fs`, `process` and an ES2024 method are compile errors here rather than a
consumer's crash there. Node's test runner, the corpus reads and the build are the repo's own,
- Runs on any ES2022 engine, not only Node — a browser as readily as a server. The shipped source
is ECMAScript and nothing else: no host import, no host global, no DOM. `tsconfig.build.json` is
that gate, typechecking the shipped files alone with `types: []` and `lib: ES2022`, so `node:fs`,
`process` and an ES2024 method are compile errors here rather than a consumer's crash there. The
standard is the line, never an engine list: one implementing it in part — Hermes is the live
doubt, on the Unicode property escapes and the lookbehind the markdown grammar spells — is out of
scope rather than a bug. Node's test runner, the corpus reads and the build are the repo's own,
never the library's, and `engines.node` states the floor the shipped JavaScript needs — `>=18`
never the higher one those repo-only tools want.
- ESM only — no CommonJS build, no dual-package hazard.
+4 -3
View File
@@ -144,9 +144,10 @@ numbering is the order the work was planned in, not the order it ships.
beside it), plus `exports`/`files` in `package.json`. The
maintainer's bump PR also removes `private: true`, the guard against any earlier publish.
§6's browser half is first checkable here, on the emitted `dist/index.js` a browser can
load — the compile gate names no host API, and a real page converting a document is the
other half; name the engines that page covers, since Bun's JavaScriptCore is not Safari's
and none of the three legs is SpiderMonkey. `engines.node` gets its one-line proof here
load — the compile gate names no host API, and a real page converting the corpus is the
other half. Headless Firefox is that page, settling both at once: the browser proof, and the
only SpiderMonkey there is, `ci.sh`'s three legs being two V8s and a JavaScriptCore that is
not Safari's. `engines.node` gets its one-line proof here
too — `import('./dist/index.js')` under a pinned `node:18` image, which cannot run the
suite that type stripping wants 22+ for, but proves exactly what the field claims.
**Settled** (the maintainer, 2026-09-01): the round-trip proved over the checked-in corpus