Skip to content

refactor: createBabelExtractor factory and deprecate extractorParserOptions#2458

Merged
andrii-bodnar merged 4 commits intonextfrom
extractor-refactoring
Feb 24, 2026
Merged

refactor: createBabelExtractor factory and deprecate extractorParserOptions#2458
andrii-bodnar merged 4 commits intonextfrom
extractor-refactoring

Conversation

@timofei-iatsenko
Copy link
Collaborator

Description

Deprecate extractorParserOptions in favour of factory for the babel extractor.

This aligns extractor configuration with #2414

And also prepare it to SWC extractor, which would also have it's own parser options.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Examples update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
js-lingui Ready Ready Preview Feb 22, 2026 11:15am

Request Review

@timofei-iatsenko timofei-iatsenko changed the title Extractor refactoring chore: createBabelExtractor factory and deprecate extractorParserOptions Feb 18, 2026
@timofei-iatsenko timofei-iatsenko changed the title chore: createBabelExtractor factory and deprecate extractorParserOptions chore: createBabelExtractor factory and deprecate extractorParserOptions Feb 18, 2026
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

size-limit report 📦

Path Size
packages/core/dist/index.mjs 1.75 KB (0%)
packages/detect-locale/dist/index.mjs 618 B (0%)
packages/react/dist/index.mjs 1.21 KB (0%)

Comment on lines -24 to -28
const file = await fs.readFile(filename)

const parserOptions = linguiConfig.extractorParserOptions

await extractFromFileWithBabel(
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

experimental extractor was hardcoded to use a babel extractor. Now it would use whatever is set in the config

Comment on lines -13 to -14
- `.linguirc` file in JSON format.
- `lingui` section in `package.json`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't advertise that. js/ts is a default recomended way.

@andrii-bodnar andrii-bodnar changed the title chore: createBabelExtractor factory and deprecate extractorParserOptions refactor: createBabelExtractor factory and deprecate extractorParserOptions Feb 24, 2026
@andrii-bodnar andrii-bodnar added this to the v6 milestone Feb 24, 2026
@andrii-bodnar andrii-bodnar merged commit b496953 into next Feb 24, 2026
11 checks passed
@andrii-bodnar andrii-bodnar deleted the extractor-refactoring branch February 24, 2026 15:57
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.

2 participants