Skip to content

feat: switch to transformWithOxc, drop esbuild direct dependency#76

Open
stevez wants to merge 2 commits into
mainfrom
feat/transform-with-oxc
Open

feat: switch to transformWithOxc, drop esbuild direct dependency#76
stevez wants to merge 2 commits into
mainfrom
feat/transform-with-oxc

Conversation

@stevez

@stevez stevez commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace transformWithEsbuild with transformWithOxc in createEmptyCoverage (src/converter/index.ts)
  • OXC is bundled inside Vite 8 via Rolldown — no extra package needed
  • OXC does not constant-fold process.env.NODE_ENV without an explicit define, so all branches are preserved in the zero-coverage map (same behavior as the former platform: 'neutral' esbuild option)
  • Removes the esbuild direct dependency added in v1.5.1, making that release's workaround obsolete

Test plan

  • All 33 test files pass (803 tests), coverage numbers identical to baseline
  • Run E2E coverage end-to-end and verify zero-coverage file denominators match Vitest output

🤖 Generated with Claude Code

stevez and others added 2 commits July 10, 2026 23:10
Replace transformWithEsbuild with transformWithOxc for zero-coverage
generation. OXC is bundled inside Vite via Rolldown so no extra package
is needed. OXC does not constant-fold process.env.NODE_ENV without an
explicit define, preserving all branches in the zero-coverage map.

Reverts the esbuild direct dependency added in v1.5.1.
Bumps version to 1.5.2.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace transformWithEsbuild with transformWithOxc for zero-coverage
generation. Pass jsx:{runtime:'automatic'} to force JSX transformation
regardless of the project's tsconfig.json — Next.js projects typically
set "jsx":"preserve" which OXC respects when auto-discovering tsconfig,
producing far fewer statements without this override.

OXC does not constant-fold process.env.NODE_ENV without an explicit
define, preserving all branches in the zero-coverage map.

Removes the esbuild direct dependency added in v1.5.1.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant