Skip to content

fix: update the TSRX toolchain to @tsrx/core 0.3.2 - #1294

Merged
trueadm merged 2 commits into
mainfrom
fix/tsrx-core-0.3
Sep 24, 2026
Merged

trueadm merged 2 commits into
mainfrom
fix/tsrx-core-0.3

Conversation

@leonidaz

@leonidaz leonidaz commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Updates the shared TSRX toolchain to the release in tsrx-org/tsrx#218 and handles the two editor changes it brings. Closes #1291. Closes #1292.

Package From To
@tsrx/core 0.2.0 0.3.2
@tsrx/prettier-plugin, @tsrx/typescript-plugin 0.4.1 0.4.10
@tsrx/react 0.3.0 0.3.7
@tsrx/solid 0.2.0 0.2.7
@tsrx/vite-plugin-react 0.0.105 0.0.112
@tsrx/vite-plugin-solid 0.0.102 0.0.109

The runtimes these pin exactly (@tsrx/runtime 0.2.3, @tsrx/react-runtime and @tsrx/solid-runtime 0.1.11) are in minimumReleaseAgeExclude with them. @tsrx/ripple and @tsrx/oxc are not part of this release and stay where they are.

What changes for Octane:

The lockfile was rebuilt from main's. Besides the @tsrx versions above, pnpm pruned older duplicates that nothing references any more, such as [email protected] and [email protected]. Each of those packages keeps its newer version. pnpm sync updated the recorded lockfile hashes.

Validation

Local runs were partial by choice; CI runs the full suite.

  • pnpm format:files:check on the changed files
  • pnpm typecheck: passed in full on @tsrx/core 0.3.0 before the bump to 0.3.2; the 0.3.2 run was stopped early with no errors so far
  • pnpm test: not run in full locally; left to CI
  • targeted tests, run on 0.3.0:
    • tests/compiler/parser.test.ts, @switch arm scopes: same-name arm locals and a same-name theme applied per arm parse with the native and JavaScript parsers, compile for client (dev and prod) and server, and give no editor errors. On core 0.2.0 the JavaScript parser rejects the locals, and the per-arm apply fails.
    • tests/compiler/volar.test.ts, awaited @for bodies: the virtual TSX for an async function with an awaited @for body typechecks against octane/tsrx-iterable, with item typed as number. A variant calling item.toUpperCase() reports TS2339. compileTypesInspection claims only @for for a plain body and an awaited one. Each test fails without its fix.
  • pnpm --dir packages/octane build on 0.3.2, which ends with verify-dist.mjs

Risk / follow-ups

  • In the Re-export map_iterable_async from octane/tsrx-iterable for @tsrx/core 0.3 #1291 test, the only diagnostic left is TS1058 on the async functions. That is Octane's deliberate async-component signal: JSX.Element poisons the promise protocol (jsx-runtime.d.ts), so an async function returning an element reports it, whether or not it loops.
  • @tsrx/ripple 0.2.x still depends on @tsrx/core ^0.2, so the lockfile keeps a @tsrx/[email protected] copy for it until Ripple publishes against 0.3.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

Medium Risk
Compiler and editor behavior change for @switch scoping and async @for; the drei casts are type-only but touch runtime control wiring.

Overview
Bumps the shared TSRX toolchain to @tsrx/core 0.3.2 (with matching @tsrx/typescript-plugin / related pins) and refreshes lockfile-derived metadata (react-parity.json lockfile SHA, evals overlayLockfileHash).

Octane compiler/editor: Re-exports map_iterable_async from octane/tsrx-iterable, extends Volar directive mapping for awaited @for lowering, and adds tests for @switch per-arm block scopes and typed awaited @for bodies.

@octanejs/drei: TransformControls and pivot control helpers cast useThree((state) => state.controls) through unknown so stricter tsrx-tsc no longer reports TS2352 on the direct cast from EventDispatcher | null.

Reviewed by Cursor Bugbot for commit ba3aea7. Bugbot is set up for automated code reviews on this repo. Configure here.

Update the shared TSRX packages to the release in tsrx-org/tsrx#218 and
drop the @tsrx/[email protected] patch, which core 0.3.0 ships
(tsrx-org/tsrx#143). Core now gives each @switch arm its own block scope,
so arms may declare the same local and an arm's `apply` resolves to its
own style block.

Core lowers a @for whose body awaits to `__map_iterable_async` in the
editor's virtual TSX:

- Re-export `map_iterable_async` from `octane/tsrx-iterable` and require
  it in verify-dist, so the helper import resolves and the loop binding
  keeps its type (#1291).
- Claim `__map_iterable_async` as a @for origin, so type inspection
  resolves the keyword instead of the whole loop (#1292).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Sep 24, 2026
@github-actions
github-actions Bot marked this pull request as draft September 24, 2026 00:22
@leonidaz
leonidaz marked this pull request as ready for review September 24, 2026 00:24
tsrx-tsc from @tsrx/typescript-plugin 0.4.10 now maps the TS2352 that
TypeScript reports for a direct cast from `EventDispatcher<{}> | null`
to `ControlsProto | undefined` or `{ enabled: boolean } | undefined`, so
the drei adapted-types parity lane failed. Upstream drei casts through
`unknown` at each of these sites; the port had dropped that step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@leonidaz
leonidaz requested a review from trueadm September 24, 2026 01:00
@trueadm
trueadm merged commit 2d46905 into main Sep 24, 2026
30 checks passed
@trueadm
trueadm deleted the fix/tsrx-core-0.3 branch September 24, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claim @for inspection origins for __map_iterable_async (@tsrx/core 0.3) Re-export map_iterable_async from octane/tsrx-iterable for @tsrx/core 0.3

2 participants