Skip to content

fix(clients): restore the Clients workflow — TypeScript 7 and React 19 broke six of eight jobs - #1585

Closed
rbuergi wants to merge 1 commit into
mainfrom
fix/clients-typescript7-restore
Closed

rbuergi wants to merge 1 commit into
mainfrom
fix/clients-typescript7-restore

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

main is red. PR #1555 (the Dependabot npm-major group) merged at 12:05Z with the entire Clients workflow failing, and it has stayed that way — six of eight jobs. Nothing blocked it because Clients is advisory, which is precisely what #1568 is about. #1567 fixed the portal-next half; this fixes the rest.

Four breakages, one bump

1. TypeScript 7 stopped auto-including @types. The Node globals the cross-tree guard tests read (node:fs, node:path, process — in ciTrigger, localize, parity, restContract, wireContract) no longer resolved: TS2591 across @meshweaver/react, @meshweaver/client-web and the RN connector. Fixed by naming "types": ["node"] in those tsconfigs.

2. TypeScript 7 removed baseUrl (TS5102), failing the portal example and the RN connector before a single file was checked. Both files' paths were already written relative to their own tsconfig — which is exactly how TS resolves paths without a baseUrl — so dropping the option changes nothing about what they point at.

3. 🚨 TypeScript 7 removed the JS compiler API from the stable entry — and that is a PRODUCT break, not a build one. The typescript package's "." export is now ./lib/version.cjs; the compiler moved behind typescript/unstable/*. clients/typescript depends on typescript at runtime: the Node kernel worker transpiles user TS snippets with ts.transpileModule. So the bump broke TypeScript Code-node execution, silently.

Pinned back to ^5.9.3 there. This is not reverting a major for convenience — the major deleted a public API the product calls, and the replacement is explicitly unstable. The package's own test ("typescript node: types are stripped, then executed") proves it works again, and it would have caught the break — except the node-sdk job runs typecheck only. That half is fixed in #1496's PR.

4. react-native@0.76.5 declares peer react ^18.2.0, so bumping react to 19.2.8 made the RN package internally inconsistent and npm ci died with ERESOLVE before anything ran, taking out both RN jobs. react, react-dom, react-test-renderer, @types/react and @types/react-test-renderer go back to the 18.x they were on; both lockfiles regenerated.

The part that cannot be fixed by aligning versions

portal-next needs React 19 (Next 16 requires it) and shares the same renderer source (../react/src) through a tsconfig alias — so clients/react must stay on 19 while react-native must be on 18. Compiling that shared source inside the RN program then saw two incompatible @types/react and rejected every shared component as "not a valid JSX element type".

The RN tsconfig now pins the react specifier to its own @types/react, so the shared source compiles against the React the RN app actually runs on. The reasoning is at the site, not just here.

Verified locally, per job, exactly as clients.yml runs them

job result
@meshweaver/react typecheck ✅ · 261 tests ✅ · build ✅
@meshweaver/client-web typecheck ✅ · 52 tests ✅
@meshweaver/client typecheck ✅ · 5 tests ✅ (incl. the TS transpile)
Portal example npm ci ✅ · typecheck ✅ · build ✅
RN connector npm ci ✅ · typecheck ✅ · 156 tests ✅
RN web (Playwright) npm ci ✅ · expo export --platform web ✅

(Playwright itself was not driven locally; its npm ci step — the one that failed on main — and its export step both pass.)

Worth a separate decision

clients/react-native pins react-native@0.76.5 while expo is on ~57.0.12. Those are different SDK generations, and it is why React 19 cannot land there. Aligning react-native with the Expo SDK is the real fix for that split — a deliberate migration, not something to smuggle into a red-main restore.

No What's New entry: build/CI only. (The Code-node TypeScript execution break in item 3 never shipped in a release image — CD has published nothing since 12:05Z, which is #1568's other consequence.)

🤖 Generated with Claude Code

https://claude.ai/code/session_01KmBFaHTqhy7h742wkAaJKj

…eact 19 bump

PR #1555 (the Dependabot npm-major group) merged at 12:05Z with the ENTIRE
Clients workflow red, and it has been red on main ever since — six of eight jobs.
Nothing blocked it because Clients is advisory, which is exactly what #1568 is
about; #1567 fixed the portal-next half, and this fixes the rest.

Four distinct breakages, all from the same bump:

1. TypeScript 7 no longer auto-includes every @types package, so the Node
   globals the cross-tree guard tests read (`node:fs`, `node:path`, `process` in
   ciTrigger / localize / parity / restContract / wireContract) stopped
   resolving: TS2591 in @meshweaver/react, @meshweaver/client-web and the RN
   connector. Fixed by naming `"types": ["node"]` in those tsconfigs.

