You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f259a4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: site/content/docs/runtime/typescript.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,4 +130,4 @@ Error: kaboom
130
130
131
131
The stack frame reports `app.ts:2:8` — the line in your source, not the transpiled output. To turn it off, pass `--no-enable-source-maps`.
132
132
133
-
Source maps are injected on every supported Node version except the **26.2.x** patch band, where a Node regression makes a no-message `assert(false)`rethrow as a `TypeError` instead of an `AssertionError` when source maps are on. On 26.2.x Nub withholds the flag, so stack traces there are not remapped. Every other version (18.19 through 26.1, and 26.3+) gets source maps.
133
+
Source maps are injected on every supported Node version except **26.0 through 26.7**, where a Node regression ([nodejs/node#63169](https://github.com/nodejs/node/issues/63169)) makes a no-message `assert(false)`throw a `TypeError` instead of an `AssertionError` when source maps are on. Nub withholds the flag across that band, so stack traces are not remapped there. Every other version gets source maps: 18.19 through 25.x, and 26.8 onward, where the upstream fix ships.
Copy file name to clipboardExpand all lines: wiki/research/nub-v0.5-augmentation-regressions.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,12 +39,13 @@ One `typeof` probe against a lazy undici-backed global pulls 227 modules into ev
39
39
40
40
### Cause 2 — `--enable-source-maps` always injected
41
41
42
-
Injecting the flag on every run puts each invocation on Node's source-map error path, which changes what a message-less assertion throws. Accepted as-is.
42
+
Injecting the flag on every run puts each invocation on Node's source-map error path, which changes what a message-less assertion throws. Gated off across the affected Node 26 band (see the reversed verdict below).
43
43
44
44
-**Tests:**~5 (assert ×2, source-map-enable, es-module-cjs-named-error; also the 26.x TypeError).
45
45
-**What breaks:** nub injects `--enable-source-maps` on every run (`flags.rs`, `ALWAYS_INJECT`). Node's error path bails when a file has no source map, so (a) on Node 26 a no-message `assert.ok(false)` throws **`TypeError` instead of `AssertionError`** — breaks `catch (e) { e instanceof assert.AssertionError }`; (b) on Node 24.9–25.x the assert *message* degrades from the source expression to `false == true`; (c) a child spawned without the flag still gets remapped stacks.
46
-
-**Landed:** source-maps injection predates the June benchmark — the 26.2 gate for it is from **2026-06-11**, so the behavior is **old / pre-existing**, not part of recent growth. The 26.x TypeError only became visible as Node 26 shipped and became the recommended line.
47
-
-**VERDICT — accept, no fix (2026-07-24).** The bug is narrow: only a bare `assert.ok(false)`/`assert(false)` with **no message** (asserts with a message, `strictEqual`, and plain throws are all fine). A 26.x-wide gate was briefly landed then **dropped** — disabling TS stack-trace remapping for every Node-26 user to fix that one edge case, whose workaround is passing a message, was the wrong trade. Not documented, not filed upstream, by decision. The `source_maps_safe` gate stays as-is (26.2-only, unrelated).
46
+
-**Landed:** source-maps injection predates the June benchmark — the original 26.2-only gate for it is from **2026-06-11**, so the behavior is **old / pre-existing**, not part of recent growth. The 26.x TypeError only became visible as Node 26 shipped and became the recommended line.
47
+
- **VERDICT — REVERSED 2026-08-21: gate the whole released 26.x band.** The 2026-07-24 call below accepted the divergence and left `source_maps_safe` at 26.2-only. Two facts overturned it. First, the band was mis-scoped: the regression is [nodejs/node#63169](https://github.com/nodejs/node/issues/63169) and it affects **every released 26.x** — reproduced on 26.0.0, 26.3.0, 26.5.1 and 26.7.0 — so a 26.2-only gate protected almost nobody while the docs claimed 26.1 and 26.3+ were clean. Second, the failure is a wrong error TYPE, not a degraded message, so it breaks `node:test` and any `instanceof assert.AssertionError` check from outside the assertion, where "pass a message" is not a workaround the caller owns. Upstream fixed it on `main` in b5d37cd4 ([nodejs/node#63215](https://github.com/nodejs/node/pull/63215), 2026-08-20), unreleased as of v26.7.0. `source_maps_safe` now withholds the flag for `26.0.0 <= v < 26.8.0` as a stopgap; re-verify when 26.8.0 ships. 25.x is clean (25.9.0 throws an `AssertionError` with the degraded `false == true` message — right type, worse text).
48
+
-**Superseded verdict — accept, no fix (2026-07-24).** The bug was judged narrow: only a bare `assert.ok(false)`/`assert(false)` with **no message** (asserts with a message, `strictEqual`, and plain throws are all fine). A 26.x-wide gate was briefly landed then **dropped**, on the reasoning that disabling TS stack-trace remapping for every Node-26 user to fix one edge case was the wrong trade. That reasoning rested on the mis-scoped band and on treating the type corruption as cosmetic.
48
49
49
50
### Cause 3 — Default `NODE_COMPILE_CACHE` lacks provenance
50
51
@@ -131,3 +132,4 @@ That left zero automated compat signal for the whole June→July window in which
131
132
Every revision to this document, with the date and what changed.
132
133
133
134
- 2026-07-24 — Initial write-up. 70 regressions → 9 root causes with git provenance. Key finding: none introduced by/since the benchmark; all landed 2026-06-03…07-09 during v0.1→v0.5 development; causes 2/3/4/9b predate the June benchmark, the rest are the 53→70 growth. Disambiguated the 07-23 fix "revert" (an editor discard) from code regressions.
135
+
- 2026-08-21 — **REVERSAL** on Cause 2. The `--enable-source-maps` regression band was mis-scoped as 26.2-only; it is [nodejs/node#63169](https://github.com/nodejs/node/issues/63169) and covers every released 26.x (reproduced on 26.0.0 / 26.3.0 / 26.5.1 / 26.7.0). The 2026-07-24 "accept, no fix" verdict is superseded: `source_maps_safe` now withholds the flag for `26.0.0 <= v < 26.8.0`, pending the upstream fix b5d37cd4 ([nodejs/node#63215](https://github.com/nodejs/node/pull/63215)) reaching a release.
0 commit comments