Skip to content

Commit

Permalink
chore: upgrade @vue/language-service
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Mar 3, 2024
1 parent 58aa9f2 commit 5c13ab8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 34 deletions.
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -81,7 +81,7 @@
"@vitejs/plugin-vue": "^5.0.4",
"@volar/monaco": "~2.1.0",
"@volar/typescript": "~2.1.0",
"@vue/language-service": "2.0.1",
"@vue/language-service": "2.0.3",
"bumpp": "^9.3.0",
"codemirror": "^5.65.16",
"conventional-changelog-cli": "^4.1.0",
Expand All @@ -103,8 +103,7 @@
},
"pnpm": {
"patchedDependencies": {
"@volar/[email protected]": "patches/@[email protected]",
"@vue/[email protected]": "patches/@[email protected]"
"@volar/[email protected]": "patches/@[email protected]"
}
}
}
29 changes: 7 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions src/monaco/vue.worker.ts
Expand Up @@ -33,15 +33,6 @@ self.onmessage = async (msg: MessageEvent<WorkerMessage>) => {
return
}

const env: ServiceEnvironment = {
workspaceFolder: 'file:///',
locale,
typescript: {
uriToFileName: (uri) => uri.substring('file://'.length),
fileNameToUri: (fileName) => 'file://' + fileName,
},
}

worker.initialize(
(
ctx: monaco.worker.IWorkerContext,
Expand All @@ -51,6 +42,16 @@ self.onmessage = async (msg: MessageEvent<WorkerMessage>) => {
dependencies,
}: CreateData,
) => {
const uriToFileName = (uri: string) => uri.substring('file://'.length)
const env: ServiceEnvironment = {
workspaceFolder: 'file:///',
locale,
typescript: {
uriToFileName,
fileNameToUri: (fileName) => 'file://' + fileName,
},
}

const { options: compilerOptions } = ts.convertCompilerOptionsFromJson(
tsconfig?.compilerOptions || {},
'',
Expand Down

0 comments on commit 5c13ab8

Please sign in to comment.