Skip to content

Commit

Permalink
feat: upgrade vue language tools to v2.1 (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 8, 2024
1 parent c152323 commit b76fe5e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 38 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"dependencies": {
"@microsoft/api-extractor": "7.47.4",
"@rollup/pluginutils": "^5.1.0",
"@volar/typescript": "^2.3.4",
"@vue/language-core": "2.0.29",
"@volar/typescript": "^2.4.4",
"@vue/language-core": "2.1.6",
"compare-versions": "^6.1.1",
"debug": "^4.3.6",
"kolorist": "^1.8.0",
Expand Down
64 changes: 38 additions & 26 deletions pnpm-lock.yaml

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

14 changes: 4 additions & 10 deletions src/program.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
createParsedCommandLine,
createRootFileChecker,
createVueLanguagePlugin2,
createVueLanguagePlugin,
resolveVueCompilerOptions
} from '@vue/language-core'

Expand Down Expand Up @@ -32,16 +31,11 @@ const _createProgram = !hasVue
}
}

const vueLanguagePlugin = createVueLanguagePlugin2<string>(
const vueLanguagePlugin = createVueLanguagePlugin<string>(
ts,
id => id,
createRootFileChecker(
undefined,
() => options.rootNames.map(rootName => rootName.replace(/\\/g, '/')),
options.host?.useCaseSensitiveFileNames?.() ?? false
),
options.options,
vueOptions
vueOptions,
id => id
)
return [vueLanguagePlugin]
})
Expand Down

0 comments on commit b76fe5e

Please sign in to comment.