Skip to content

Commit 4598fb8

Browse files
committed
Merge branch 'master' of https://github.com/vuejs/language-tools into fix/typescript-semantic-renaming-first
2 parents 111043c + 1e04fc9 commit 4598fb8

File tree

517 files changed

+8278
-4596
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

517 files changed

+8278
-4596
lines changed

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @johnsoncodehk @so1ve @KazariEX @zhiyuanzmj @KermanX @davidmatter

.github/ISSUE_TEMPLATE/bug_report.yml

+11
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ body:
4747
description: Output of `npx envinfo --system --binaries --browsers`
4848
render: shell
4949
placeholder: System, Binaries, Browsers
50+
- type: textarea
51+
id: dependencies
52+
attributes:
53+
label: package.json dependencies
54+
description: You may add your list of dependencies here as it helps us to investigate your report.
55+
render: json
56+
placeholder: |
57+
{
58+
"dependencies": {},
59+
"devDependencies": {},
60+
}
5061
- type: textarea
5162
id: steps-to-reproduce
5263
attributes:

.github/workflows/auto-fix.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
# lint
2424
- name: Auto-fix
25-
run: npm run lint:fix
25+
run: pnpm run lint:fix
2626

2727
# commit
2828
- name: Commit

.github/workflows/pkg.pr.new.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Any Commit
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v4
11+
12+
- run: corepack enable
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
cache: "pnpm"
17+
18+
- name: Install dependencies
19+
run: pnpm install
20+
21+
- name: Build
22+
run: pnpm build
23+
24+
- run: pnpx pkg-pr-new publish './packages/*'

.github/workflows/update-html-data.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
# update data
2424
- name: Update HTML Data
25-
run: cd packages/language-service && npm run update-html-data
25+
run: cd packages/language-service && pnpm run update-html-data
2626

2727
# commit
2828
- name: Commit

CHANGELOG.md

+132-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,137 @@
22

