Releases: vuejs/language-tools
v3.0.1
Bug Fixes
- fix(language-core): remove calculation logic of element inner loc (#5460) - Thanks to @KazariEX!
- fix(vscode): correct syntax highlight of
v-else
(#5470) - Thanks to @KazariEX!
Other Changes
- docs(vscode): update Russian translation for VS Code extension (#5461) - Thanks to @AndreyYolkin!
- chore(vscode): add error message for incompatible extensions
- chore: update volar to 2.4.17
- typescript: correctly use
getModeForUsageLocation
to calculate the resolution mode
- typescript: correctly use
Please refer to CHANGELOG.md for details.
❤️ Thanks to Our Sponsors
This project is made possible thanks to our generous sponsors:
Become a sponsor to support Vue tooling development
v3.0.0
Important
Deprecation Notice: Dropping Vue 2 and vue-class-component Support in v3.1: #5455
Tip
Language Server Upgrade guide for non-vscode editors: #5456
Stability Improvements
- Hybrid Mode Always On: Now always enabled to make the system simpler and more reliable. (PR: #5248)
- Better Connection: Improved how Vue talks to TypeScript server, making it more stable. (PR: #5252, #5395, #5443)
- Version Matching: Vue language server now requires specific Volar versions to work the same in all editors. (PR: #5345)
- Fixed Startup Issue: Solved problems when both TypeScript and Vue extensions start together. (PR: #5260)
UX & DX Improvements
Navigation & Tooling
- Global components now jump to their source files rather than type definitions. (PR: #5221)
- Added support for TypeScript's
sortImports
andremoveUnusedImports
commands. (PR: #5444) - Implemented template refs document linking. (PR: #5385)
Localization Support
- VSCode extension added multilingual support for:
- Chinese (Simplified/Traditional)
- Russian
- Japanese
Streamlined UI
Compiler Options Updates
New TSConfig options:
strictSlotChildren
: Strict type constraints of slot children. (PR: #5137)strictVModel
: Strict type constraints ofv-model
. (PR: #5229)strictCssModules
: Strict type checking of CSS modules. (PR: #5164)resolveStyleImports
: Specifies whether to generate type imports for external CSS files by<style src=\"...\">
or@import \"...\"
. (PR: #5136)
Renamed Settings
Some settings have new names:
vue.complete.casing.props
→vue.suggest.propNameCasing
vue.complete.casing.tags
→vue.suggest.componentNameCasing
vue.complete.defineAssignment
→vue.suggest.defineAssignment
Details
Please refer to CHANGELOG.md for details.
Thanks to @johnsoncodehk, @KazariEX, @alex-snezhko, @PurplePlanen, @zyoshoka, @Dylancyclone, @tomblachut, @brc-dd, @zhiyuanzmj, @Akryum, @so1ve, @kshksdrt, @marktlinn, @lukashass, @menuRivera, @RayGuo-ergou!
❤️ Thanks to Our Sponsors
This project is made possible thanks to our generous sponsors:
Become a sponsor to support Vue tooling development
v2.2.8
Bug Fixes
- revert "fix(language-core): validate
v-model
variable against model type"
Please refer to CHANGELOG.md for details.
Sponsors
v2.2.6
Features
- feat(language-core): infer prop JSDoc from
defineModel
's leading comments (#5211) - Thanks to @KazariEX!
Bug Fixes
- fix(language-core): map camelized prop name correctly (#5207) - Thanks to @KazariEX!
- fix(component-meta): resolve
defineModel
options to collectdefault
value (#5209) - Thanks to @KazariEX! - fix(language-core): avoid duplicate generation of
defineExpose
's codes - Thanks to @KazariEX! - fix(language-core): generate camelized prop name for
defineModel
(#5213) - Thanks to @KazariEX! - fix(language-core): validate
v-model
variable against model type (#5214) - Thanks to @KazariEX! - fix(language-core): use keywords instead of semicolons to separate script sections (#5217) - Thanks to @KazariEX!
Other Changes
- ci: auto close issues with
can't reproduce
label - Thanks to @KazariEX! - refactor(language-core): defer the calculation of
linkedCodeMappings
offsets (#5220) - Thanks to @KazariEX!
Please refer to CHANGELOG.md for details.
Sponsors
v2.2.4
Features
- feat(language-service): map sfc compiler errors outside the template inner content (#5045) - Thanks to @KazariEX!
- feat(language-core): introduce options to control type inference of
$attrs
,$el
,$refs
and$slots
(#5135) - Thanks to @KazariEX! - feat(language-core): enhance single root nodes collection (#4819) - Thanks to @KazariEX!
Bug Fixes
- fix(language-core): move
generateSfcBlockSection
to the end to fix missing comma errors (#5184) - Thanks to @zhiyuanzmj! - fix(language-core): handle edge case of default slot name mismatch - Thanks to @KazariEX!
- fix(language-core): combine dollar variable keys from the upper level interface - Thanks to @KazariEX!
- fix(language-core): hoist the variables that may cause
TS4081
(#5192) - Thanks to @KazariEX! - fix(language-core): adjust regex match for
@vue-generic
to improve offset calculation (#5193) - Thanks to @Gehbt! - fix(language-core): correct codegen of native element refs - Thanks to @KazariEX!
- fix(language-core): ignore latex block content (#5151) - Thanks to @KazariEX!
- fix(language-core): do not emit
undefined
for model with default value (#5198) - Thanks to @RylanBueckert-Broadsign! - fix(language-service): typescript-semantic renaming first in style blocks (#4685) - Thanks to @KazariEX!
- fix(typescript-plugin): prevent removed components from appearing in the completion list - Thanks to @KazariEX!
Other Changes
- refactor(language-core): drop invalid
v-scope
implemention - Thanks to @KazariEX! - refactor(language-core): improve type declaration of
v-for
- Thanks to @KazariEX! - test: enable
declaration
to track more errors - Thanks to @KazariEX! - refactor(language-core): remove semantic highlight of style module names - Thanks to @KazariEX!
- chore(language-core): add docs for
@vue-expect-error
support (#5176) - Thanks to @machty! - ci: upload extension as artifact for each commit - Thanks to @KazariEX!
Please refer to CHANGELOG.md for details.
Sponsors
v2.2.2
Features
- feat(language-core): navigation support for
$attrs
,$slots
,$refs
and$el
in the template (#5056) - Thanks to @KazariEX! - feat(language-service): support global directives completion (#4989) - Thanks to @KazariEX!
- feat(language-core): type support of
useAttrs
(#5106) - Thanks to @KazariEX! - feat(language-core): add options for fine-grained configuration of
strictTemplates
(#5138) - feat(language-service): display deprecated info of props in completion (#5134) - Thanks to @KazariEX!
- feat(component-meta): collect destructured props defaults (#5101) - Thanks to @Akryum!
- feat(language-core): add
checkUnknownDirectives
option (#5141) - Thanks to @KazariEX! - feat(language-core): support
<script vapor>
- Thanks to @KazariEX!
Bug Fixes
- fix(language-core): ignore ts errors in function-scoped declare expressions (#5090) - Thanks to @zhiyuanzmj!
- fix(language-core, typescript-plugin): handle self-reference component correctly (#5102) - Thanks to @KazariEX!
- fix(language-core): do not generate element for
<template>
withv-slot
(#5077) - Thanks to @KazariEX! - fix(language-service): set code action kinds to avoid warning (#5096) - Thanks to @KazariEX!
- fix(language-core): handle parentheses in v-for exp
- fix(language-core): slot exp formatting virtual code syntax incorrect
- fix(language-core): arrow function formatting virtual code syntax incorrect in interpolation
- fix(language-core): improve multiple lines event formatting result
- fix(language-core): prefer
loc.source
instead of node content - fix(language-core): intersect local
$attrs
with__VLS_ctx.$attrs
(#5113) - Thanks to @KazariEX! - fix(language-core): only generate model modifiers for components - Thanks to @KazariEX!
- fix(language-plugin-pug): ignore duplicate attribute error of
class
(#5100) - Thanks to @KazariEX! - fix(language-core): align types of
v-for
with core (#5084) - Thanks to @KazariEX! - fix(language-core): map interpolation error with multiple variables correctly (#5158) - Thanks to @KazariEX!
- fix(vscode): ask user to reload extension host when configuration changes (#5160) - Thanks to @typed-sigterm!
- fix(typescript-plugin): update component names correctly for the first time - Thanks to @KazariEX!
- fix(language-core): add
undefined
to first param type of optional model emits (#5171) - Thanks to @KazariEX! - fix(language-core): intersect
__VLS_slots
with__VLS_ctx.$slots
(#5083) - Thanks to @KazariEX! - fix(language-core): complete codegen of slot name prop (#5139) - Thanks to @KazariEX!
Other Changes
- refactor(language-service): read ast from codegen instead of parsing it repeatedly (#5086) - Thanks to @KazariEX!
- refactor(language-core): rewrite
vueCompilerOptions
resolution logic - refactor(component-meta): read
scriptSetupRanges
from codegen - Thanks to @KazariEX! - refactor(component-meta): read node directly instead of creating sub ast - Thanks to @KazariEX!
- refactor(component-meta): read ast from
sfc.script
- Thanks to @KazariEX! - refactor(language-core): generate the type of slots with function property (#5173) - Thanks to @KazariEX!
- refactor(language-core): reduce codegen size of template returns - Thanks to @KazariEX!
- refactor(language-core): remove semantic highlight of directives - Thanks to @KazariEX!
- refactor: update alien-signals to 1.0.3 (#5181) - Thanks to @KazariEX!
Please refer to CHANGELOG.md for details.
Sponsors
v2.2.0
Features
- feat(language-core): support
@vue-generic
(#4971) - Thanks to @KazariEX! - feat(vscode): add configuration for skipping automatic detection of Hybrid Mode (#5046) - Thanks to @KazariEX!
- feat(language-service): crawl html data of
data-allow-mismatch
- Thanks to @KazariEX! - feat(language-core): type support of
$attrs
(#5076) - Thanks to @KazariEX! - feat(language-core): type support of
useSlots
and$slots
(#5055) - Thanks to @KazariEX! - feat(language-core): type support of
v-model
modifiers (#5061) - Thanks to @KazariEX! - feat(language-service): process references data at runtime to reduce bundle size (#5054) - Thanks to @KazariEX!
- feat(language-core): support the use of sfc root comment to configure
vueCompilerOptions
(#4987) - Thanks to @KazariEX! - feat(vscode): add timeout logic for insiders fetching (#5048) - Thanks to @KazariEX!
- feat(vscode): add examples to inlay hints configuration (#5068) - Thanks to @KazariEX!
Performance
- perf(typescript-plugin): use named pipe servers more efficiently (#5070)
Bug Fixes
- fix(language-core): generate script setup starting from last leading comment without
@ts-check
- Thanks to @KazariEX! - fix(language-core): make model modifiers optional (#4978) - Thanks to @stafyniaksacha!
- fix(language-core): always report missing props on
<slot>
(#4982) - Thanks to @KazariEX! - fix(language-core): avoid unchecked index access when parsing
defineEmits
(#5028) - Thanks to @KazariEX! - fix(language-service): handle text edit of special closing tags completion correctly (#5016) - Thanks to @KazariEX!
- fix(language-core): don't generate variable access of template refs using
useTemplateRef
(#5032) - Thanks to @KazariEX! - fix(vscode): update
enabledHybridMode
before activate extension (#5019) - Thanks to @nieyuyao! - fix(tsc): point to shimmed tsc entry point to support ts 5.7 (#5020) - Thanks to @davidmatter!
- fix(vscode): add
GitHub.copilot-chat
to hybrid mode compatible list (#5047) - Thanks to @KazariEX! - fix(language-core): generate generics normally when
useTemplateRef
has no parameters (#5051) - Thanks to @KazariEX! - fix(language-core): avoid clipping prop name using
.prop
or.attr
onv-model
- Thanks to @KazariEX! - fix(language-core): handle named default import of components correctly (#5066) - Thanks to @KazariEX!
- fix(language-core): disable navigation feature on non-binding prop values (#5040) - Thanks to @KazariEX!
- fix(language-core): do not generate
useTemplateRef
parameter repeatedly (#5009) - fix(language-core): generate macros after script setup content (#5071) - Thanks to @KazariEX!
- fix(language-core): correct type and completion support of
vue:
event (#4969) - Thanks to @KazariEX! - fix(language-core): prevent visiting functional components for
parseScriptSetupRanges
(#5049) - Thanks to @zhiyuanzmj! - fix(language-service): don't provide modifier completion for
@
and:
(#5052) - Thanks to @KazariEX! - fix(language-core): consistent interpolation behavior of shorthand binding (#4975) - Thanks to @KazariEX!
- fix(language-core): resolve components with various name cases correctly (#5067) - Thanks to @KazariEX!
- fix(language-core): map
v-slot
correctly to report error when missing default slot - Thanks to @KazariEX! - fix(language-core): map component loc to instance variable for verification - Thanks to @KazariEX!
Other Changes
- refactor: improve code consistency (#4976) - Thanks to @KazariEX!
- docs: update nvim guide (#4984) - Thanks to @zeromask1337!
- docs: fix broken marketplace page (#5004) - Thanks to @rioj7!
- chore: upgrade
reactive-vscode
to v0.2.7 (#4997) - Thanks to @kermanx! - refactor(language-service): consistent style of source and virtual code operation (#5053) - Thanks to @KazariEX!
- refactor(language-core): remove unnecessary linked code mappings of
defineProp
(#5058) - Thanks to @KazariEX! - refactor(language-core): simplify current component info passing (#5078) - Thanks to @KazariEX!
- Upgraded Volar from
v2.4.8
tov2.4.11
:- fix(typescript): avoid crash when converting relatedInformation from overly large files
- fix(typescript): fix interactive refactors (volarjs/volar.js#244) - Thanks to @andrewbranch!
- fix(typescript): should not suppressing getLanguageId crashes (volarjs/volar.js#253)
- fix(typescript): force update the opened script snapshot after the language plugin is ready (volarjs/volar.js#254)
- feat(typescript): add typescriptObject option to runTsc (volarjs/volar.js#245) - Thanks to @zhiyuanzmj!
- fix(typescript): fix issue with transpiled TypeScript files not being registered with a project at all (volarjs/volar.js#250) - Thanks to @piotrtomiak!
- docs(source-map): updated API section based on #207 (volarjs/volar.js#248) - Thanks to @alamhubb!
- fix(typescript): resolve the shim used for tsc in Typescript v5.7 and up (#252) - Thanks to @kitsune7!
Please refer to CHANGELOG.md for details.
Sponsors
🥚
v2.1.10
Features
Bug Fixes
- language-core: revert #4902
- language-core: inject
as
assertion ofuseCssModule
into correct location (#4952) - Thanks to @KazariEX! - language-core: hold prev track id correctly (#4961) - Thanks to @KazariEX!
- language-core: generate style modules type as needed (#4953) - Thanks to @KazariEX!
- language-core: reference global types file with relative path (#4966)
Refactors
- vscode: rewrite with Reactive VSCode (#4945) - Thanks to @KazariEX, @kermanx!
Please refer to CHANGELOG.md for details.
Sponsors
v2.1.8
Features
- vscode: reactions visualization now identifies more use cases Insiders
- language-core: auto infer
$el
type (#4805) - Thanks to @KazariEX! - language-core: typed directive arg and modifiers (#4813) - Thanks to @KazariEX!
Bug Fixes
- language-core: avoid generic type loss due to destructured props (#4821) - Thanks to @KazariEX!
- language-core: handle
v-for
withv-once
correctly (#4830) - Thanks to @KazariEX! - language-core: avoid generating zero-length mappings for interpolation edges
- language-core: don't assign
this
to__VLS_ctx
(#4845) - Thanks to @KazariEX! - language-service: initialize scope with null prototype object (#4855) - Thanks to @KazariEX!
- language-core: inlay hints for
<component :is>
and<slot :name>
(#4661) - Thanks to @KazariEX, @so1ve! - language-core: should error when invalid syntax at script end (#4692) - Thanks to @KazariEX!
- language-core: correct type inference of
defineModel
&defineEmits
in generic (#4823) - Thanks to @KazariEX! - language-core: inject generics of
useTemplateRef
into correct location (#4829) - Thanks to @KazariEX! - language-core: prevent the generation of generics in JS (#4836) - Thanks to @KazariEX, @zhiyuanzmj!
- language-core: generate correct reference for
v-on
on<slot>
(#4864) - Thanks to @KazariEX! - language-core: match classname before
)
(#4887) - Thanks to @KazariEX! - language-service: handle internal item key with leading slash correctly (#4894) - Thanks to @KazariEX!
- language-core: correctly obtain the index of style modules (#4907) - Thanks to @KazariEX!
- language-core: refer absolute path of global types file (#4924) - Thanks to @depressedX!
- component-meta: error when signatures is undefined (#4930) - Thanks to @Hannesrasmussen!
- language-core: intersect props of generic component with attrs (#4886) - Thanks to @KazariEX!
- language-core: fix incorrect syntax for class component virtual code
- language-core: generate
value
instead of model name into tuple (#4892) - Thanks to @KazariEX! - language-core: infer template ref's type of native elements with
v-for
correctly (#4933) - Thanks to @KazariEX! - language-core: should wrap item with
Reactive
onv-for
(#4902) - Thanks to @KazariEX!
Performance
Other Changes
- Upgraded Volar from
v2.4.1
tov2.4.8
: - chore: fix nvim config snippet in README (#4881) - Thanks to @LiamEderzeel!
- chore: remove side effects (#4871) - Thanks to @vikingair!
- chore: remove
importsNotUsedAsValues
(#4897) - Thanks to @KazariEX! - chore(vscode): switch to
"module": "CommonJS"
(#4944) - Thanks to @KazariEX! - test: fix incorrect default value (#4934) - Thanks to @jh-leong!
- test(tsc): add a test case for class component
Please refer to CHANGELOG.md for details.
Sponsors
v2.1.6
Features
- language-plugin-pug: support initial indentation (#4774)
- language-service: JSDoc display support when typing props on component template (#4796) - Thanks to @joy-yu!
- language-core: typed directives in template (#4807) - Thanks to @KazariEX!
Bug Fixes
- language-core: wrap template refs with
unref
in interpolation (#4777) - Thanks to @KazariEX! - language-core: ensure to pass tsc on inline global types (#4782) - Thanks to @KazariEX!
- language-core: infer native template ref as build-in element interface (#4786) - Thanks to @KazariEX!
- language-core: generate
__VLS_StyleModules
after template (#4790) - Thanks to @KazariEX! - language-core: make
expose
of non-generic template ref required (#4795) - Thanks to @zhiyuanzmj! - language-core: avoid using
__typeProps
with runtime props (#4800) - Thanks to @KazariEX! - language-core: ignore unknown attrs error when strictTemplates is not enabled (#4785)
- language-core: prevent append globalTypes to virtual file (#4806) - Thanks to @zhiyuanzmj!
- language-core: prevent type error when use defineSlots and non-template (#4809) - Thanks to @zhiyuanzmj!
- typescript-plugin: disconnect socket on error (#4672)
Performance
Other Changes
- language-core: split
__VLS_templateResult
(#4781) - Thanks to @KazariEX! - language-core: wrap template virtual code into a function (#4784)
- language-core: move
templateRef
intocomposibles
(#4791) - Thanks to @KazariEX! - language-core: generate global types for the first parsed Vue component if cannot write global types file
Tests
- language-server: add renaming case for template
ref()
(#4794) - Thanks to @KazariEX! - tsc: update to Vue 3.5 (#4725)
- tsc: unknown props on non-strict generic component (#4792)
Please refer to CHANGELOG.md for details.