codemod icon indicating copy to clipboard operation
codemod copied to clipboard

React-i18n Migration from ## **v22.x.x to v23.0.0** codemods

Open dfordp opened this issue 1 year ago • 2 comments

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 InterpolationOptions type. In version 23.0.0, the ns property within InterpolationOptions is now constrained to be of type Namespace instead of being a string or a readonly 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, KeysWithSeparator has been renamed to JoinKeys. This means wherever KeysWithSeparator was used in the codebase, it needs to be replaced with JoinKeys.

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 avatar Aug 29 '24 17:08 dfordp

@dfordp is attempting to deploy a commit to the Codemod Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 29 '24 17:08 vercel[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 29 '24 17:08 CLAassistant