Skip to content

feat: configurable id generation#202

Merged
andrii-bodnar merged 4 commits intomainfrom
configurable-id-generation
Mar 2, 2026
Merged

feat: configurable id generation#202
andrii-bodnar merged 4 commits intomainfrom
configurable-id-generation

Conversation

@timofei-iatsenko
Copy link
Collaborator

Adds "useLinguiV5IdGeneration": true to plugin parameters

Allow to switch between V5 and V6 generateId behaviors.

This allows to use v6 release channel with v5 @lingui/cli

@timofei-iatsenko
Copy link
Collaborator Author

@andrii-bodnar this one is ready for merge

@codecov
Copy link

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.01%. Comparing base (7981816) to head (e3ee50c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #202      +/-   ##
==========================================
+ Coverage   92.69%   93.01%   +0.31%     
==========================================
  Files           8        8              
  Lines        1465     1531      +66     
==========================================
+ Hits         1358     1424      +66     
  Misses        107      107              
Flag Coverage Δ
unittests 93.01% <100.00%> (+0.31%) ⬆️

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

Files with missing lines Coverage Δ
src/generate_id.rs 100.00% <100.00%> (ø)
src/js_macro_folder.rs 97.89% <100.00%> (+0.06%) ⬆️
src/lib.rs 91.98% <100.00%> (+0.07%) ⬆️
src/options.rs 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andrii-bodnar
Copy link
Contributor

@timofei-iatsenko what if we cherry-pick #201 to the stable-5.x branch? And then release the latest version from there, avoiding the configuration

@timofei-iatsenko
Copy link
Collaborator Author

I did it not only to be able to use #201 with v5, but for generally unblock users to keep updated with a swc_core bumps switching to v6. I hope that should not happend to ofthen, thanks of new compatibility changes they did.

This breaking change between v5 and v6 is quite artificial, and if we can provide a backward compatibility for a while - i would do that.

SWC plugin is already have a lot of troubles with SWC compatibility. Hope it makes sense.

@andrii-bodnar
Copy link
Contributor

That also seems reasonable, given that this is the only actual breaking change between the two versions.

@andrii-bodnar andrii-bodnar merged commit 80d5dd5 into main Mar 2, 2026
4 checks passed
@andrii-bodnar andrii-bodnar deleted the configurable-id-generation branch March 2, 2026 09:16
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