Skip to content

Commit 76db8c1

Browse files
committed
chore: bump volar version
1 parent 84c23c5 commit 76db8c1

File tree

3 files changed

+71
-14
lines changed

3 files changed

+71
-14
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"devDependencies": {
3737
"@vitejs/plugin-vue": "^4.1.0",
3838
"@vitest/coverage-c8": "^0.29.7",
39-
"@volar/vue-language-core": "^1.6.1",
39+
"@volar/vue-language-core": "^1.6.3",
4040
"changelogen": "^0.5.1",
4141
"eslint": "^8.36.0",
4242
"eslint-config-unjs": "^0.1.0",

pnpm-lock.yaml

+66-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tooling/index.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
111111
/^\.(js|ts|jsx|tsx)$/.test(embeddedFile.fileName.replace(fileName, ""))
112112
) {
113113
const componentBlocks = sfc.customBlocks.filter(
114-
(b) =>
115-
b.type === "component" && typeof (b as any).attrs.name === "string"
114+
(b) => b.type === "component" && typeof b.attrs.name === "string"
116115
);
117116
if (componentBlocks.length === 0) {
118117
return;
@@ -123,7 +122,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
123122
...componentBlocks.map(
124123
(b) =>
125124
`\nimport ${pascalCase(
126-
(b as any).attrs.name
125+
b.attrs.name as string
127126
)} from ${JSON.stringify(
128127
`${fileName}__VLS_NSFC_${b.name.slice(
129128
"customBlock_".length
@@ -140,7 +139,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
140139
"setup() {",
141140
"return {",
142141
...componentBlocks.map(
143-
(b) => `${pascalCase((b as any).attrs.name)},\n`
142+
(b) => `${pascalCase(b.attrs.name as string)},\n`
144143
)
145144
);
146145
} else {
@@ -149,7 +148,7 @@ const plugin: VueLanguagePlugin = (ctx) => {
149148
/const __VLS_componentsOption = {/,
150149
"const __VLS_componentsOption = {\n",
151150
...componentBlocks.map(
152-
(b) => `${pascalCase((b as any).attrs.name)},\n`
151+
(b) => `${pascalCase(b.attrs.name as string)},\n`
153152
)
154153
);
155154
}

0 commit comments

Comments
 (0)