Skip to content

Remove @shopify/react-i18n#6919

Open
gonzaloriestra wants to merge 1 commit intofix-deprecated-dependenciesfrom
remove-react-i18n
Open

Remove @shopify/react-i18n#6919
gonzaloriestra wants to merge 1 commit intofix-deprecated-dependenciesfrom
remove-react-i18n

Conversation

@gonzaloriestra
Copy link
Contributor

@gonzaloriestra gonzaloriestra commented Mar 2, 2026

WHY are these changes introduced?

There's a warning about @shopify/react-i18n being deprecated:

❯ pnpm install
Scope: all 14 workspace projects
packages/ui-extensions-dev-console       |  WARN  deprecated @shopify/react-testing@5.4.0
packages/ui-extensions-dev-console       |  WARN  deprecated @shopify/react-i18n@7.14.0
 WARN  14 deprecated subdependencies found: @shopify/dates@2.1.1, @shopify/function-enhancers@3.1.0, @shopify/i18n@2.1.0, @shopify/name@1.3.0, @shopify/react-effect@5.2.0, @shopify/react-hooks@4.1.2, @shopify/useful-types@5.3.0, boolean@3.2.0, glob@10.5.0, glob@7.2.3, glob@8.1.0, inflight@1.0.6, node-domexception@1.0.0, whatwg-encoding@3.1.1
Packages: +12
++++++++++++
Progress: resolved 1991, reused 1841, downloaded 0, added 1, done
Done in 3.8s using pnpm v10.11.1

WHAT is this pull request doing?

Removes the depency:

❯ pnpm install
Scope: all 14 workspace projects
packages/ui-extensions-dev-console       |  WARN  deprecated @shopify/react-testing@5.4.0
 WARN  8 deprecated subdependencies found: @shopify/useful-types@5.3.0, boolean@3.2.0, glob@10.5.0, glob@7.2.3, glob@8.1.0, inflight@1.0.6, node-domexception@1.0.0, whatwg-encoding@3.1.1
Packages: +16 -1
++++++++++++++++-
Progress: resolved 1980, reused 1830, downloaded 0, added 1, done
Done in 4.4s using pnpm v10.11.1

How to test your changes?

pnpm install

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

Copy link
Contributor Author

gonzaloriestra commented Mar 2, 2026

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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 76.93% 14542/18903
🟡 Branches 70.6% 7232/10244
🟡 Functions 75.95% 3699/4870
🟡 Lines 78.44% 13739/17515

Test suite run success

3788 tests passing in 1448 suites.

Report generated by 🧪jest coverage report action from fb4bc7a

@gonzaloriestra gonzaloriestra force-pushed the fix-deprecated-dependencies branch from e5365bc to 51ac217 Compare March 2, 2026 12:03
@gonzaloriestra gonzaloriestra force-pushed the fix-deprecated-dependencies branch from 51ac217 to 131e313 Compare March 2, 2026 14:48
@gonzaloriestra gonzaloriestra force-pushed the fix-deprecated-dependencies branch from 131e313 to dfd3d96 Compare March 3, 2026 10:49
@gonzaloriestra gonzaloriestra force-pushed the fix-deprecated-dependencies branch from dfd3d96 to 24611bb Compare March 3, 2026 15:49
@gonzaloriestra gonzaloriestra marked this pull request as ready for review March 4, 2026 11:43
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner March 4, 2026 11:43
@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

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,
)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@binks-code-reviewer
Copy link

🤖 Code Review · #projects-dev-ai for questions
React with 👍/👎 or reply — all feedback helps improve the agent.

Complete - 1 findings

📋 History

✅ 1 findings

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