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 3c1f809
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(compiler): preserve coverage pragmas in JSX (#3301)
* fix(compiler): preserve coverage pragmas in JSX
* fix(compiler): implement SSR source access
* fix(compiler): align coverage pragma carry-through between Babel and Oxc
Both compilers now agree on which authored pragmas lead a component's
`children` getter:
- Block comments only: line comments are never carried (Oxc dropped
`{// c8 ignore next}` and misread `// c8 ignore` inside a block comment).
- Pragmas from consecutive empty containers are all carried, in order
(Oxc kept only the last container).
- A pragma followed by text still leads the getter (Babel dropped it when
the next child was text or a same-line space).
- Only pragmas print, not neighboring notes in the same container.
Oxc re-anchors each run's pragma comments to the first pragma's start and
spans the getter there. The shared fixture covers every case with
expectations both test suites assert across dom/ssr/universal.
Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Ryan Carniato <ryansolid@gmail.com>
Co-authored-by: Claude via Cursor <noreply@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Preserve `/* istanbul ignore … */` and `/* c8 ignore … */` block comments written as JSX children on the generated component `children` getter. Line comments are not carried.
0 commit comments