Repository navigation
fix(vue): require vue 3.6 and vue-jsx-vapor 3.2.27, and bump the dev pins - #1296
Merged
jonkwheeler merged 13 commits intoNov 12, 2026
Merged
Conversation
`vue-jsx-vapor` 3.2.29 types a component's `v-slots` from its real slots, so the `_` flag on `Suspense` is an excess property and every `@try` with `@pending` reports TS2322 in the editor. The flag only matters at runtime, so keep it in compiled output and drop it from the type-only print. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Moves every dev pin, and adds `vue-jsx-vapor` as a dev dependency of `@tsrx/vue` so its peer stops resolving to 3.2.14 in the lockfile. Runs the Vue runtime tests on the real `vue-jsx-vapor` runtime instead of a hand-copied shim. The shim had the tsrx-org#870 bug and lacked `normalizeVaporSlots`, which the new compiler output imports, so it would have hidden the fix. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test matched text: it looked only at the first mention of `__VUE_HMR_RUNTIME__` and rejected only uses at column 0, so an indented, unguarded `createRecord` after one guarded use passed. It now runs the served module with `self` and none of Vue's globals, and checks what it posted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing failed when `_: 1` was dropped from compiled output. Pin it there and pin its absence from type-only output, for both ways `@pending` is lowered. Correct the changeset and 4a43094's message: `vue-jsx-vapor` rejects the flag from 3.2.20, not 3.2.29, and leaving it out clears the error from 3.2.22. 4a43094's "the flag only matters at runtime" is also unsupported: removing it fails no runtime test, and I haven't shown what depends on it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing in the project imports Vue's Vapor browser build. Only `vue-runtime-shim.js` does, and that file isn't part of the project. `tsc` reports the same with and without the entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
At the end of `type-only-types.test.js` it conflicted with tsrx-org#1177, which changes the lines before it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The type-only assertion was only a negative match, so it also passed if the `Suspense` boundary was gone. Require the boundary, and no compile errors, before checking that the flag is absent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
tsrx-org#1175 and tsrx-org#1222 import `Suspense` as `__Suspense`, so the test failed once either was merged with this branch. The name isn't what it's about. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Raise the floors in all five packages that declare them: `@tsrx/vue`, `@tsrx/vue-runtime`, `@tsrx/vite-plugin-vue`, `@tsrx/rspack-plugin-vue` and `@tsrx/bun-plugin-vue`. `vue >=3.6.0-0` admits the 3.6 prereleases and rejects 3.5, which has no Vapor. The old `>=3.5` rejected every 3.6 prerelease under npm, so no Vapor setup installed with npm's defaults. `vue-jsx-vapor` 3.2.27 is the first release with the fixes for both tsrx-org#186 (3.2.26) and tsrx-org#870 (3.2.27). Minor, because a project on `vue-jsx-vapor` 3.2.26 that installs today under pnpm's `strict-peer-dependencies` fails after this. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`vue` alone installs Vue's `latest`, 3.5.45, which has no Vapor: with pnpm, `vite build` then fails with MISSING_EXPORT. Name `vue@^3.6.0-0`, which picks the newest 3.6 prerelease now and stable 3.6 once it ships. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hangeset With `vue-jsx-vapor` 3.2.27 as the floor, every supported version rejects the flag, and every one accepts the output without it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`>=3.6.0-0` admits 3.6.0's prereleases, not later ones such as 3.6.1-alpha. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jonkwheeler
marked this pull request as ready for review
November 10, 2026 19:34
jonkwheeler
added a commit
that referenced
this pull request
Nov 12, 2026
The Solid and Vue plugin tests keep main's #1250 module-id tests and this branch's HMR CSS test, with both sides' node:fs imports. Main's #1125 already keeps the binding of a default-exported Vue component (const App = ...; export default App), so main's transform and shared compile test are kept, this branch's equivalent export-specifier rewrite and its vue-default-function-export changeset are dropped, and its Vue regression test, which passes on main's output, is kept. pnpm-lock.yaml is main's plus the entries this branch's lockfile added, re-resolved with the storybook-examples vue and vue-jsx-vapor pins moved to main's 3.6.0-rc.14 and 3.2.29 (#1296), so the README and llms.txt no longer list a Vue peer mismatch. Starting from main's lockfile alone resolved vue-component-meta 3.3.14, which brings @volar/* 2.4.30 and gives the VS Code extension two volar-service-typescript copies. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FRKmwAwuyPbGQ1ejNqiJ46
1 task done
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.
Fixes #186
Fixes #870
Summary
This moves the repository's dev pins from
vue3.6.0-beta.12 andvue-jsx-vapor3.2.14 tovue3.6.0-rc.14 andvue-jsx-vapor3.2.29, and raises the published peer floors tovue >=3.6.0-0andvue-jsx-vapor >=3.2.27. Both bugs are invue-jsx-vapor, and 3.2.27 is the first release that fixes both, so anything inside the new peers has both fixes. The install docs now name"vue@^3.6.0-0", and the documentednpm installandpnpm installboth work.The Vue packages get a minor changeset for the peers (see "Peer ranges"), and
@tsrx/vuealso gets a patch: its type-only output reported an editor error on every@trywith@pending. Compiled output doesn't change.Before and after, on the real runtime in headless Chromium. The first four rows gave the same HTML under
vite devandvite build:main(3.2.14, beta.12)<div>{show.value && <b>t</b>}</div><b>t</b><b>t</b><div>{show.value && <b>t</b>}<i /></div><b>t</b> <i></i><b>t</b><i></i>@forof<b>{n}</b>, then<i /><b>1</b><b>2</b><!--for--> <i></i><b>1</b><b>2</b><!--for--><i></i>@switchof<b>a</b>, then<i /><b>a</b> <i></i><b>a</b><i></i><div>{true && <span />}</div>, dev<span></span><span></span><div>{true && <span>a </span>}</div>, dev<span>a </span><span>a </span>export function greet, from #186FAIL Uncaught ReferenceError: __VUE_HMR_RUNTIME__ is not definedPASS helloThe worker row holds for lowercase and capitalized names, as declarations, arrows and default exports (six shapes). A worker importing a component with a hoisted static template still fails with
document is not defined, on both versions. That isn't #186: a component with nothing to hoist loads in the same worker.Which versions fix what
Each pair below is an empty project with the published
@tsrx/vue0.3.5 and@tsrx/vite-plugin-vue0.0.103, run on the real runtime in headless Chromium. #186 is the four worker shapes from the issue (lowercase and capitalized function declarations, an arrow and a default export) undervite dev. #870 is{true && <span />},{true && <span>a </span>}and{true && <span />}<b />, undervite devandvite build:vue-jsx-vaporvueThat makes 3.2.27 the real minimum: 3.2.26 still renders #870's space with either Vue, so it's the
vue-jsx-vaporversion that decides it. Upstream agrees.v3.2.25...v3.2.26adds d9d16108b "fix(runtime): prevent HMR registration outside Vue", for #186.v3.2.26...v3.2.27adds 471390951 "fix(runtime): drop the template placeholder when setNodes inserts before the anchor", for #870. #186's "without TSRX" variant, aWorker.tsimportinggreet.tsxwith onlyvue-jsx-vapor/vite, fails on 3.2.25 and passes on 3.2.27.3.2.30 came out on 2026-11-09. npm picks it now. pnpm still picks 3.2.29 because of its one-day release-age default.
Peer ranges are raised
All five packages that declare these peers now say
vue >=3.6.0-0andvue-jsx-vapor >=3.2.27:@tsrx/vue,@tsrx/vue-runtime,@tsrx/rspack-plugin-vueand@tsrx/bun-plugin-vue, plus@tsrx/vite-plugin-vueforvue-jsx-vaporonly, since it declares novuepeer.Under
semver,>=3.6.0-0accepts 3.6.0-alpha.7, beta.12, rc.11 and rc.14, 3.6.0, 3.7.0 and 4.0.0, and rejects 3.5.0, 3.5.45 and later prereleases such as 3.6.1-alpha.1 and 3.7.0-beta.1.>=3.2.27accepts 3.2.27, 3.2.29 and 3.3.0, and rejects 3.2.14, 3.2.26 and 3.3.0-rc.5.The documented install, before and after. Each row is an empty project. "Before" uses the published packages. "After" installs tarballs packed from this branch in their place, which is the same command with file paths. Every row that installs then runs
vite buildand loads the page in Chromium:npm install @tsrx/vue @tsrx/vite-plugin-vue vue vue-jsx-vapor(old docs)vue3.5.45 againstvue-jsx-vapor3.2.30's^3.6.0-rc.14vue3.6.0-rc.14 and 3.2.30, with npm's "ERESOLVE overriding peer dependency" warnings, builds, renderspnpm install …with the same set (old docs)vue3.5.45, thenMISSING_EXPORTforcreateVaporApp,templateandvaporInteropPluginMISSING_EXPORT, now with an unmet-peer warning naming@tsrx/vue's>=3.6.0-0npm install @tsrx/vue @tsrx/vite-plugin-vue "vue@^3.6.0-0" vue-jsx-vapor(new docs)@tsrx/vue'svue >=3.5, which no prerelease satisfiespnpm install …with"vue@^3.6.0-0"(new docs)So the docs change is what fixes pnpm, and the peers are what fix npm. Bare
vuestill gets 3.5.45 under pnpm, because Vue'slatesttag is 3.5. That's why the website,llms.txtand the Rspack README now name"vue@^3.6.0-0". It picks the newest 3.6 prerelease today and stable 3.6 once that ships. The quotes are for zsh withEXTENDED_GLOB, where an unquotedvue@^3.6.0-0fails withno matches found. The installs above passed the same argument without the shell's quotes.Patch or minor: minor. The rule was: if no setup that works today stops working, it's a patch. I installed the two older pairs the new floor rejects, before and after, with each package manager:
--legacy-peer-deps--strict-peer-dependenciesvue-jsx-vapor3.2.26,vuerc.10, beforevue >=3.5)vue-jsx-vapor >=3.2.27)vue-jsx-vapor3.2.14,vuebeta.12, beforevue >=3.5)vuebeta.10vue ^3)Every setup that built still renders #870's space, as expected below 3.2.27. Vue 3.5 never built, so the
vuefloor costs nothing. One working setup does stop installing, though:vue-jsx-vapor3.2.26 under pnpm'sstrict-peer-dependencies. That's off by default, but it works today and fails after, so it isn't a patch.CONTRIBUTING.mdstill says the repository uses patch changesets only, whileAGENTS.mdandCLAUDE.mdallowminorfor removals.scripts/check-changesets.jsrejects onlymajor. I followedAGENTS.md, and didn't changeCONTRIBUTING.md.After this PR, CI no longer exercises anything below 3.2.29. The runtime project passed 141 of 141 on the real 3.2.14 runtime before the bump, but the floor is 3.2.27 now anyway.
This pins a Vue release candidate
Stable 3.6.0 isn't out, and
vue'slatesttag is still 3.5.45. The repository already pinned a beta, so this is no worse.vue-jsx-vapor3.2.29 depends on exactly@vue/shared3.6.0-rc.13, so the lockfile has rc.13 and rc.14 of that one package.The source change
@tsrx/vueputs Vue's_slot flag onSuspense. Fromvue-jsx-vapor3.2.20, that's a type error in the type-only output:I type-checked the real output for
@try/@pendingon every release from 3.2.14 to 3.2.30. Below the new floor, 3.2.14 to 3.2.19 accept_, and 3.2.20 and 3.2.21 reject the output with or without it. Every version the floor admits, 3.2.27 to 3.2.30, rejects_and accepts the output without it. Where I tried more than one Vue for avue-jsx-vaporversion, the Vue version didn't change the result.So this affects anyone on a supported
vue-jsx-vapor, with or without the bump. The fix leaves_out whenctx.typeOnlyis set, with a patch changeset, in its own commit that passes on the old pins too. Compiled output keeps_, unchanged frommain, and a new test pins that.I can't say what depends on
_in compiled output:_normalizeVaporSlots({ _: 1, … })on the client and_createBlock(Suspense, null, { _: 1, … })in SSR output. I read both intransformVueJsxVapor's output.initSlotsreads_on the VDOM path, and the Vapor interop treats it as an internal slot key. I read that code and didn't run it.Test changes
The Vue runtime project now runs the real
vue-jsx-vaporruntime.vitest.config.jsaliasedvue-jsx-vaporto a hand-written copy of the runtime, so this project never ran the real one. That copy had the #870 bug, and it lacksnormalizeVaporSlots, which the new compiler output imports. Keeping it would have meant patching a copy, and a regression test on that copy can't fail on the old pins. I deleted both shim files.vue-runtime-shim.jsstays, because it selects Vue's Vapor browser build.The shared whitespace suite takes an
anchorsoption, used only by Vue. See the first item below. Comment nodes hold no text, so the suite's subject isn't weakened, though an unexpected extra<!---->wouldn't show up there.packages/tsrx-vuegainsvue-jsx-vaporas a dev dependency. Without it, the peer stayed at 3.2.14 in the lockfile, andpnpm typecheckfailed inwebsite-tsrxon 3.2.14's types against rc.14.New tests:
worker-exports.test.jsfor [Bug]: Vue target: worker modules that export functions throw__VUE_HMR_RUNTIME__ is not definedin dev #186. It runs the served module in avmscope withselfand none of Vue's globals, then checks what it posted. The module's imports are stubbed, so this covers the module itself, not what it imports. The Chromium runs above load the real graph. It's a separate file because a secondserveWorkerFixturecall inworker.test.jsfailed withECONNRESET. Vite treatsport: 0as unset, so both calls get port 5173, and a stale keep-alive connection is the likely cause.@try/@pendingtype-only case, the shape with no@catch.suspense-slot-flag.test.js:_: 1is in compiled output, and the sameSuspenseboundary in type-only output doesn't have it, for@pendingwith and without@catch.packages/vite-plugin-vue/tests/tsconfig.jsonalso loses itspathsentry for Vue's Vapor build. Onlyvue-runtime-shim.jsimports that path, and that file isn't part of the TypeScript project.tsc -pon that config reports the same with and without the entry.What changes with the bump
Neither of these comes from TSRX, and this PR doesn't change them. A project on current
vue-jsx-vaporalready has both.1. A constant
@ifbefore a sibling leaves an empty comment. The compiler now emits a<!>placeholder for the insertion point. With a constant condition, nothing replaces it. This shows in dev and build, and there's no visible change:main@if (true) { <b>t</b> }, thentwo<b>t</b>two<b>t</b><!---->twoReactive
@ifoutput is unchanged.2. In dev, an exported capitalized plain function is wrapped in an arrow.
vue-jsx-vapornow does this for HMR. It breaks a function that isn't a component, and one case fails silently. I re-ran every row in a.tsrxmodule in Chromium, undervite devandvite build, on both pin sets.vite buildgives themaincolumn on both. A lowercase export isn't wrapped:lower.call({ v: 7 })returns7on both.main, devexport function Bound() { return this?.v; }, thenBound.call({ v: 7 })7undefined, with no errornew Base() instanceof BasetrueTypeError, not a constructorProto.prototype.getX = …after the declarationTypeError: Cannot set properties of undefined, as the module loadsAdd.nameAddcomponentAdd(1, 2),Add.labelset after the declaration3,addIt's an upstream report if anyone wants this changed. I haven't filed one.
Verification
Baseline on
mainat bdbf83f: 176 files, 10009 passed, 82 skipped, 0 failed.This branch: 178 files, 10028 passed, 82 skipped, 0 failed. No test was removed and 19 were added.
pnpm format:check,pnpm typecheckandpnpm changeset:checkpass, andwebsite-tsrxbuilds. No test pins the peer ranges: the evidence for them is the installs above.The first run after the bump had 5 failures, all in
tsrx-vue-runtime: four from the shim's missingnormalizeVaporSlots, and one from the empty comment above. The two type-only failures appeared once@tsrx/vuemoved off 3.2.14.Mutation evidence, in the three Vue projects (814 tests, 15 of them skipped):
main'stransform.js: 5 fail, three type-only cases and both slot flag tests._removed from compiled output: 2 fail, both slot flag tests. Before those tests, none failed.v-slotsremoved from type-only output: both slot flag tests fail.__VUE_HMR_RUNTIME__.createRecord(...)added after the real guarded output: the worker test fails withReferenceError: __VUE_HMR_RUNTIME__ is not defined.Checked with no difference between old and new pins: 13 elements in four reactive states, under dev and build, apart from the rows above. HMR in Chromium: edits to
@{ }, plain function and arrow components update in place and keep state in another component.Not verified:
vite ssrLoadModulesmoke test failed the same way on both versions (createFor is not a function), so it says nothing either way.transformVueJsxVapor.playground/vue, which fails to build on both versions:src/main.tsximports./App.tsrx, which is git-ignored.Codex ran three times. The first pass covered the bump through 1ca975c, and raised the worker test and
anchors. The second covered 1ca975c..964bb1a, and raised a slot flag assertion that could pass on missing output (fixed) and two wrong lines in this body (corrected). The third covered the peer, docs and changeset commits before I pushed them (d4c135c..1929d7a8a). It found every peer moved and no barevueinstall left. It raised three things:>=3.6.0-0admits every 3.6.0 prerelease. Reworded.EXTENDED_GLOB. Now quoted.CONTRIBUTING.mdconflict above. Left as is.The fourth covered the pushed commits, d4c135c..a81c39a. It found one overbroad word:
>=3.6.0-0admits 3.6.0's prereleases, not later ones like 3.6.1-alpha. 6321399 fixes the changeset. An independent review found the wrong claims an earlier revision corrected, the weak worker test and the unpinned_.Open PRs
I merged d4c135c with all 45 open fork PRs that touch Vue packages, shared runtime fixtures or
vitest.config.js, then ran the Vue test projects on each. All 45 pass on the real runtime and the new pins. The three commits since then change only peer ranges, docs and changesets. I didn't rerun those 45 on them.For the PRs that name 3.2.14 or touch Vue behavior:
ref.__VaporForcompiles the same asVaporForapart from the name, and a renameddefineVaporComponentloses HMR and SSR registration.test:nativepasses 3 of 3. Its limit still holds: Vue rc.14's Node entry has no Vapor exports, like beta.12's.Their bodies mention the older versions. Nothing in them needs changing for this PR, except that the version numbers are now historical.
Merge notes
#1082 has a real conflict in
pnpm-lock.yaml. It also pinsvue3.6.0-beta.12 andvue-jsx-vapor3.2.14 exactly inpackages/storybook-examples/package.json, beside@tsrx/vue: workspace:*. With the new floor, 3.2.14 is an unmet peer of@tsrx/vue. Whichever PR lands second should take the other's lockfile, move those two pins to3.6.0-rc.14and^3.2.29, and runpnpm install. If #1082 lands second without that, 3.2.14 comes back into the lockfile, and the Storybook example runs with both bugs and a peer warning.No other conflict.
git merge-treeis clean against all 142 other open fork PRs at this head. 18 of them touch the same files, and none of them adds a barevueinstall, an old peer range or an old pin. The lockfile is unchanged since the bump.pnpm install --frozen-lockfilepassed on the bump merged with #1093 and #1085 together, the two lockfile changes the other fork PRs carry.If a later lockfile conflict does appear, keep either side and run
pnpm install. Don't resolve it by hand.🤖 Generated with Claude Code