$ the-wire · showcase
Options API computed fixes in devtools, language-tools ports v4 repairs to v3
By RepoJournal · Filed · About Vue.js · Composed from the cited sources · methodology
Devtools now reads and recomputes Options API computed refs correctly on both Vue 3.5 and 3.6, while language-tools ports three v4 branch fixes that also break the v3 line.
fix(kit): read Options API computed values on Vue 3.6 vuejs/devtools
On Vue 3.6 the state inspector reported every Options API computed in a VDOM component as "not accessed", even when a template or watcher read it. The snapshot found its sample computed ref only through Vue 3.5 shapes (link.dep.computed, scope.effects), and now accepts both; Vue 3.5 was never affected.
fix(kit): recompute the exact Options API computed ref vuejs/devtools
Follow-up to the fix above: recomputing a computed from the state inspector could hit the wrong one, because the fallback indexed into a list of computed refs collected only from live effects, which skips any computed nothing reads. Declared getter names were matched against that shortened list, so the index could point elsewhere.
fix(typescript-plugin): do not insert `.value` after a ref that the template reads unwrapped vuejs/language-tools
Since 3.3.12 the TypeScript plugin auto-inserted .value into template reads of top-level refs, turning {{ userArr }} into {{ userArr.value }}. The check asked TypeScript for the identifier's own type, which after the __VLS_unwrap generation change is the Ref, not the unwrapped value. The plugin now checks a range that the template reads unwrapped instead.
fix(language-core): link template directives to their declarations vuejs/language-tools
Find references on a custom directive binding in <script setup>, or on a key of the Options API directives object, now includes the v-focus / v-my-dir uses in the template, and go to definition from those uses lands on the binding or option key. Previously both came up empty.
fix(language-core): type narrowed template bindings by declaration, not by assertion vuejs/language-tools
A narrowed <script setup> binding was read through .value with a type assertion at the top of the template function, so the type vanished wherever flow analysis does not carry it; a v-if="false" block can produce "Property 'value' does not exist". The type is now narrowed by declaration instead of assertion.
fix: port the fixes of the v4 branch that apply to v3 vuejs/language-tools
The long tail: the v3 line picks up v4 fixes for a JSDoc @import beside a <script> block and an import after a statement (both reported TS1473), defineModel defaults annotated through an alias, runtime defineProps models at target 3.6, and type aliases of JS components. Each was reproduced on master with a failing test before porting.
fix: record native events once per component vuejs/test-utils
test-utils now records native events once per component rather than duplicating the handler, tightening the emitted-event assertions that wrapper.emitted() returns.