Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump lingui to v5 #173

Merged
merged 6 commits into from
Dec 12, 2024
Merged

Bump lingui to v5 #173

merged 6 commits into from
Dec 12, 2024

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Dec 11, 2024

https://lingui.dev/blog/2024/11/28/announcing-lingui-5.0
https://lingui.dev/releases/migration-5

Bump lingui to v5,
switch from babel-plugin-macros to @lingui/babel-plugin-lingui-macro,
drop /macro, add /core, update imports from /macro to go to /core/macro or /react/macro
add eslint-plugin-lingui, fix new warnings; disable lingui/no-expression-in-message for now, too many warnings, but valid

remove lingui macro, split into react/macro and core/macro
remove babel macro, replace with lingui macro plugin
    perl -i -npe 's/@lingui\/macro/@lingui\/core\/macro/' src/**/*.*
    perl -i -npe 's/import { Trans,(.*) from ..lingui.core.macro/import { Trans } from '\''\@lingui\/react\/macro'\''; import {$1 from '\''\@lingui\/core\/macro/' src/**/*.*
    perl -i -npe 's/import { Trans } from ..lingui.core.macro/import { Trans } from '\''\@lingui\/react\/macro/' src/**/*.*
    perl -i -npe 's/; import/;
    import/' src/**/*.*
    npm run prettier
disable lingui/no-expression-in-message for now, too many warnings, but valid
fixup unnecessary Trans
@himdel himdel merged commit 86c7b00 into main Dec 12, 2024
2 checks passed
@himdel himdel deleted the bump-lingui branch December 12, 2024 02:09
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