@vue/language-service
Advanced tools
Comparing version 2.0.26-alpha.2 to 2.0.26
@@ -162,7 +162,51 @@ "use strict"; | ||
} | ||
result.items = [ | ||
...result.items.filter(item => item.label !== '!DOCTYPE' && item.label !== 'Custom Blocks'), | ||
createCompletionItemWithTs(result.items.find(item => item.label === 'script')), | ||
createCompletionItemWithTs(result.items.find(item => item.label === 'script setup')), | ||
]; | ||
result.items = result.items.filter(item => item.label !== '!DOCTYPE' && item.label !== 'Custom Blocks'); | ||
for (const scriptItem of result.items.filter(item => item.label === 'script' || item.label === 'script setup')) { | ||
scriptItem.kind = 17; | ||
scriptItem.detail = '.js'; | ||
for (const lang of ['ts', 'tsx', 'jsx']) { | ||
result.items.push({ | ||
...scriptItem, | ||
detail: `.${lang}`, | ||
kind: 17, | ||
label: scriptItem.label + ' lang="' + lang + '"', | ||
textEdit: scriptItem.textEdit ? { | ||
...scriptItem.textEdit, | ||
newText: scriptItem.textEdit.newText + ' lang="' + lang + '"', | ||
} : undefined, | ||
}); | ||
} | ||
} | ||
const styleItem = result.items.find(item => item.label === 'style'); | ||
if (styleItem) { | ||
styleItem.kind = 17; | ||
styleItem.detail = '.css'; | ||
for (const lang of ['css', 'scss', 'less', 'postcss']) { | ||
result.items.push({ | ||
...styleItem, | ||
kind: 17, | ||
detail: lang === 'postcss' ? '.css' : `.${lang}`, | ||
label: styleItem.label + ' lang="' + lang + '"', | ||
textEdit: styleItem.textEdit ? { | ||
...styleItem.textEdit, | ||
newText: styleItem.textEdit.newText + ' lang="' + lang + '"', | ||
} : undefined, | ||
}); | ||
} | ||
} | ||
const templateItem = result.items.find(item => item.label === 'template'); | ||
if (templateItem) { | ||
templateItem.kind = 17; | ||
templateItem.detail = '.html'; | ||
result.items.push({ | ||
...templateItem, | ||
kind: 17, | ||
detail: '.pug', | ||
label: templateItem.label + ' lang="pug"', | ||
textEdit: templateItem.textEdit ? { | ||
...templateItem.textEdit, | ||
newText: templateItem.textEdit.newText + ' lang="pug"', | ||
} : undefined, | ||
}); | ||
} | ||
return result; | ||
@@ -182,12 +226,2 @@ }, | ||
} | ||
function createCompletionItemWithTs(base) { | ||
return { | ||
...base, | ||
label: base.label + ' lang="ts"', | ||
textEdit: { | ||
...base.textEdit, | ||
newText: base.textEdit.newText + ' lang="ts"', | ||
} | ||
}; | ||
} | ||
//# sourceMappingURL=vue-sfc.js.map |
{ | ||
"name": "@vue/language-service", | ||
"version": "2.0.26-alpha.2", | ||
"version": "2.0.26", | ||
"license": "MIT", | ||
@@ -19,9 +19,9 @@ "files": [ | ||
"dependencies": { | ||
"@volar/language-core": "~2.4.0-alpha.12", | ||
"@volar/language-service": "~2.4.0-alpha.12", | ||
"@volar/typescript": "~2.4.0-alpha.12", | ||
"@volar/language-core": "~2.4.0-alpha.15", | ||
"@volar/language-service": "~2.4.0-alpha.15", | ||
"@volar/typescript": "~2.4.0-alpha.15", | ||
"@vue/compiler-dom": "^3.4.0", | ||
"@vue/language-core": "2.0.26-alpha.2", | ||
"@vue/language-core": "2.0.26", | ||
"@vue/shared": "^3.4.0", | ||
"@vue/typescript-plugin": "2.0.26-alpha.2", | ||
"@vue/typescript-plugin": "2.0.26", | ||
"computeds": "^0.0.1", | ||
@@ -44,6 +44,6 @@ "path-browserify": "^1.0.1", | ||
"@types/path-browserify": "latest", | ||
"@volar/kit": "~2.4.0-alpha.12", | ||
"@volar/kit": "~2.4.0-alpha.15", | ||
"vscode-languageserver-protocol": "^3.17.5" | ||
}, | ||
"gitHead": "e4e8c8ca14dc564bf9043a625dd704b32bdc69d0" | ||
"gitHead": "47924f61e9409501d11ab04e9d3417cc5c86232c" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1566890
33813
1
+ Added@vue/language-core@2.0.26(transitive)
+ Added@vue/typescript-plugin@2.0.26(transitive)
- Removed@vue/language-core@2.0.26-alpha.2(transitive)
- Removed@vue/typescript-plugin@2.0.26-alpha.2(transitive)
Updated@vue/language-core@2.0.26