Skip to content

Commit

Permalink
chore: update to Volar 2.4.0-alpha.11
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jul 2, 2024
1 parent 939cd9a commit 35dc257
Show file tree
Hide file tree
Showing 17 changed files with 92 additions and 73 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"@volar/language-service": "~2.4.0-alpha.1",
"@volar/language-service": "~2.4.0-alpha.11",
"typescript": "latest",
"vitest": "latest"
},
"pnpm": {
"overrides": {
"inquirer": "9.2.23"
}
}
}
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/emmet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/html/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "latest"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/json/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"prettier": "^3.3.2"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1",
"@volar/language-service": "~2.4.0-alpha.11",
"prettier": "^2.2 || ^3.0"
},
"peerDependenciesMeta": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettyhtml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@starptech/prettyhtml": "^0.10.0"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pug-beautify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@johnsoncodehk/pug-beautify": "^0.2.2"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/pug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"url": "https://github.com/johnsoncodehk"
},
"dependencies": {
"@volar/language-service": "~2.4.0-alpha.1",
"@volar/language-service": "~2.4.0-alpha.11",
"muggle-string": "^0.4.1",
"pug-lexer": "^5.0.1",
"pug-parser": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sass-formatter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sass-formatter": "^0.7.9"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-twoslash-queries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"volar-service-typescript": "0.0.56"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
10 changes: 5 additions & 5 deletions packages/typescript/lib/plugins/semantic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function create(
console.warn(`[volar] typescript-semantic requires typescript project.`);
return {};
}
const { sys, languageServiceHost, asFileName, asUri, getExtraServiceScript } = context.project.typescript;
const { sys, languageServiceHost, uriConverter, getExtraServiceScript } = context.project.typescript;
const created = tsWithImportCache.createLanguageService(
ts,
sys,
Expand All @@ -185,7 +185,7 @@ export function create(
if (virtualScript) {
return virtualScript.fileName;
}
return asFileName(uri);
return uriConverter.asFileName(uri);
},
fileNameToUri(fileName) {
const extraServiceScript = getExtraServiceScript(fileName);
Expand All @@ -194,7 +194,7 @@ export function create(
return context.encodeEmbeddedDocumentUri(sourceScript.id, extraServiceScript.code.id);
}

const uri = asUri(fileName);
const uri = uriConverter.asUri(fileName);
const sourceScript = context.language.scripts.get(uri);
const serviceScript = sourceScript?.generated?.languagePlugin.typescript?.getServiceScript(sourceScript.generated.root);
if (sourceScript && serviceScript) {
Expand Down Expand Up @@ -257,7 +257,7 @@ export function create(
updateSourceScriptFileNames();
}
for (const change of params.changes) {
const fileName = asFileName(URI.parse(change.uri));
const fileName = uriConverter.asFileName(URI.parse(change.uri));
if (sourceScriptNames.has(normalizeFileName(fileName))) {
created.projectUpdated?.(languageServiceHost.getCurrentDirectory());
}
Expand Down Expand Up @@ -1016,7 +1016,7 @@ export function create(
const virtualCode = decoded && sourceScript?.generated?.embeddedCodes.get(decoded[1]);
if (virtualCode && sourceScript?.generated?.languagePlugin.typescript) {
const { getServiceScript, getExtraServiceScripts } = sourceScript.generated?.languagePlugin.typescript;
const sourceFileName = asFileName(sourceScript.id);
const sourceFileName = uriConverter.asFileName(sourceScript.id);
if (getServiceScript(sourceScript.generated.root)?.code === virtualCode) {
return {
fileName: sourceFileName,
Expand Down
4 changes: 2 additions & 2 deletions packages/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@types/path-browserify": "latest",
"@types/semver": "latest",
"@volar/typescript": "~2.4.0-alpha.1"
"@volar/typescript": "~2.4.0-alpha.11"
},
"dependencies": {
"path-browserify": "^1.0.1",
Expand All @@ -37,7 +37,7 @@
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vetur/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"vscode-uri": "^3.0.8"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
2 changes: 1 addition & 1 deletion packages/yaml/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"vscode-languageserver-textdocument": "^1.0.11"
},
"peerDependencies": {
"@volar/language-service": "~2.4.0-alpha.1"
"@volar/language-service": "~2.4.0-alpha.11"
},
"peerDependenciesMeta": {
"@volar/language-service": {
Expand Down
Loading

0 comments on commit 35dc257

Please sign in to comment.