33
> [Join the Insiders Program](https://github.com/vuejs/language-tools/wiki/Get-Insiders-Edition) for more exclusive features and updates.
44
5+
## 2.1.6 <sup>official</sup>, 2.1.7 <sup>insiders</sup> (2024-09-05)
6+
7+
### Features
8+
9+
- **language-plugin-pug:** support initial indentation (#4774)
10+
- **language-service:** JSDoc display support when typing props on component template (#4796) - Thanks to @joy-yu!
11+
- **language-core:** typed directives in template (#4807) - Thanks to @KazariEX!
12+
13+
### Bug Fixes
14+
15+
- **language-core:** wrap template refs with `unref` in interpolation (#4777) - Thanks to @KazariEX!
16+
- **language-core:** ensure to pass tsc on inline global types (#4782) - Thanks to @KazariEX!
17+
- **language-core:** infer native template ref as build-in element interface (#4786) - Thanks to @KazariEX!
18+
- **language-core:** generate `__VLS_StyleModules` after template (#4790) - Thanks to @KazariEX!
19+
- **language-core:** make `expose` of non-generic template ref required (#4795) - Thanks to @zhiyuanzmj!
20+
- **language-core:** avoid using `__typeProps` with runtime props (#4800) - Thanks to @KazariEX!
21+
- **language-core:** ignore unknown attrs error when strictTemplates is not enabled (#4785)
22+
- **language-core:** prevent append globalTypes to virtual file (#4806) - Thanks to @zhiyuanzmj!
23+
- **language-core:** prevent type error when use defineSlots and non-template (#4809) - Thanks to @zhiyuanzmj!
24+
- **typescript-plugin:** disconnect socket on error (#4672)
25+
26+
### Performance
27+
28+
- **language-core:** don't emit event lnlayhint when content is none (#4776) - Thanks to @Gehbt!
29+
30+
### Other Changes
31+
32+
- **language-core:** split `__VLS_templateResult` (#4781) - Thanks to @KazariEX!
33+
- **language-core:** wrap template virtual code into a function (#4784)
34+
- **language-core:** move `templateRef` into `composibles` (#4791) - Thanks to @KazariEX!
35+
- **language-core:** generate global types for the first parsed Vue component if cannot write global types file
36+
37+
### Tests
38+
39+
- **language-server:** add renaming case for template `ref()` (#4794) - Thanks to @KazariEX!
40+
- **tsc:** update to Vue 3.5 (#4725)
41+
- **tsc:** unknown props on non-strict generic component (#4792)
42+
43+
## 2.1.4 <sup>official</sup>, 2.1.5 <sup>insiders</sup> (2024-09-01)
44+
45+
### Features
46+
47+
- **typescript-plugin, language-server:** generate global types file into `node_modules/.vue-global-types` (#4752) - Thanks to @KazariEX!
48+
- **language-core:** navigation support for template-ref (#4726) - Thanks to @KazariEX!
49+
50+
### Bug Fixes
51+
52+
- **language-core, typescript-plugin, language-server:** apply snake case on globalTypes filename (#4749) - Thanks to @KazariEX!
53+
- **language-core:** hoist `$refs` type (#4763)
54+
- **language-core:** disable lib check on global types file (#4767) - Thanks to @KazariEX!
55+
- **language-core:** prevent circular reference of templateRef (#4768) - Thanks to @zhiyuanzmj!
56+
- **language-core:** using interface merging for `GlobalComponents`
57+
- **language-core:** `fallthroughAttributes` causes global components to be self-referential (#4761)
58+
- **language-core:** auto-completion for the last line of template block (#4771) - Thanks to @zhiyuanzmj!
59+
- **language-core:** update ast correctly on repeated `v-for` modifications (#4772) - Thanks to @KazariEX!
60+
- **language-server:** leaking named pipes (#4672)
61+
- **typescript-plugin:** compatible with Yarn PnP (#4751)
62+
- **vscode:** whitelist `ms-dynamics-smb.al` extension for Vue Hybrid Mode. (#4765) - Thanks to @kyleweishaupt!
63+
64+
### Other Changes
65+
66+
- Add optional "dependencies" textarea to issue template (#4758) - Thanks to @davidmatter!
67+
68+
## 2.1.2 <sup>official</sup>, 2.1.3 <sup>insiders</sup> (2024-08-29)
69+
70+
### Bug Fixes
71+
72+
- **language-core, typescript-plugin, language-server:** write globalTypes into dist for correct export (#4740) (#4737) (#4738) (#4739) - Thanks to @KazariEX!
73+
- **language-core:** don't default `vueCompilerOptions.lib` to `@vue/runtime-dom` for Vue 2
74+
75+
## 2.1.0 <sup>official</sup>, 2.1.1 <sup>insiders</sup> (2024-08-29)
76+
77+
### Features
78+
79+
- **language-core:** inlay hints for destructured props (#4634) - Thanks to @KazariEX!
80+
- **language-core:** typed fallthrough attributes (#4103) - Thanks to @A5rocks, @so1ve!
81+
- **language-core:** document links for classname within `:class` (#4642) - Thanks to @KazariEX!
82+
- **language-core:** auto infer type for $refs & useTemplateRef (#4644) - Thanks to @zhiyuanzmj!
83+
- **language-core:** type support for CSS Modules API (#4674) - Thanks to @KazariEX!
84+
- **language-service:** better completion for directives (#4640) - Thanks to @KazariEX!
85+
- **language-service:** better sorting & filtering of completion (#4671) - Thanks to @KazariEX!
86+
- **language-service:** add style scoped and module completion (#4705) - Thanks to @runyasak!
87+
88+
### Bug Fixes
89+
90+
- **vscode:** type of `vue.server.hybridMode` config (#4703) - Thanks to @KermanX!
91+
- **language-core:** dependency on vulnerable version of `vue-template-compiler` (#4613) - Thanks to @yyx990803!
92+
- **language-core:** support parse method to access ctx var in object (#4609) - Thanks to @linghaoSu!
93+
- **language-core:** escape \ and ' in className avoid type error (#4619) - Thanks to @linghaoSu!
94+
- **language-core:** semantic highlight of the end tag of namespaced elements (#4623) - Thanks to @KermanX!
95+
- **language-core:** nullable modelvalues (#4648) - Thanks to @davidmatter!
96+
- **language-core:** should try casting dynamic slot name into constant (#4669) - Thanks to @KermanX!
97+
- **language-core:** local name support for prop using runtime api (#4650) - Thanks to @KazariEX!
98+
- **language-core:** optimize matching of scoped class and `v-bind()` (#4679) - Thanks to @KazariEX!
99+
- **language-core:** should preserve generic info in directive (#4686) - Thanks to @KermanX!
100+
- **language-core:** generate `ref` as identifier instead of interpolation (#4688) - Thanks to @KazariEX!
101+
- **language-core:** correct type narrowing from script to template (#4689) - Thanks to @KazariEX!
102+
- **language-core:** should camelize prop name in `experimentalModelPropName` (#4691) - Thanks to @KermanX!
103+
- **language-core:** drop duplicate hints on incomplete tag (#4696) - Thanks to @KazariEX!
104+
- **language-core:** correct inlay hints for v-bind with modifier (#4721) - Thanks to @KazariEX!
105+
- **language-core:** transform range of `file-md` correctly (#4735) - Thanks to @KazariEX!
106+
- **language-plugin-pug:** should cache proxyed object (#4626) - Thanks to @KermanX!
107+
- **language-plugin-pug:** compute offset correctly of pug class (#4652) - Thanks to @KazariEX!
108+
- **language-service:** completion documentations for binding attributes (#4667) - Thanks to @KazariEX!
109+
- **language-service:** avoid converting internal id of special tags (#4643) - Thanks to @KazariEX!
110+
- **language-service:** reinstate the completion for modifiers (#4639) - Thanks to @KazariEX!
111+
- **language-service:** consistent data from provider for sfc completion (#4645) - Thanks to @KazariEX!
112+
- **typescript-plugin:** unknown request type warning (#4715) - Thanks to @davidmatter!
113+
114+
### Refactors
115+
116+
- **language-core:** extract SFC root tags to separate virtual code
117+
- **language-core:** removed `__hint` trick from codegen
118+
- **language-core:** rewrite a part of confusing codegen code
119+
- **language-core:** reduce virtual code generated by component tags (#4714)
120+
- **language-core:** do not wrap template virtual code with function (#4731)
121+
- **language-core**: write real files to FS for shared global types (#4736)
122+
- **component-meta:** remove deprecated `createComponentMetaCheckerByJsonConfig`, `createComponentMetaChecker` api
123+
124+
### Other Changes
125+
126+
- Upgraded Volar from `v2.4.0-alpha.18` to `v2.4.1`:
127+
- Ensure unopened files are synced to project (#4711) (#4632) - Thanks to @davidmatter!
128+
- **ci:** integrated [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
129+
- **tsc:** test all typecheck cases in one tsconfig (#4723)
130+
- **tsc:** add test for TS-next (#4724)
131+
- **tsc:** add tests for for #3779, #3820 (#3838) - Thanks to @so1ve!
132+
- **vscode:** add grammar test (#3861) - Thanks to @so1ve!
133+
- **language-service:** migrate tests to `@volar/test-utils` (#4719)
134+
- **language-core:** add scoped classes renaming case (#4727) - Thanks to @KazariEX!
135+
5136
## 2.0.28 <sup>official</sup>, 2.0.29 <sup>insiders</sup> (2024-07-22)
6137

7138
### Features
@@ -15,7 +146,7 @@
15146
- **language-service:** remove `v-bind` code action (#4601)
16147
- **vscode:** add empty pattern to codeblock attributes scope (#4590) - Thanks @KermanX
17148

18-
### Fixes
149+
### Bug Fixes
19150

20151
- **tsc:** errors should be thrown instead of being console.log printed
21152
- **language-server:** observe named pipes changes when server startup (#4292)

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,14 +97,15 @@ lspconfig.tsserver.setup {
9797
},
9898
},
9999
},
100+
}
100101

101102
lspconfig.volar.setup {
102103
init_options = {
103104
vue = {
104105
hybridMode = false,
105106
},
106107
},
107-
},
108+
}
108109
```
109110

110111
### nvim-cmp integration

extensions/vscode/package.json

+20-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "volar",
4-
"version": "2.0.28",
4+
"version": "2.1.6",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/vuejs/language-tools.git",
@@ -255,7 +255,10 @@
255255
"description": "Traces the communication between VS Code and the language server."
256256
},
257257
"vue.server.hybridMode": {
258-
"type": "boolean",
258+
"type": [
259+
"boolean",
260+
"string"
261+
],
259262
"default": "auto",
260263
"enum": [
261264
"auto",
@@ -386,7 +389,7 @@
386389
"vue.inlayHints.destructuredProps": {
387390
"type": "boolean",
388391
"default": false,
389-
"description": "Show inlay hints for destructured prop."
392+
"description": "Show inlay hints for destructured props."
390393
},
391394
"vue.inlayHints.missingProps": {
392395
"type": "boolean",
@@ -535,27 +538,28 @@
535538
]
536539
},
537540
"scripts": {
538-
"prebuild": "cd ../.. && npm run build",
541+
"prebuild": "cd ../.. && pnpm run build",
539542
"build": "node scripts/build",
540-
"build:minify": "npm run build -- --minify",
541-
"watch": "npm run build -- --watch",
542-
"pack": "npm run build:minify && vsce package",
543-
"pack:next": "npm run build && vsce package",
544-
"release": "npm run build:minify && vsce publish",
545-
"release:next": "npm run build && vsce publish --pre-release",
546-
"size": "npm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
543+
"build:minify": "pnpm run build -- --minify",
544+
"watch": "pnpm run build -- --watch",
545+
"pack": "pnpm run build:minify && vsce package",
546+
"pack:next": "pnpm run build && vsce package",
547+
"release": "pnpm run build:minify && vsce publish",
548+
"release:next": "pnpm run build && vsce publish --pre-release",
549+
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
547550
},
548551
"devDependencies": {
549552
"@types/semver": "^7.5.3",
550553
"@types/vscode": "^1.82.0",
551-
"@volar/vscode": "~2.4.0-alpha.18",
552-
"@vue/language-core": "2.0.28",
553-
"@vue/language-server": "2.0.28",
554-
"@vue/typescript-plugin": "2.0.28",
554+
"@volar/vscode": "~2.4.1",
555+
"@vscode/vsce": "latest",
556+
"@vue/language-core": "2.1.6",
557+
"@vue/language-server": "2.1.6",
558+
"@vue/typescript-plugin": "2.1.6",
555559
"esbuild": "~0.21.0",
556560
"esbuild-plugin-copy": "latest",
557561
"esbuild-visualizer": "latest",
558562
"semver": "^7.5.4",
559-
"vsce": "latest"
563+
"vscode-tmlanguage-snapshot": "latest"
560564
}
561565
}

extensions/vscode/src/common.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function isExtensionCompatibleWithHybridMode(extension: vscode.Extension<any>) {
6363
|| extension.id === 'Divlo.vscode-styled-jsx-languageserver'
6464
|| extension.id === 'nrwl.angular-console'
6565
|| extension.id === 'ShenQingchuan.vue-vine-extension'
66+
|| extension.id === 'ms-dynamics-smb.al'
6667
) {
6768
return true;
6869
}
@@ -234,7 +235,6 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
234235
lsp.activateAutoInsertion(selectors, client);
235236
lsp.activateDocumentDropEdit(selectors, client);
236237
lsp.activateWriteVirtualFiles('vue.action.writeVirtualFiles', client);
237-
lsp.activateServerSys(client);
238238

239239
if (!enabledHybridMode) {
240240
lsp.activateTsConfigStatusItem(selectors, 'vue.tsconfig', client);
@@ -264,7 +264,7 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
264264
]) {
265265
try {
266266
const res = await fetch(url);
267-
onJson(await res.json());
267+
onJson(await res.json() as any);
268268
succeed = true;
269269
break;
270270
} catch { }

0 commit comments

Comments
 (0)