From 5d437b9fbc63ba392a4f3164cd396e5515f95331 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Tue, 1 Sep 2026 17:07:00 +0200 Subject: [PATCH] Hold the promise to the standard, and put Firefox where the build makes it checkable --- AGENTS.md | 12 +++++++----- todo.md | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index f1c6b82..f50845b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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. diff --git a/todo.md b/todo.md index 1224155..0ed3e30 100644 --- a/todo.md +++ b/todo.md @@ -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