codemod
codemod copied to clipboard
React-i18n Migration from ## **v22.x.x to v23.0.0** codemods
Reacti18next
v22.x.x to v23.0.0
- Link to Official Upgrade Guide: [https://www.i18next.com/misc/migration-guide#v22.x.x-to-v23.0.0]
add-namespace type anotation
- Modification of the
InterpolationOptionstype. In version 23.0.0, thensproperty withinInterpolationOptionsis now constrained to be of typeNamespaceinstead of being astringor areadonly string[]. This change requires you to adjust your code accordingly.
Additional Details
- ns property from InterpolationOptions type will be constrained to Namespace rather than string or readonly string[].
- https://go.codemod.com/jkx2fNh
i18next_replace-keyswithseparator-with-joinkeys
- Renaming types or functions can be part of an effort to clarify the library's API, deprecate old functionality, or introduce new features. In this case,
KeysWithSeparatorhas been renamed toJoinKeys. This means whereverKeysWithSeparatorwas used in the codebase, it needs to be replaced withJoinKeys.
Additional Details
- Renaming KeysWithSeparator type to JoinKeys, and it will no longer be exposed.
- https://go.codemod.com/lzNvyAE
i18n_remove-options
- This migration simplifies the configuration but requires reviewing your existing normalization logic to ensure it still meets your needs without the explicit type-based customization previously available through
NormalizeByTypeOptions.
Additional Details
- Removing NormalizeByTypeOptions type.
- https://go.codemod.com/LbkZwAe
@dfordp is attempting to deploy a commit to the Codemod Team on Vercel.
A member of the Team first needs to authorize it.