📐 fix: correct what the adversarial review of the page found
Five auditors read the finished page against the source; a second pass tried to refute each finding. What survived: **The esbuild row was wrong, and dangerously so.** It said esbuild takes "the same settings via tsconfigRaw" as tsc. It does not: esbuild lowers standard decorators only when its own *top-level* `target` is below `esnext`. A `target` inside `tsconfigRaw` sets the `useDefineForClassFields` default and nothing else. I ran it — the decorator survives verbatim and the module throws SyntaxError on import, which is the exact silent passthrough the section blames on oxc. The repo's own vite plugin and toolchain test always passed `target` top-level, so the executed matrix never backed the advice the docs gave. Both halves are now asserted in src/toolchain.test.ts. **"This table is executed by a test" did not cover the oxc row** — the only ✗, and the row the whole section is built around. It cannot be: oxc ships as a native binary with no standalone transform API, which the test file already said in a comment. Fixed on the page and in the README. Reference corrections, each verified against the source: - fromRequest has no …Sync twin; the group blurb claimed every entry did - @IsNotIn does not narrow its field, unlike its five neighbours - @MinDate/@MaxDate take a Date as well as a thunk - @Validate has three parameters, not two; defineRule has four - getConfig() and resetConfig() were missing from a group rendered under the heading "Everything cereale exports" And on the page itself: the vite.config.ts snippet never imported defineConfig, so pasting it failed; and the plugin note omitted that .tsx is excluded by default, which would drop a reader straight back into the 0-test hole the section exists to describe. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SAcqrz3FcadkYr3xG32CjK
This commit is contained in:
@@ -95,13 +95,15 @@ than a `TypeError` from somewhere inside the engine.
|
||||
|
||||
### Toolchain support
|
||||
|
||||
Whether Cereale works at all depends on your compiler emitting standard decorators, so this
|
||||
table is [checked by a test](src/toolchain.test.ts) rather than asserted here:
|
||||
Whether Cereale works at all depends on your compiler emitting standard decorators, so the three
|
||||
✅ rows are [checked by a test](src/toolchain.test.ts) rather than asserted here — each compiles a
|
||||
decorated class with that tool and asserts the metadata arrived. The ❌ row cannot be: oxc ships
|
||||
inside a native binary with no standalone transform API.
|
||||
|
||||
| Transformer | Status | Notes |
|
||||
| --- | --- | --- |
|
||||
| `tsc` | ✅ | With `experimentalDecorators: false` and `target: ES2022`+ |
|
||||
| esbuild | ✅ | Same settings via `tsconfigRaw` |
|
||||
| esbuild | ✅ | `experimentalDecorators: false` via `tsconfigRaw`, **plus** esbuild's own top-level `target: es2022`. Its default `esnext` target leaves decorator syntax in the output |
|
||||
| swc | ✅ | `jsc.transform.decoratorVersion: "2022-03"` |
|
||||
| **oxc** | ❌ | Used by **Vite 8** and **Vitest 4** — see below |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user