Commit 46f5003
The 2 long-standing red `dune runtest` cases (E2E Node-CJS Codegen 2 &
4, "no adapter require without the flag") were a **false positive**, not
a real codegen defect: `emit_node_cjs` already emits the
`--vscode-extension` wiring *only* when the flag is set. The failure was
the assertion doing a bare-substring `contains cjs
"@hyperpolymath/affine-vscode"` — which matched an *explanatory comment*
in the default `_buildImports`, not any adapter `require`/wiring.
Fix (both, defence-in-depth, behaviour unchanged):
- Tighten the assertion to the actual wiring token
`require("@hyperpolymath/affine-vscode")` so it tests intent ("no
adapter *require* without the flag") and won't false-trip on docs.
- Reword the default `_buildImports` comment so generated standalone
shims no longer embed the resolvable adapter specifier (a grep/audit
for the adapter shouldn't flag every standalone .cjs either).
Result: `dune runtest` is now 214 tests / 0 failures (was 2 pre-existing
failures present since before #123). Deno-ESM harness suite unaffected.
Pre-existing since the #116/#117 --vscode-extension flag work; unrelated
to the #122 Deno-ESM track but was the only red on affinescript main.
Refs #116, #117.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fdc7ba3 commit 46f5003
2 files changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2851 | 2851 | | |
2852 | 2852 | | |
2853 | 2853 | | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
2854 | 2857 | | |
2855 | | - | |
| 2858 | + | |
2856 | 2859 | | |
2857 | 2860 | | |
2858 | 2861 | | |
| |||
0 commit comments