Repository navigation
fix: update the TSRX toolchain to @tsrx/core 0.3.2 - #1294
Merged
Merged
Conversation
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]>
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
@tsrx/core@tsrx/prettier-plugin,@tsrx/typescript-plugin@tsrx/react@tsrx/solid@tsrx/vite-plugin-react@tsrx/vite-plugin-solidThe runtimes these pin exactly (
@tsrx/runtime0.2.3,@tsrx/react-runtimeand@tsrx/solid-runtime0.1.11) are inminimumReleaseAgeExcludewith them.@tsrx/rippleand@tsrx/oxcare not part of this release and stay where they are.What changes for Octane:
@switcharm scopes ([Bug]: Local declarations collide across separate @switch case blocks tsrx-org/tsrx#148). Each@switcharm is its own block scope. In the browser build, where#octane/compiler-parseruses core's JavaScript parser, two arms declaring the same local no longer fail to parse. On every path, an arm's<style apply={theme}>now resolves to that arm's owntheme; before, it could resolve to a later arm's and fail with "applied before its declaration". The native parser already accepted the locals, and Octane already lowers each arm to its own function.@importin<style>(fix: resolve relative url() in style blocks and reject @import (#153) tsrx-org/tsrx#198) is now thetsrx-css-importcompile error. Nothing in this repository uses it.@forbodies (fix(core): await generated closures that hold an authored await (#145) tsrx-org/tsrx#212). The editor's virtual TSX lowers a@forwhose body awaits toawait __map_iterable_async(…), imported from the platform'sforOfIterableHelper.octane/tsrx-iterablere-exportsmap_iterable_async, andverify-dist.mjsrequires it. Without it, the import is TS2724 and the loop binding is an implicitany(TS7006).DIRECTIVE_GENERATED_NAMES.JSXForExpressionincludes__map_iterable_async, socompileTypesInspectionclaims the four-character@forkeyword instead of the whole block.tsrx-tsc0.4.10 now maps the TS2352 TypeScript reports for castingstate.controls(EventDispatcher<{}> | null) straight toControlsProto | undefinedor{ enabled: boolean } | undefined, which failed drei's adapted-types parity lane. Upstream drei casts throughunknownat all five sites, soTransformControlsand the pivot controls do again. This has its own@octanejs/dreipatch changeset.patches/@[email protected](fix(core): map TS parameter properties and bodyless class methods tsrx-org/tsrx#143, parameter properties and bodyless methods in the tsrx-tsc mapping walker) ships in core 0.3.0, so the patch and itspatchedDependenciesentry are removed.The lockfile was rebuilt from
main's. Besides the@tsrxversions 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 syncupdated the recorded lockfile hashes.Validation
Local runs were partial by choice; CI runs the full suite.
pnpm format:files:checkon the changed filespnpm typecheck: passed in full on@tsrx/core0.3.0 before the bump to 0.3.2; the 0.3.2 run was stopped early with no errors so farpnpm test: not run in full locally; left to CItests/compiler/parser.test.ts,@switch arm scopes: same-name arm locals and a same-namethemeapplied 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-armapplyfails.tests/compiler/volar.test.ts,awaited @for bodies: the virtual TSX for an async function with an awaited@forbody typechecks againstoctane/tsrx-iterable, withitemtyped asnumber. A variant callingitem.toUpperCase()reports TS2339.compileTypesInspectionclaims only@forfor a plain body and an awaited one. Each test fails without its fix.pnpm --dir packages/octane buildon 0.3.2, which ends withverify-dist.mjsRisk / follow-ups
JSX.Elementpoisons the promise protocol (jsx-runtime.d.ts), so an async function returning an element reports it, whether or not it loops.@tsrx/ripple0.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
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
Medium Risk
Compiler and editor behavior change for
@switchscoping and async@for; the drei casts are type-only but touch runtime control wiring.Overview
Bumps the shared TSRX toolchain to
@tsrx/core0.3.2 (with matching@tsrx/typescript-plugin/ related pins) and refreshes lockfile-derived metadata (react-parity.jsonlockfile SHA, evalsoverlayLockfileHash).Octane compiler/editor: Re-exports
map_iterable_asyncfromoctane/tsrx-iterable, extends Volar directive mapping for awaited@forlowering, and adds tests for@switchper-arm block scopes and typed awaited@forbodies.@octanejs/drei:TransformControlsand pivot control helpers castuseThree((state) => state.controls)throughunknownso strictertsrx-tscno longer reports TS2352 on the direct cast fromEventDispatcher | null.Reviewed by Cursor Bugbot for commit ba3aea7. Bugbot is set up for automated code reviews on this repo. Configure here.