Skip to content

fix(deps): update react-i18next for TypeScript 7 and translation parsing - #19378

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/neil-localization-dep-update
Sep 8, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/neil-localization-dep-update

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 0 0 0 0
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​12 $\color{#cf222e}{\Huge{\mathbf{−}}}$​20 $\color{#cf222e}{\Huge{\mathbf{−}}}$​8

Ready for review. Final validation evidence: 75,654 tests and Linux/Windows packaging pass; five rendered app E2E tests and five real React translation checks pass.

ELI5

Update react-i18next 17.0.8 → 17.0.13 so Orca's TypeScript 7 toolchain is supported and translation markup gets parser/typing fixes. Pin the reviewed version; keep i18next and React unchanged.

What Changed / Why

Upstream changelog: 17.0.9 adds TypeScript 7 to the peer range and fixes Trans inference; 17.0.11 adopts the maintained HTML parser and repairs literal less-than, quoted attributes and comment handling; 17.0.12 repairs keyless ICU translations; 17.0.13 fixes strict selector key-prefix typing.

The required companion html-parse-stringify moves 3.0.1 → 4.0.1 and removes its obsolete void-elements dependency. This is an upstream-integrated parser major, not a forced override. Because Trans parsing changed, validation includes rendered translation text and markup. No claim is made that Orca uses the ICU/strict-selector paths; TypeScript 7 compatibility and translation parsing are the relevant benefits.

Testing

  • Frozen-lockfile install: passed; resolved changes limited to react-i18next, html-parse-stringify and removal of void-elements.
  • All 20 existing localization/i18n test files: 189 passed. Covers provider startup/settings races, lazy language catalogs, locale formatting and translated UI text contracts.
  • Five additional real React server-rendering assertions passed: strong-tag component mapping, literal less-than preservation, escaping hostile interpolated markup, treating unknown script markup as literal text, and switching English → Spanish. No browser globals/mocks are needed for these React render checks.
  • pnpm tc: passed with the actual TypeScript 7 toolchain.
  • pnpm run build:electron-vite: passed including renderer boot graph; existing chunk warnings remain.
  • CI and rendered application checks passed at the exact commit; see final evidence above.

All automated commands use ORCA_BACKGROUND_LAUNCH=1. No layout, locale catalogs, schemas, wire frames, execution ownership or native dependency changes. Translation rendering reaches both local and remotely connected UIs; no local-worktree assumptions added.

Linked Issue

User-requested dependency review and validation.

Visual Proof

N/A — dependency-only change. Rendered application and React text/markup checks passed; see evidence above.

Review

  • Upstream and resolved dependency delta reviewed.
  • Local type/build/localization checks passed.
  • CI and application E2E complete; see final evidence above.
  • Agent skill upstream boundary not applicable.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Validation update for 72b1d5b:

  • 20 localization test files / 189 tests passed.
  • 5 actual React SSR assertions passed: Trans component formatting; preserving literal <; escaping injected markup; keeping unknown script markup literal; English → Spanish language switching.
  • Full typecheck and Electron build passed, including actual TypeScript 7 peer compatibility and renderer boot-graph verification.
  • Dependency delta is react-i18next plus its required html-parse-stringify update and void-elements removal. React and i18next remain unchanged.

PR CI and focused rendered Orca E2E are running against the full SHA. The earlier shortened-SHA dispatch was cancelled and replaced before treating it as evidence. Draft until results are reviewed.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Additional combined-candidate validation (local, macOS arm64): merged #19361, #19369, #19377, #19378, #19362, #19380 and #19382 into local commit a610eca2303d94ad02199240c0d3afc11bc1757f. Blocked Tiptap #19376 is excluded. This supplements each PR's own exact-commit tests; it does not replace pending CI.

  • Combined frozen-lockfile install, full pnpm tc and pnpm run build:electron-vite: passed.
  • Existing editor + renderer i18n suites: 1,581 passed, 2 skipped; 227 files passed, 1 skipped.
  • 11 parser/query/URI/selector/plist/XML/browser-target/ID assertions: passed.
  • 5 real React Trans rendering/interpolation/language-switch assertions: passed.
  • 6 real headless Chrome sanitizer assertions on the combined installed DOMPurify: passed.
  • Actual combined Electron 43.6.0 / Node 24.20.0: native SQLite read/write, patched PTY spawn/output/exit and filesystem watcher event all passed.

All commands used ORCA_BACKGROUND_LAUNCH=1; no visible app window was opened. The only merge conflict was adjacent package.json entries: resolve by retaining both "dompurify": "3.4.14" and "electron": "43.6.0". Lockfiles merged automatically and the combined frozen install verified consistency. Leaf PR branches remain independent and unchanged; nothing has been merged into main.

@OrcaWin

OrcaWin commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

Ready for review at 72b1d5b91dc05c6f53667c5b98dec43539266e2d.

  • Complete PR CI: 75,654 tests passed, 423 skipped across eight Node 24 shards; typecheck/static checks, Git and mixed-version wire contracts, shell/browser-provider checks, Linux and Windows packaging all passed.
  • Rendered Orca E2E: 5 passed, covering settings search, shortcut search, notification settings and the golden core flow.
  • Local 189 localization tests, 5 real React SSR assertions, typecheck/build and the combined-candidate validation documented above also passed.

The evidence covers the parser behavior changed by react-i18next/html-parse-stringify, including literal text and safe interpolation, while keeping React/i18next fixed. No new failures found in these checks; this is evidence for a safe focused bump, not a guarantee against every possible translation edge case.

@OrcaWin
OrcaWin marked this pull request as ready for review September 7, 2026 23:03
@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: c7fb6552-f4b3-491c-a144-4617d84fdbfc

📥 Commits

Reviewing files that changed from the base of the PR and between 2265fce and 72b1d5b.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The change pins react-i18next from ^17.0.8 to the exact version 17.0.13 in package.json.

Merge Risk: ⚪ Minimal · up to 72b1d

This updates react-i18next to a fixed 17.0.13 release for TypeScript 7 compatibility and translation fixes. The resolved dependency and existing integration coverage indicate no remaining merge-readiness risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the dependency update and its two main purposes: TypeScript 7 support and translation parsing fixes.
Description check ✅ Passed The description is detailed and on topic. It explains the dependency changes, reasons, testing, visual-proof status, review evidence, and compatibility considerations. The Linked Issue section does no…

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

  • react-i18next ^17.0.8 → 17.0.13 — pins the reviewed release and widens the typescript peer range from ^5 || ^6 to ^5 || ^6 || ^7, which is the substantive fix: the root toolchain is typescript@^7.0.2, and the prior peer range did not cover TS 7.
  • html-parse-stringify 3.0.1 → 4.0.1 (major) + void-elements removal — the upstream-integrated parser swap that react-i18next 17.0.11 adopted.

The behavior described in the PR body (Trans parsing/typing fixes) has no runtime surface in Orca: the codebase imports only useTranslation, initReactI18next, and I18nextProvider from react-i18next, and there is no <Trans> component anywhere — html-parse-stringify is consumed exclusively by <Trans>. The t() paths here use plain interpolation (escapeValue: false in src/renderer/src/i18n/i18n.ts). i18next (^26.3.1), react/react-dom (^19.2.8) are unchanged and satisfy the i18next >= 26.2.0 peer. The lockfile update is internally consistent (importer/packages/snapshots all updated, void-elements fully removed), only the root lockfile carries react-i18next, and the packages are renderer-bundled rather than main-process packaged. The dropped caret on 17.0.13 is a deliberate "pin the reviewed version" choice documented in the body, not a defect.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@OrcaWin
OrcaWin merged commit b8f6c7c into main Sep 8, 2026
65 of 71 checks passed
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