Skip to content

fix(native-tools): extract in projects with jsxRuntime "vue" - #291

Merged
andrii-bodnar merged 1 commit into
mainfrom
fix/extractor-jsx-runtime-vue
Nov 4, 2026
Merged

andrii-bodnar merged 1 commit into
mainfrom
fix/extractor-jsx-runtime-vue

Conversation

@andrii-bodnar

Copy link
Copy Markdown
Contributor

@lingui/vue/config sets macro.jsxRuntime: "vue". createSwcExtractor() passed it to the native extractor, which only knows "react" and "solid", so extraction failed on every file:

unknown variant vue, expected react or solid

jsxRuntime only changes how <Trans> children are emitted, never the extracted messages. The extractor now leaves it out. The native transform() still rejects "vue", as before.

Tests: new createSwcExtractor test with jsxRuntime: "vue". It fails without the fix and passes with it. The rest of the native-tools suite passes.

Fixes #289

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.60%. Comparing base (4dc83f9) to head (e7ccf5d).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #291   +/-   ##
=======================================
  Coverage   94.60%   94.60%           
=======================================
  Files          11       11           
  Lines        2576     2576           
=======================================
  Hits         2437     2437           
  Misses        139      139           
Flag Coverage Δ
unittests 94.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

`createSwcExtractor()` passed `macro.jsxRuntime` from the Lingui config to
the native extractor, which only knows "react" and "solid". With
`@lingui/vue/config` every file failed with `unknown variant vue`.
`jsxRuntime` never changes the extracted messages, so drop it for extraction.

Fixes #289

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar force-pushed the fix/extractor-jsx-runtime-vue branch from 642a6e8 to e7ccf5d Compare November 4, 2026 08:47
@andrii-bodnar
andrii-bodnar merged commit aa21c44 into main Nov 4, 2026
28 checks passed
@andrii-bodnar
andrii-bodnar deleted the fix/extractor-jsx-runtime-vue branch November 4, 2026 09:01
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.

Support jsxRuntime: "vue" in the native extractor

1 participant