Repository navigation
fix: update the TSRX toolchain to @tsrx/core 0.5 and the new formatter - #1399
Conversation
Update @tsrx/core, @tsrx/prettier-plugin and @tsrx/typescript-plugin to 0.5.0, @tsrx/react to 0.4.0, @tsrx/solid to 0.3.0, the Vite plugins, @tsrx/oxc to 0.17.0 and Prettier to 3.9.9. @tsrx/core 0.5 gives template markup TSX's exact tree: layout whitespace between children is its own JSXText and each @case arm is one BlockStatement. Octane now adopts that tree once at the parse boundary, copy-on-write, so compiled output is unchanged; the editor parse keeps the line breaks around a comment child so a template @ts-expect-error stays on the line before the child it is about. Also fix enum member initializers being invisible to the client-only server check and to universal renderer validation (TSEnumBody), let plain-module memo printing accept TSEnumBody, move tests to the new diagnostic codes, and fix binding types the new editor output surfaced. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reformat every .tsrx and .mdx file with @tsrx/prettier-plugin 0.5.0, whose
new architecture prints ordinary JavaScript, TypeScript and JSX with
Prettier itself. Compiled output is unchanged apart from position-derived
ids, scoped-style hashes of reindented CSS, and merged `{' '}` text.
Refresh what the reformat invalidates: the source-ledger hashes of copied
binding files, the Streamdown TSRX declarations, and the evals dataset
manifests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Re-pin the integrity hashes that parity, closure, and adapted-evidence manifests record for fixtures the formatter rewrote. The parity lanes re-run the evidence against the new bytes. - Update the alien-signals mutation test to the reformatted fixture text. - Give three's Canvas wrapper a spread type without `ref`, which the strict packed-source consumer reported under the new editor output. - Pre-declare `octane > entities` for the website's dev optimizer: the in-browser compiler reaches it only at request time, and the late optimize pass now rehashes the playground's chunks and reloads. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The registry embeds each component's source, so the 0.5 reformat left it stale for registry.test.ts's build --check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Parentheses hide binding directive
- Added
unwrap()call inisDirectiveto peelParenthesizedExpressionbefore reading.value, so('use dom bindings')is recognized the same as'use dom bindings'.
- Added
Or push these changes by commenting:
@cursor push 6e0de9e6e9
Preview (6e0de9e6e9)
diff --git a/packages/octane/src/compiler/dom-bindings.js b/packages/octane/src/compiler/dom-bindings.js
--- a/packages/octane/src/compiler/dom-bindings.js
+++ b/packages/octane/src/compiler/dom-bindings.js
@@ -212,7 +212,7 @@
}
function isDirective(node) {
- return node?.type === 'ExpressionStatement' && node.expression?.value === DIRECTIVE;
+ return node?.type === 'ExpressionStatement' && unwrap(node.expression)?.value === DIRECTIVE;
}
function attrName(attr) {You can send follow-ups to the cloud agent here.
leonidaz
left a comment
There was a problem hiding this comment.
upgrade dependencies in pnpm-workspace.yaml based on this pr's description:
it fixes the bug with directive formatting.
@tsrx/core 0.5.1 (tsrx-org/tsrx#967, released in #969) reads the strings that start a `@{ … }` function body as its directive prologue, so the formatter no longer wraps `'use dom bindings'` in parentheses. Restore the authored directives the 0.5.0 formatter had parenthesized. Declare Octane's TSRX compiler for @octanejs/colorful: without it the TypeScript plugin type-checked the package through the React target's virtual code, whose composed refs its sources don't use. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Enum walk misses keys and shadows
- Added an enum scope with member names to prevent false positives from shadowed identifiers, walk computed member keys to detect client-only bindings used as computed enum keys, and extended isReferenceIdentifier to treat non-computed TSEnumMember keys as non-references.
Or push these changes by commenting:
@cursor push 0fa3008fd3
Preview (0fa3008fd3)
diff --git a/packages/octane/src/compiler/client-only-server.js b/packages/octane/src/compiler/client-only-server.js
--- a/packages/octane/src/compiler/client-only-server.js
+++ b/packages/octane/src/compiler/client-only-server.js
@@ -562,8 +562,20 @@
// smuggle a client-only binding into the server graph.
if (node.type === 'TSEnumDeclaration') {
if (node.declare !== true) {
- for (const member of node.body?.members ?? [])
+ const members = node.body?.members ?? [];
+ const enumBindings = new Set();
+ if (node.id?.name) enumBindings.add(node.id.name);
+ for (const member of members) {
+ if (member.computed !== true && member.id?.type === 'Identifier') {
+ enumBindings.add(member.id.name);
+ }
+ }
+ scopes.push(enumBindings);
+ for (const member of members) {
+ if (member.computed === true) visit(member.id, member, 'id');
visit(member.initializer, member, 'initializer');
+ }
+ scopes.pop();
}
return;
}
@@ -744,6 +756,8 @@
return parent.computed === true || parent.shorthand === true;
}
if (parent.type === 'MethodDefinition' && key === 'key' && !parent.computed) return false;
+ if (parent.type === 'TSEnumMember' && (key === 'key' || key === 'id') && !parent.computed)
+ return false;
if (parent.type === 'LabeledStatement' && key === 'label') return false;
if (
(parent.type === 'BreakStatement' || parent.type === 'ContinueStatement') &&You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 268166f. Configure here.
- Decode a JSX attribute string once, from its text as written (#1327). `@tsrx/core` gives `value` already decoded, so the browser compiler and Node's core fallback decoded `&lt;` twice. - Read a type parameter's name as the Identifier both parsers now give (#1354). - Give the client-only check's enum walk its members' scope, so a later initializer reading a member is not a use of a same-named import. - Test that the Node and browser parsers compile the same sources to the same output: attribute and text references, comments between template texts, `//` that touches text, `>` in text, layout text, an empty `@case` arm, type parameters, and the dynamic-tag rule (#1328, #1329, #1330, #1338, #1353, #1355). - Pin the nested-`var` redeclaration in both compile modes and the editor, and keep a var of its own name covering hoisting (#1330). - Count a comment child out of `Children.count`, as React does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The home page's 3D section reaches @octanejs/three's raw store source through a deferred chunk, so Vite discovered zustand/vanilla mid-session. With the new TSRX packages in the dev bundle, that late optimize pass changes chunk hashes and reloads every open page, which reloaded the playground under the website e2e suite's concurrent tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes the two brotli budget raises from #1727 so the test shards run before it lands on main; merging main after #1727 lands removes them from this pull request's diff. Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR #1399 reformats Octane's .tsrx sources with the new TSRX formatter. The compiled code is byte-identical in size, but position-derived binding ids change, and brotli compresses binding-apollo-client-vite 151 bytes and suspense-transition 64 bytes worse. That puts them 9 and 2 bytes over budget. Raise each to the #1399 measurement plus the usual 256 bytes of brotli headroom. Co-authored-by: Claude Opus 5.5 <[email protected]>
Adopt the TSRX releases from tsrx-org/tsrx#1042: @tsrx/core 0.5.5, @tsrx/prettier-plugin and @tsrx/typescript-plugin 0.6.3, @tsrx/react 0.4.5, @tsrx/solid 0.3.5, @tsrx/vite-plugin-react 0.0.120 and @tsrx/vite-plugin-solid 0.0.117. @tsrx/core 0.5.5 ships both fixes the repository patched in: a parenthesized `<style>` block resolves as an `apply` target in the editor parse (tsrx-org/tsrx#1045), and the printer keeps source-phase imports (tsrx-org/tsrx#1048). The patch is removed; volar.test.ts and module-import-phases.test.ts, which guarded it, pass without it, and every tracked .tsrx file compiles to the same client, server and Volar output as on the patched 0.5.4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: - pnpm-lock.yaml: keep this branch's TSRX versions under main's @types/node 24.13.3 peer context. `pnpm install --lockfile-only` (pnpm 12.9.1) leaves the result unchanged. - 87 react-parity manifests: lockfileSha256 regenerated for the merged lockfile (react-parity:lockfiles:generate). - website BenchBars.tsrx and BenchmarkExplorer.tsrx: this branch only reformatted them, so take main's #1738 version and reformat it. - user-apps-v1 manifest.jsonl: regenerated by pnpm sync. - minimal-budgets.json: main re-baselined suspense-transition and binding-apollo-client-vite under the Oxc minifier (#1792), so this branch's earlier raises for the reformat are dropped. Reformat the 16 .tsrx files main added or changed in the old layout. Their client and server output is unchanged once position-derived ids are masked, and all 51 .tsrx files main touched compile in both modes. The reformat moves position-derived ids, which makes some bundles a few bytes smaller than main's budgets allow under the ratchet, so tighten them: context gzip -2, suspense-transition gzip -1, apollo esbuild brotli -99, bindings total raw -12. The bindings app and total gzip are set 27 bytes over the local measurement rather than 32, because CI has measured that app's gzip 5 bytes below local. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | e4824f1 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 04:40 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | e4824f1 | Commit Preview URL Branch Preview URL |
Oct 07 2026, 04:43 PM |
The website integration suite failed: the production build ran past its 420 s limit in Nitro's environment build. Nitro re-bundles each SSR chunk through Octane's Vite plugin, and its preflight parses each one with @tsrx/core. For every node, core 0.5's comment attachment copied all the code up to the next comment through a line-break replace, so the 5 MB docs chunk, which has few comments, took minutes. Core 0.4 tested a regex in place and was only just fast enough. The blank-line result is read only when that text is whitespace, so test `onlyWhitespace` first; the result is unchanged. Locally the Nitro phase drops from 8 m 9 s to 5.5 s, and the whole website build from 543 s to 41 s. A compiler-vite-options case transforms a 650 kB generated server chunk in 1.4 s, against 12.6 s unpatched. Also drop the @pnpm/exe lockfile entries that installing through `npx [email protected]` added in the previous merge, and regenerate the parity manifests' and evals corpus' lockfile hashes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: - pnpm-lock.yaml: keep the patched @tsrx/core 0.5.5, and follow #1835 moving @tsrx/oxc from octane's dependencies to its devDependencies, at this branch's catalog version 0.18.0. `pnpm install --lockfile-only` leaves the result unchanged. - 87 react-parity manifests and the user-apps-v1 manifest: lockfile hashes regenerated by pnpm sync. The new root-callback-local fixture is already in the new layout and compiles in both modes. The minimal, app and JSX bundle budgets pass the ratchet against main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Takes 35eb3c7, which installs the optional @tsrx/oxc parser peer in both Lynx toolchain lanes. #1835 made it optional, and the Lynx compatibility and packed rspeedy consumer jobs failed on main and here. No conflicts; pnpm sync leaves the tree unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main's #1835 made @tsrx/oxc an optional peer of octane and pinned 0.16.0, main's catalog version, in both Lynx toolchain lanes (35eb3c7) and in every install instruction. This branch's catalog is on 0.18.0, so octane declares that peer, and installing the lanes failed with an unmet @tsrx/oxc peer (installed 0.16.0, wanted 0.18.0) in Lynx compatibility, the packed rspeedy consumer test, and validate publishable packages. Pin 0.18.0 in the lanes and their README row, and in the READMEs, docs, website pages and the two unreleased changesets that tell projects which version to install. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: the 87 react-parity manifests and the user-apps-v1 manifest record the lockfile hash, which main changed by adding jsdom to the codegen-size benchmark (#1840); pnpm sync regenerated them. The merged lockfile needs no changes from `pnpm install --lockfile-only`. The new anonymous-default-component fixture (#1842) is already in the new layout and compiles in both modes; #1842's tests pass on this branch's parser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: - .changeset/optional-oxc-parser-peer.md: the octane 0.11.0 release (#1829) consumed it, with `@tsrx/[email protected]`, the peer that release declares. Take the deletion. This branch's tsrx-core-0-5 changeset now says octane declares `@tsrx/[email protected]` and that a project compiling Octane in Node upgrades its install from 0.16.0. - user-apps-v1 manifest.jsonl: regenerated by pnpm sync for the new package versions and fixtures. Reformat two .tsrx fixtures main added in the old layout (named-const-function-expression, named-function-expression-arms). Their client and server output is unchanged once position-derived ids are masked. The four octane test files main changed pass on this branch (205 tests). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict: the user-apps-v1 manifest.jsonl, regenerated by pnpm sync for the 0.11.1 package versions. The merge takes #1849 and the Version Packages release (#1850); the Lynx-lanes changeset with the 0.18.0 parser pin stays unreleased. #1849's three Strong test files pass on this branch (683 tests). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict: the user-apps-v1 manifest.jsonl, regenerated by pnpm sync after main re-cut the unpublished 0.11.x releases as octane 0.10.2. The lockfile, budgets and parser pins are unaffected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: app-budgets.json and minimal-budgets.json, where #1854 and #1855 lowered the rows this branch had tightened. Take main's values, then write this branch's measurements (`--write-budgets`) on the merged tree, which only lowers: bindings app gzip and total raw, one app brotli, and three minimal gzip rows. hydrate-frame stays at main's 364,882 raw. It measures 364,886 here and on main alike, and main's own CI fails the same check, so the raise belongs in a budget-only change on main, not in this PR. #1852 stops the Vite plugin parsing modules it only passes through, such as the SSR chunks Nitro re-bundles. The @tsrx/core patch still bounds every module the plugin does compile, so its guard now transforms a 540 kB project module that uses a hook instead of a Nitro chunk: about 2 s patched, 20 s unpatched, against a 6 s bound. The patch note says so. Reformat main's new hydrate-frame fixture; its output is unchanged once position-derived ids are masked. main's changed test files pass on this branch (bundler-compiler, compiler-vite-options, behavior-root, binding-handoff, style-transaction-rollback). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflicts: app-budgets.json and minimal-budgets.json. #1858 raised budgets ahead of #1857 (in-place Block signal owners, still open), so take its values in every conflicting row; lowering them here would undo a raise #1857 depends on. That includes hydrate-frame (365,194 raw), which clears the over-budget failure main had. This branch keeps its lower bindings app gzip and one app brotli, rows #1858 left alone. Until #1857 lands, the tight-budget check measures well under the raised rows, so shard 1's "Verify every bundle budget" step is expected to fail here, as on any PR in that window. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1399, which this branch was stacked on, landed on main squashed, so merging main again would conflict on every file #1399 changed after this branch took it at bbea608. Resolve by taking main's tree and re-applying this branch's own changes (bbea608..5274e65): the octane-tsc split into native.mjs, the react-port type evidence on the TypeScript 7 API, the typescript-native catalog alias, and base-ui's native pristine lanes. All of them applied cleanly to main. Generated files are rebuilt instead of merged: - pnpm-lock.yaml: main's lockfile with this branch's catalog change. Every TypeScript 7.0.2 entry drops, and optional `typescript` peers resolve to 5.9.3 or 6.0.3 as before. Re-resolving styled-components under pnpm 12.9.1 also installs its optional css-to-react-native peer (with camelize and css-color-keywords). - The parity manifests' lockfile hashes and the user-apps-v1 manifest, through pnpm sync. - base-ui and base-ui-utils parity manifests: re-pin build-react-parity-manifest.mjs, which now holds main's and this branch's changes, and point the pristine lanes at typescript-native. Checked: react-port tests (374), check-source-publication tests (19), ci:workflow:test (372), typecheck:coverage, react-parity:validate, packages:source:check, both base-ui pristine lanes on the nightly, and octane-tsc on sample projects. Co-Authored-By: Claude Opus 5.5 <[email protected]>
#1858 raised 65 budgets ahead of #1857 (in-place Block signal owners), which is still open: it is behind main, fails format:check under #1399's formatter, and its own ratchet is off by 2 gzip bytes. Until it lands, every push to main enforces the downward ratchet against those unfilled raises, so main 21f911d (#1399) failed test shard 1/4 at "Verify every bundle budget": cli-spa-starter raw budget 101,976 must ratchet to 101,825. Rewrite every budget with run-minimal.mjs and run.mjs --write-budgets on main 21f911d (measured + 32 raw/gzip, + 256 brotli): 65 lowerings, no raises, the same 65 entries #1858 raised. #1857 re-lands its raise in a budget-only change immediately before it merges. Co-Authored-By: Claude Opus 5.5 <[email protected]>


Summary
@tsrx/core0.5.5,@tsrx/prettier-plugin0.6.3 (the new formatter architecture from feat(prettier): switch to the new formatter architecture tsrx-org/tsrx#944),@tsrx/typescript-plugin0.6.3,@tsrx/react0.4.5,@tsrx/solid0.3.5,@tsrx/vite-plugin-react0.0.120,@tsrx/vite-plugin-solid0.0.117,@tsrx/content-mapper0.1.2,@tsrx/oxc0.18.0 (fix(compat): decode character references in JSX text and attribute values, as @tsrx/core 0.5.2 does tsrx-org/oxc#144), and Prettier 3.9.9.@tsrx/content-mapperinto the default catalog, andoctane-tsc's TypeScript into a newnativecatalog. It stays on7.1.0-dev.20260921.1: later nightlies, through7.1.0-dev.20261004.1, report false TS7031 errors for a{ … } = {}parameter default (TS7031 false positive for nested object binding pattern with= {}default in an annotated parameter (regression from #64043) microsoft/TypeScript#64431) in puck, redux-toolkit and an rspeedy test..tsrxand 6.mdxfiles, in a separate commit.@tsrx/core0.5 parse tree so codegen is unchanged.Why
@tsrx/core0.5 gives template markup TSX's exact tree. The indentation between children is now its ownJSXText, and each@case/@defaultarm is oneBlockStatement. Without adapting, the upgrade alone changed compiled output for about 600 of the repository's.tsrxfiles:_$templateclones tocreateElement;@switcharms fell back fromcomponentSlotVoidtocreateElementFromConfig;positionalChildren(['', x, ''])wrappers;@switchtests rendered the wrong arm.Changes
Compiler (
octane)parser-template-shape.jsadopts the 0.5 tree at the parse boundary, copy-on-write. It drops layout-whitespaceJSXText(core'sisLayoutWhitespace) and gives each template@casearm its statement list, its 0.4 shape, when each arm already had its own scope.@ts-expect-erroron the line before its child.TSEnumDeclaration.members, and the universal child walker stopped atTSEnumBody. The node parser always producedTSEnumBody, and core 0.5 now does too.plain-hook-memo's printability check rejectedTSEnumBody, which esrap prints through its parent. Any plain module with an enum lost its source map.Language changes that reach fixtures and tests
<script>body cannot contain</ScRiPtin any case. The fixture writes<\/ScRiPt, which JSON reads the same, and a new test pins the compile error.docs/tsrx-basics.mdnotes the rule.tsrx-*toTSRX…/TS…. Tests now read them from@tsrx/core/diagnostics, and the style-syntax table compares codes, as core's harness now does.varin a nested@{ … }block that redeclares hook state is a redeclaration error in both parsers, as in TypeScript. The strong-mode test that relied on the native parser accepting it now pins the rejection.varrow (@for (var item of …)) cannot shadow a component binding: it belongs to the component function and redeclares it.main's fix: respect template bindings in effect analysis #1671 template-binding tests used one; the shadowing case inauto-hook-deps.test.tsnow pins the error in client and server modes, and the two Strong effect cases that relied on it are dropped. Theconst,let, bare and destructured row variants keep the shadowing coverage.Binding fixes the new output surfaced
referrors, which fix: restore strict consumer types for published bindings #834 deliberately makes errors, in@octanejs/pdf, recharts, and@octanejs/three.main's ci: typecheck with TypeScript 7.1 in one parallel build #1521 has since fixed the same three spread bags (marking them ref-free), so this branch takes those fixes and no longer changes the bindings' types.@ts-expect-errordirectives suppressed nothing on either toolchain. The old output hid that by joining each directive to its child's line, so they're removed.CI follow-ups
main's@tsrx/prettier-plugin0.4.10 patch (fix(prettier): keep labeled statements and empty bodies when formatting .tsrx #1452): 0.5.2 prints labeled statements and empty bodies upstream. Its formatter test stays, with 0.5.2's output:do; while (a--);takes Prettier's own two-line layout, and an unknown node type still throws, now from Prettier's visitor keys.line:column. Formatting the starters moved those lines, so the prompts quote the new positions; every starter and workaround keeps the same Strong error, andverify-strong-repair-corpus.mjs --checkpasses.@tsrx/corepatch remains, for build time (below). Earlier versions of this branch patched two fixes into core: a parenthesizedconst theme = (<style>…</style>);, the formatter's multi-line layout, resolving as a styleapplytarget in the editor parse (octane-tscand Volar reported TSRX3002 for valid themes), and printing source-phase imports (import source x from,import.source()), which compiled as evaluation-phase imports.@tsrx/core0.5.5 ships both (fix(core): handle parenthesized <style> blocks and apply values in the editor like the build (#1044) tsrx-org/tsrx#1045, fix(core): keep the source phase ofimport sourceandimport.source()in printed output (#1046) tsrx-org/tsrx#1048), so the patch is gone, along withmain's 0.4.0 core and 0.4.10 prettier-plugin patches.volar.test.tsandmodule-import-phases.test.tsstill guard both, and pass on unpatched 0.5.5.@tsrx/core0.5.5 so that parsing a large module with few comments is no longer quadratic. Comment attachment ranincludesBlankLineon the text from every node to the next comment. 0.5's version first copies that text through a line-breakreplace, while 0.4 tested a regex in place. The result is read only when that text is whitespace, so the patch testsonlyWhitespacefirst, which leaves the result unchanged. Nitro re-bundles each SSR chunk through Octane's Vite plugin, whose preflight parses it with@tsrx/core. After the latest merge ofmain, the website's production build spent over 7 minutes in that phase on the 5 MB docs chunk (8 m 9 s locally) and failed the integration suite's 420 s build limit. With the patch, the docs chunk parses in 0.7 s instead of minutes, and the 1.5 MB benchmarks chunk in 0.8 s instead of 185 s. A newcompiler-vite-options.test.tscase transforms a 650 kB generated server chunk: 1.4 s with the patch, 12.6 s without it, against a 5 s bound.@octanejs/three > zustand/vanillafor the dev optimizer. The home page reaches it only through a deferred chunk, and with the new packages that late optimize pass rehashed chunks and forced a reload.Reformat commit
{' '}children into one space, stock Prettier 3.9.9 included. The conformance fixture that tests three spaces keeps its form underprettier-ignore.<style>blocks get new hashes. One SSR snapshot changes by hash only.TSRX 0.5 upgrade issues
&lt;renders<#1327. An attribute string is decoded once, by the parser. The browser compiler and Node's core fallback decodedtitle="a &lt;b&gt;"twice.@tsrx/oxcparse), but not in the browser compiler #1328. Both parsers now compile comments in template and plain-function JSX text the same way.parser-parity.test.tscompiles the same sources through@tsrx/oxcand@tsrx/coreand requires identical output.@{ }body in<{…}>) is now core'sTSRX2014error on both parsers, instead of invalid output. In a.tsxfile,<{…}>isn't TSX syntax and is a parse error. Tested in client and server mode.raw,>in text, and the coming decodedvalue#1330. The catalog is on@tsrx/core0.5.2 (Version Packages tsrx-org/tsrx#973).@tsrx/oxc0.18.0 decodes JSX text and attribute values the same way (fix(compat): decode character references in JSX text and attribute values, as @tsrx/core 0.5.2 does tsrx-org/oxc#144), so both parsers givevaluedecoded andrawas written.normalizeAuthoredJsxLiteralsno longer decodes anything: it applies JSX's whitespace rule to the parser'svalue, as Babel does, and prints an attribute from itsvaluewhen that differs from the string as written.octanedrops itsentitiesdependency. Decoding now follows JSX, as in React: a later HTML name such as✓stays text, where Octane on Node rendered✓, anda at a line end rendersa b. No tracked.tsrxfile changes output: the corpus compiles identically to the previous head (oxc 0.17.0 withentities) in client and server modes. Layout checks on parser trees (hydrate and renderer boundaries, Valdi, DOM bindings) test JSX whitespace inrawinstead of\s/.trim(). The strong-modevartest expects the redeclaration fromcompile()in both modes and fromcompileToVolarMappings(errors), and avarof its own name keeps covering hoisting. The parity tests cover a double-encoded reference in text, text that is only , at a line end, a named reference JSX does not define, CRLF, and>in text. Compiling every tracked.tsrxfile (3,005) through each parser on oxc 0.18.0 gives identical output, apart from dependency-list order in 3 outputs.@tsrx/core/diagnostics, and the style-syntax table compares codes.{/* */}:a⏎// c⏎brendersab, and<b>t</b>⏎/* c */ <i />keeps its space.https://…anda//bstay text. The editor keeps a template@ts-expect-erroron the line before its child (volar.test.ts). All pinned by the parity tests.parser-template-shape.js, core'sisLayoutWhitespace). An empty{}renders nothing and never merges text across it.Children.countmatches React over multi-line and comment children.TSTypeParameter.nameis read as theIdentifierboth parsers give.@case/@defaultarm is adopted as its statement list at the parse boundary, so every switch reader keeps its fast path. Without it, 15@switchtests fail. An empty arm holding only a comment is in the parity tests.Validation
@tsrx/core0.5.4 and 0.5.5 updates and merges ofmain(through 483cd31):.tsrx(3,104 files) gives identical client, server and Volar output (9,312 outputs)..tsrx(3,183 files) gives identical client, server and Volar output (9,549 outputs)..tsrxfilesmainadded or changed in the old layout are reformatted; their client and server output is identical once position-derived ids are masked.pnpm format:check(repo-wide) andpnpm sync(clean).octane-tscchain (197 projects): 0 errors on a fresh--frozen-lockfileinstall.packages:source:check,react-parity:validate,three:upstream:check, visxcompile:check/types:check, streamdowntypes:check,shadcn:registry:check,ci:workflow:test,strong-repair:check, dropzoneupstream:verify/test:u3-parity/test:u4-parity, and the base-ui source ledgers.octaneVitest project (22,239 tests): the 3varrow failures are fixed above; 21 timeouts under full-suite load pass in isolation (5 files, 313 tests)..tsrx(2,976 files) was compiled in client and server modes onmain's toolchain and on this branch. On identical sources, output is unchanged except three@octanejs/base-uifiles: they no longer pass''children, matching React, and a new differential test pins it. Across the reformat, compiled ASTs match once position-derived ids, CSS indentation, and{' '}merges are masked. The one semantic change is reverted as noted above. Fixtures merged frommainwere checked the same way.pnpm format:checkpnpm typecheck: all 132 leaf commands, run individually.pnpm sync, plus thepnpm testprechecks (three:upstream:check, visxcompile:check/types:check, streamdowntypes:check).octane,octane-prod,pdf*,recharts*,visx*,streamdown*,i18next*,tanstack-query*, andlivestore*: all pass. After the merge, four timing-sensitive tests timed out under concurrent machine load and passed in isolation.pnpm packages:pack:check(125 tarballs),react-parity:validate,react-parity:test(1,040 passing), and the website integration project. The dev playground test passed when run alone.octaneproject (652 files, 13,981 tests) andpackages:pack:check(125 tarballs). After the latest merges ofmain: theoctaneproject (670 files, 17,560 tests),ci:workflow:test(282),pnpm sync, and format checks on the changed files; fixtures merged frommaincompile identically before and after formatting, apart from position-derived ids.pnpm test: left to CI.New tests, each seen failing without its fix:
.tsrx;forbiddenGlobalsenum scope (both halves);@ts-expect-errorin the editor output (Octane-authored and{/* */}forms);Children.countover multi-line children (Octane counted 5, React 2).Disabling
@caseflattening fails 15 existing@switchtests.Performance: codegen is unchanged, so runtime and bundle size are too.
adoptTemplateShapetakes about 100 ms across the whole corpus, against about 1.8 s of native parsing and about 20 s of compiling. Whole-corpus compile time on a shared machine was within noise: 20.5, 24.9, and 19.8 s on this branch against 20.8, 18.9, and 20.3 s onmain.Risk / follow-ups
@tsrx/core, and the patch doesn't ship in Octane's tarball, so consumers on 0.5.x keep the quadratic parse until an upstream release has it. Octane's Vite plugin also preflight-parses every module, including Nitro's re-bundled SSR chunks.@tsrx/oxcerrors carry core'sTS…/TSRX…codes, but their messages omit core's(line:column)suffix. Nothing here depends on the message text.@tsrx/rippleand the Ripple benchmarks stay on their current pins.prop-attributes), with every raw size unchanged. The runtime is untouched, and each of the 26 reformatted benchmark sources compiles to the same number of bytes as onmain; only position-derived binding ids (b:…) differ, because reformatting moved the code they hash.Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Note
High Risk
Touches core compile/parsing semantics across the whole
.tsrxcorpus and upgrades multiple TSRX packages; incorrect adoption would change generated templates, switch arms, or JSX decoding for all consumers.Overview
Upgrades the TSRX stack to
@tsrx/core0.5.5,@tsrx/oxc0.18.0, and matching formatter/TypeScript plugins, and reformats thousands of.tsrxfiles to the new Prettier layout (multi-line JSX children, etc.) without changing compiled output except where noted below.Octane’s compiler now runs
adoptTemplateShapeat the parse boundary so 0.5’s TSX-shaped trees still codegen the same way: layout-whitespaceJSXTextis dropped (fixingChildren.count/ empty-string children), and each template@case/@defaultarm is normalized to the statement-list shape switch fast paths expect. Parser parity with oxc is preserved; JSX text/attributes are decoded once by the parser, so Octane stops double-decoding and drops theentitiesdependency. Enum member initializers are included in client-only andforbiddenGlobalschecks.Tooling and CI: Lynx lanes and docs pin
@tsrx/[email protected]; benchmark bundle budgets and integrity hashes are refreshed; compiler dependency lists dropentities. A local patch on@tsrx/corefixes quadratic comment attachment when parsing huge SSR chunks. Binding fixes address spread+referrors surfaced by parenthesized multi-line JSX returns; three visx@ts-expect-errordirectives that no longer suppress anything are removed.Reviewed by Cursor Bugbot for commit 13adc94. Bugbot is set up for automated code reviews on this repo. Configure here.