Remove @shopify/react-i18n#6919
Remove @shopify/react-i18n#6919gonzaloriestra wants to merge 1 commit intofix-deprecated-dependenciesfrom
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f6552e9 to
08f4907
Compare
c19a23f to
41d6f79
Compare
08f4907 to
e5365bc
Compare
41d6f79 to
8cc1829
Compare
Coverage report
Test suite run success3788 tests passing in 1448 suites. Report generated by 🧪jest coverage report action from fb4bc7a |
e5365bc to
51ac217
Compare
8cc1829 to
8ca6ef2
Compare
51ac217 to
131e313
Compare
8ca6ef2 to
ec4e89f
Compare
131e313 to
dfd3d96
Compare
ec4e89f to
6851617
Compare
dfd3d96 to
24611bb
Compare
6851617 to
fb4bc7a
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
| return template.replace(/\{(\w+)\}/g, (match, key: string) => | ||
| key in replacements ? String(replacements[key]) : match, | ||
| ) | ||
| } |
There was a problem hiding this comment.
useI18n interpolation misses non-element React nodes and can corrupt rendered strings
interpolate() decides whether to do React-node interpolation by checking React.isValidElement(value). But React.ReactNode can be fragments, arrays, strings, numbers, etc. If replacements include fragments/arrays/other non-element nodes, hasReactNodes becomes false and values may be coerced via String(...), producing [object Object] or otherwise corrupted UI text.
|
🤖 Code Review · #projects-dev-ai for questions ✅ Complete - 1 findings 📋 History✅ 1 findings |

WHY are these changes introduced?
There's a warning about
@shopify/react-i18nbeing deprecated:WHAT is this pull request doing?
Removes the depency:
How to test your changes?
pnpm installMeasuring impact
How do we know this change was effective? Please choose one:
Checklist