Skip to content

Commit 3ccf60d

Browse files
committed
Merge master and resolve conflicts in vue-global-types-error.ts
2 parents 84380bb + bfdbaf0 commit 3ccf60d

Some content is hidden

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

45 files changed

+207
-157
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## 3.0.5 (2025-08-01)
4+
5+
### Features
6+
7+
- feat(language-core): introduce `compileSFCStyle` to provide style related infomation (#5548) - Thanks to @KazariEX!
8+
- feat(language-service): completion snippet for `v-for` (#5553) - Thanks to @KazariEX!
9+
10+
### Bug Fixes
11+
12+
- fix(language-core): generate `modelModifiers` for explicitly declared default model name (#5558) - Thanks to @KazariEX!
13+
- fix(language-service): more responsive `.value` insertion
14+
- fix(vscode): add `class` scope fallback for `component` semantic tokens (#5559) - Thanks to @KazariEX!
15+
- fix(vscode): make sure extension is loaded immediately
16+
- fix(language-service): only check `globalTypesPath` for FS files
17+
- fix(vscode): handle fail tsserver requests to avoid memory leak
18+
- fix(vscode): do not delay the execution of `restartExtensionHost`
19+
- fix(language-core): avoid references highlight of unrelated native element tags (#5563) - Thanks to @KazariEX!
20+
- fix(language-core): tolerance for incomplete root template tag
21+
- fix(language-core): enable navigation code feature on directive modifiers - Thanks to @KazariEX!
22+
23+
### Other Changes
24+
25+
- chore(language-service): improve global types error message for JS projects (#5574) - Thanks to @Ciallo-Chiaki!
26+
327
## 3.0.4 (2025-07-25)
428

529
### Features

extensions/vscode/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "volar",
4-
"version": "3.0.4",
4+
"version": "3.0.5",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/vuejs/language-tools.git",
@@ -474,8 +474,8 @@
474474
"@volar/vscode": "2.4.22",
475475
"@vscode/vsce": "^3.2.1",
476476
"@vue/compiler-sfc": "^3.5.0",
477-
"@vue/language-server": "3.0.4",
478-
"@vue/typescript-plugin": "3.0.4",
477+
"@vue/language-server": "3.0.5",
478+
"@vue/typescript-plugin": "3.0.5",
479479
"reactive-vscode": "^0.2.9",
480480
"rolldown": "1.0.0-beta.8",
481481
"semver": "^7.5.4",

lerna.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/lerna-lite/lerna-lite/main/packages/cli/schemas/lerna-schema.json",
3+
"command": {
4+
"version": {
5+
"syncWorkspaceLock": true
6+
}
7+
},
8+
"exact": true,
9+
"forcePublish": true,
310
"npmClient": "pnpm",
411
"packages": [
512
"extensions/**",
613
"packages/**",
714
"test-workspace"
815
],
9-
"version": "3.0.4"
16+
"version": "3.0.5",
17+
"yes": true
1018
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"watch:base": "tsc -b -w",
88
"watch:vue": "cd ./extensions/vscode && pnpm run watch",
99
"prerelease": "pnpm run build && pnpm run test",
10-
"release": "lerna publish --exact --force-publish --yes --sync-workspace-lock",
10+
"release": "lerna publish --no-push --no-git-tag-version",
1111
"release:next": "pnpm run release --dist-tag next",
1212
"test": "vitest run",
1313
"test:update": "vitest run --update",

packages/component-meta/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-component-meta",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"license": "MIT",
55
"files": [
66
"**/*.js",
@@ -14,7 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@volar/typescript": "2.4.22",
17-
"@vue/language-core": "3.0.4",
17+
"@vue/language-core": "3.0.5",
1818
"path-browserify": "^1.0.1"
1919
},
2020
"peerDependencies": {

packages/component-type-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-component-type-helpers",
3-
"version": "3.0.4",
3+
"version": "3.0.5",
44
"license": "MIT",
55
"files": [
66
"**/*.js",

packages/language-core/lib/codegen/script/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export function* generatePropsOption(
132132
const typeOptionCodes: Code[] = [];
133133

134134
if (inheritAttrs && options.templateCodegen?.inheritedAttrVars.size) {
135-
let attrsType = `Partial<__VLS_InheritedAttrs>`;
135+
let attrsType = `__VLS_InheritedAttrs`;
136136
if (hasEmitsOption) {
137137
attrsType = `Omit<${attrsType}, \`on\${string}\`>`;
138138
}

packages/language-core/lib/codegen/script/scriptSetup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export function* generateScriptSetup(
6969
}
7070

7171
yield `return {} as {${newLine}`
72-
+ ` props: ${ctx.localTypes.PrettifyLocal}<__VLS_OwnProps & __VLS_PublicProps & Partial<__VLS_InheritedAttrs>> & __VLS_BuiltInPublicProps,${newLine}`
72+
+ ` props: ${ctx.localTypes.PrettifyLocal}<__VLS_OwnProps & __VLS_PublicProps & __VLS_InheritedAttrs> & __VLS_BuiltInPublicProps,${newLine}`
7373
+ ` expose(exposed: import('${options.vueCompilerOptions.lib}').ShallowUnwrapRef<${
7474
scriptSetupRanges.defineExpose ? 'typeof __VLS_exposed' : '{}'
7575
}>): void,${newLine}`

packages/language-core/lib/codegen/script/template.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,14 @@ function* generateCssVars(options: ScriptCodegenOptions, ctx: TemplateCodegenCon
123123
}
124124
yield `// CSS variable injection ${newLine}`;
125125
for (const style of options.sfc.styles) {
126-
for (const cssBind of style.cssVars) {
126+
for (const binding of style.bindings) {
127127
yield* generateInterpolation(
128128
options,
129129
ctx,
130130
style.name,
131131
codeFeatures.all,
132-
cssBind.text,
133-
cssBind.offset,
132+
binding.text,
133+
binding.offset,
134134
);
135135
yield endOfLine;
136136
}

packages/language-core/lib/codegen/template/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@ function* generateInheritedAttrs(
113113
options: TemplateCodegenOptions,
114114
ctx: TemplateCodegenContext,
115115
): Generator<Code> {
116-
yield `type __VLS_InheritedAttrs = {}`;
117-
for (const varName of ctx.inheritedAttrVars) {
118-
yield ` & typeof ${varName}`;
119-
}
116+
yield `type __VLS_InheritedAttrs = ${
117+
ctx.inheritedAttrVars.size
118+
? `Partial<${[...ctx.inheritedAttrVars].map(name => `typeof ${name}`).join(` & `)}>`
119+
: `{}`
120+
}`;
120121
yield endOfLine;
121122

122123
if (ctx.bindingAttrLocs.length) {
@@ -133,7 +134,7 @@ function* generateInheritedAttrs(
133134
}
134135
yield `]${endOfLine}`;
135136
}
136-
return `import('${options.vueCompilerOptions.lib}').ComponentPublicInstance['$attrs'] & Partial<__VLS_InheritedAttrs>`;
137+
return `import('${options.vueCompilerOptions.lib}').ComponentPublicInstance['$attrs'] & __VLS_InheritedAttrs`;
137138
}
138139

139140
function* generateTemplateRefs(

0 commit comments

Comments
 (0)