2. TypeScript 7 REMOVED the `baseUrl` option (TS5102), failing the portal
   example and the RN connector before a single file was checked. Both files'
   `paths` were already written relative to their own tsconfig — which is
   precisely how TS resolves paths without a baseUrl — so dropping the option
   changes nothing about what they point at.

3. 🚨 TypeScript 7 removed the JS compiler API from the package's stable entry:
   `typescript`'s "." export is now ./lib/version.cjs, and the compiler moved
   behind `typescript/unstable/*`. clients/typescript depends on `typescript` at
   RUNTIME — the Node kernel worker transpiles user TS snippets with
   ts.transpileModule — so the bump did not merely fail a typecheck, it BROKE
   TypeScript Code-node execution. Pinned back to ^5.9.3 there: this is a
   product API the major deleted, and its replacement is explicitly unstable.
   The package's own "typescript node: types are stripped, then executed" test
   proves it works again — and would have caught the break, except the node-sdk
   job ran typecheck only (#1496 fixes that half).

4. react-native@0.76.5 declares peer react ^18.2.0 / @types/react ^18.2.6, so
   bumping react to 19.2.8 made the RN package internally inconsistent and
   `npm ci` died with ERESOLVE before anything ran — taking out both RN jobs.
   react, react-dom, react-test-renderer, @types/react and
   @types/react-test-renderer go back to the 18.x they were on, and both
   lockfiles are regenerated.

That last one cannot be solved by aligning versions across packages: portal-next
needs React 19 (Next 16 requires it) and shares the SAME renderer source
(../react/src) through a tsconfig alias, so clients/react must stay on 19 while
react-native must be on 18. Compiling that shared source inside the RN program
then saw two incompatible @types/react and rejected every shared component as
"not a valid JSX element type". The RN tsconfig now pins the `react` specifier to
its OWN @types/react, so the shared source compiles against the React the RN app
actually runs on. Comment at the site says so.

Verified locally, per job, exactly as clients.yml runs them:
  @meshweaver/react        typecheck ✅  261 tests ✅  build ✅
  @meshweaver/client-web   typecheck ✅   52 tests ✅
  @meshweaver/client       typecheck ✅    5 tests ✅ (incl. the TS transpile)
  Portal example           npm ci ✅  typecheck ✅  build ✅
  RN connector             npm ci ✅  typecheck ✅  156 tests ✅
  RN web (Playwright)      npm ci ✅  expo export --platform web ✅

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KmBFaHTqhy7h742wkAaJKj

Copilot AI 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.

Pull request overview

This PR restores the green state of the Clients CI workflow after the TypeScript 7 / React 19 dependency wave (from the npm-major group bump) broke multiple client jobs. It does so by explicitly declaring Node typings where TS 7 no longer auto-includes them, removing now-invalid baseUrl usage, pinning the Node worker’s runtime TypeScript back to a stable compiler-API-compatible version, and re-aligning React Native back to React 18 to satisfy RN peer constraints.

Changes:

  • Pin clients/typescript back to typescript@^5.9.3 to keep ts.transpileModule available for runtime TS snippet execution.
  • Add "types": ["node"] to affected client tsconfigs so Node globals/modules resolve under TypeScript 7.
  • Revert clients/react-native React + React typings/test-renderer back to 18.x to satisfy react-native@0.76.5 peer constraints, and update lockfiles.

Reviewed changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
clients/typescript/package.json Pins runtime TypeScript back to ^5.9.3 for the Node worker’s compiler API usage.
clients/typescript/package-lock.json Regenerates lockfile to reflect typescript@5.9.3 resolution.
clients/react/tsconfig.json Explicitly includes Node typings to fix TS7 @types auto-include change.
clients/react-native/tsconfig.json Adds Node typings, removes baseUrl, and adjusts module typing resolution for the mixed React 18/19 workspace scenario.
clients/react-native/package.json Re-aligns RN React stack to 18.x to satisfy RN peer dependency constraints.
clients/react-native/package-lock.json Updates lockfile to match the RN dependency realignment.
clients/portal/tsconfig.json Removes now-invalid baseUrl while keeping paths working under the new TS behavior.
clients/grpc-web/tsconfig.json Explicitly includes Node typings to fix TS7 @types auto-include change.
Files not reviewed (2)
  • clients/react-native/package-lock.json: Generated file
  • clients/typescript/package-lock.json: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@rbuergi

rbuergi commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate: #1583 covers the same four jobs (TS 7 types: ["node"] + baseUrl removal) and #1587 covers the same two react-native jobs (react 18 revert + deduping the React type identity in the RN tsconfig). Both were reached independently from the same evidence; three PRs on the same files would only conflict.

The two findings from this pass that are not in either PR are posted there instead:

Local verification from this branch, in case it is useful to either author: every job's own commands pass — react 261/261 + build, client-web 52/52, client 5/5 (incl. the TS transpile), portal ci+typecheck+build, RN ci+typecheck+156/156, and expo export --platform web.

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.

2 participants