Skip to content

Commit

Permalink
chore: bump volar
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Dec 21, 2023
1 parent 02d0ef4 commit 520a733
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 135 deletions.
2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@
"devDependencies": {
"@types/semver": "^7.5.3",
"@types/vscode": "^1.82.0",
"@volar/vscode": "2.0.0-alpha.10",
"@volar/vscode": "2.0.0-alpha.12",
"@vue/language-core": "1.8.26",
"@vue/language-server": "1.8.26",
"esbuild": "latest",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"devDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@volar/language-service": "2.0.0-alpha.10",
"@volar/language-service": "2.0.0-alpha.12",
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
Expand Down
2 changes: 1 addition & 1 deletion packages/component-meta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"directory": "packages/component-meta"
},
"dependencies": {
"@volar/typescript": "2.0.0-alpha.10",
"@volar/typescript": "2.0.0-alpha.12",
"@vue/language-core": "1.8.26",
"path-browserify": "^1.0.1",
"vue-component-type-helpers": "1.8.26"
Expand Down
2 changes: 1 addition & 1 deletion packages/language-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"directory": "packages/language-core"
},
"dependencies": {
"@volar/language-core": "2.0.0-alpha.10",
"@volar/language-core": "2.0.0-alpha.12",
"@vue/compiler-dom": "^3.3.0",
"@vue/shared": "^3.3.0",
"computeds": "^0.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/language-plugin-pug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@vue/language-core": "1.8.26"
},
"dependencies": {
"@volar/source-map": "2.0.0-alpha.10",
"volar-service-pug": "0.0.24"
"@volar/source-map": "2.0.0-alpha.12",
"volar-service-pug": "0.0.25"
}
}
6 changes: 3 additions & 3 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"directory": "packages/language-server"
},
"dependencies": {
"@volar/language-core": "2.0.0-alpha.10",
"@volar/language-server": "2.0.0-alpha.10",
"@volar/typescript": "2.0.0-alpha.10",
"@volar/language-core": "2.0.0-alpha.12",
"@volar/language-server": "2.0.0-alpha.12",
"@volar/typescript": "2.0.0-alpha.12",
"@vue/language-core": "1.8.26",
"@vue/language-service": "1.8.26",
"vscode-languageserver-protocol": "^3.17.5",
Expand Down
20 changes: 8 additions & 12 deletions packages/language-server/src/nodeServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,29 @@ connection.onInitialize(params => {
options.vue?.hybridMode ? createSimpleProjectProvider : createTypeScriptProjectProvider,
{
watchFileExtensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'json', ...vueFileExtensions],
getServerCapabilitiesSetup() {
getServicePlugins() {
const ts = getTsLib();
const services = vue.resolveServices({}, ts, env => envToVueOptions.get(env)!);
return {
servicePlugins: Object.values(services),
};

return Object.values(services);
},
async getProjectSetup(serviceEnv, projectContext) {
async getLanguagePlugins(serviceEnv, projectContext) {
const ts = getTsLib();
const [commandLine, vueOptions] = await parseCommandLine();
const resolvedVueOptions = vue.resolveVueCompilerOptions(vueOptions);
envToVueOptions.set(serviceEnv, resolvedVueOptions);
const services = vue.resolveServices({}, ts, env => envToVueOptions.get(env)!);
const languages = vue.resolveLanguages({}, ts, commandLine?.options ?? {}, resolvedVueOptions, options.codegenStack);

return {
languagePlugins: Object.values(languages),
servicePlugins: Object.values(services),
};
envToVueOptions.set(serviceEnv, resolvedVueOptions);

return Object.values(languages);

async function parseCommandLine() {

let commandLine: vue2.ParsedCommandLine | undefined;
let vueOptions: Partial<vue.VueCompilerOptions> = {};

if (projectContext.typescript) {
const sys = createSys(ts, serviceEnv, serviceEnv.uriToFileName(serviceEnv.workspaceFolder.uri.toString()));
const sys = createSys(ts, serviceEnv, serviceEnv.uriToFileName(serviceEnv.workspaceFolder.toString()));
let sysVersion: number | undefined;
let newSysVersion = await sys.sync();

Expand Down
24 changes: 12 additions & 12 deletions packages/language-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
"update-html-data": "node ./scripts/update-html-data.js"
},
"dependencies": {
"@volar/language-core": "2.0.0-alpha.10",
"@volar/language-service": "2.0.0-alpha.10",
"@volar/typescript": "2.0.0-alpha.10",
"@volar/language-core": "2.0.0-alpha.12",
"@volar/language-service": "2.0.0-alpha.12",
"@volar/typescript": "2.0.0-alpha.12",
"@vue/compiler-dom": "^3.3.0",
"@vue/language-core": "1.8.26",
"@vue/shared": "^3.3.0",
"computeds": "^0.0.1",
"path-browserify": "^1.0.1",
"volar-service-css": "0.0.24",
"volar-service-emmet": "0.0.24",
"volar-service-html": "0.0.24",
"volar-service-json": "0.0.24",
"volar-service-pug": "0.0.24",
"volar-service-pug-beautify": "0.0.24",
"volar-service-typescript": "0.0.24",
"volar-service-typescript-twoslash-queries": "0.0.24",
"volar-service-css": "0.0.25",
"volar-service-emmet": "0.0.25",
"volar-service-html": "0.0.25",
"volar-service-json": "0.0.25",
"volar-service-pug": "0.0.25",
"volar-service-pug-beautify": "0.0.25",
"volar-service-typescript": "0.0.25",
"volar-service-typescript-twoslash-queries": "0.0.25",
"vscode-html-languageservice": "^5.1.0",
"vscode-languageserver-textdocument": "^1.0.11"
},
"devDependencies": {
"@types/node": "latest",
"@types/path-browserify": "latest",
"@volar/kit": "2.0.0-alpha.10",
"@volar/kit": "2.0.0-alpha.12",
"vscode-languageserver-protocol": "^3.17.5",
"vscode-uri": "^3.0.8"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/tsc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"vue-tsc": "./bin/vue-tsc.js"
},
"dependencies": {
"@volar/typescript": "2.0.0-alpha.10",
"@volar/typescript": "2.0.0-alpha.12",
"@vue/language-core": "1.8.26",
"semver": "^7.5.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"directory": "packages/typescript-plugin"
},
"dependencies": {
"@volar/typescript": "2.0.0-alpha.10",
"@volar/typescript": "2.0.0-alpha.12",
"@vue/language-core": "1.8.26"
}
}
2 changes: 1 addition & 1 deletion packages/typescript-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createTSServerPlugin } from '@volar/typescript/lib/starters/createTSServerPlugin';
import { createTSServerPlugin } from '@volar/typescript/lib/quickstart/createTSServerPlugin';
import * as vue from '@vue/language-core';
// @ts-expect-error
import type * as ts from 'typescript/lib/tsserverlibrary';
Expand Down
Loading

0 comments on commit 520a733

Please sign in to comment.