Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/language-tools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.8.8
Choose a base ref
...
head repository: vuejs/language-tools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.8.10
Choose a head ref

Commits on Aug 8, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1bc6a81 View commit details

Commits on Sep 4, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1acd956 View commit details
  2. chore: update sponsor

    johnsoncodehk committed Sep 4, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    220afde View commit details

Commits on Sep 5, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1c6d0ee View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b1bc3a6 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c7b0cf5 View commit details

Commits on Sep 6, 2023

  1. chore: format

    johnsoncodehk committed Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    80ee161 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    929d833 View commit details
  3. fix: correctly hyphen-case props (#3424)

    Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
    so1ve and johnsoncodehk authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2f3282e View commit details
  4. chore: support custom configPath for createParsedCommandLineByJson (#…

    …3456)
    
    Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
    qmhc and johnsoncodehk authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3f1a1c3 View commit details
  5. doc: fix typo (#3461)

    zhhbstudio authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f01a499 View commit details
  6. Update README.md (#3486)

    Megasu authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    2225d22 View commit details
  7. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cc045b8 View commit details
  8. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3134fc0 View commit details
  9. feat: support nested plugins (#3530)

    Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
    so1ve and johnsoncodehk authored Sep 6, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e9d1f3e View commit details
  10. fix: generic components should respect strictTemplates (#3487)

    Co-authored-by: Johnson Chu <johnsoncodehk@gmail.com>
    so1ve and johnsoncodehk authored Sep 6, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    cc78c5f View commit details
  11. fix(vue-component-type-helpers): correctly handle generic components …

    …when using `ComponentExposed` (#3536)
    so1ve authored Sep 6, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    b92f46b View commit details
  12. Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    bf03513 View commit details
  13. Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    32da767 View commit details
  14. Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    46a3736 View commit details
  15. Verified

    This commit was signed with the committer’s verified signature.
    darccio Dario Castañé
    Copy the full SHA
    9486b25 View commit details
  16. Copy the full SHA
    e167dc8 View commit details
  17. chore: changelog

    johnsoncodehk committed Sep 6, 2023
    Copy the full SHA
    9654a01 View commit details
  18. v1.8.10

    johnsoncodehk committed Sep 6, 2023
    Copy the full SHA
    97d60fa View commit details
Showing with 4,206 additions and 1,113 deletions.
  1. +0 −1 .npmrc
  2. +5 −1 .vscode/settings.json
  3. +28 −17 CHANGELOG.md
  4. +1 −1 lerna.json
  5. +3 −3 package.json
  6. +3 −3 packages/typescript-vue-plugin/package.json
  7. +0 −23 packages/typescript-vue-plugin/tsconfig.build.json
  8. +12 −0 packages/typescript-vue-plugin/tsconfig.json
  9. +1 −1 packages/vscode-typescript-vue-plugin/README.md
  10. +2 −2 packages/vscode-typescript-vue-plugin/package.json
  11. +1 −1 packages/vscode-typescript-vue-plugin/scripts/build.js
  12. +0 −20 packages/vscode-typescript-vue-plugin/tsconfig.build.json
  13. +11 −0 packages/vscode-typescript-vue-plugin/tsconfig.json
  14. +1 −2 packages/vscode-vue/.vscodeignore
  15. +1 −2 packages/vscode-vue/README.md
  16. +22 −5 packages/vscode-vue/package.json
  17. +1 −1 packages/vscode-vue/scripts/build.js
  18. +12 −0 packages/vscode-vue/src/common.ts
  19. +2 −0 packages/vscode-vue/src/config.ts
  20. +15 −5 packages/vscode-vue/src/nodeClientMain.ts
  21. +0 −21 packages/vscode-vue/tsconfig.build.json
  22. +11 −0 packages/vscode-vue/tsconfig.json
  23. +3 −3 packages/vue-component-meta/package.json
  24. +1 −1 packages/vue-component-meta/tests/index.spec.ts
  25. +0 −23 packages/vue-component-meta/tsconfig.build.json
  26. +12 −0 packages/vue-component-meta/tsconfig.json
  27. +1 −1 packages/vue-component-type-helpers/index.d.ts
  28. +1 −1 packages/vue-component-type-helpers/package.json
  29. +1 −1 packages/vue-language-core/package.json
  30. +7 −8 packages/vue-language-core/src/generators/script.ts
  31. +34 −20 packages/vue-language-core/src/generators/template.ts
  32. +2 −0 packages/vue-language-core/src/index.ts
  33. +1 −1 packages/vue-language-core/src/languageModule.ts
  34. +14 −9 packages/vue-language-core/src/plugins.ts
  35. +2 −1 packages/vue-language-core/src/plugins/file-html.ts
  36. +2 −1 packages/vue-language-core/src/plugins/file-md.ts
  37. +2 −1 packages/vue-language-core/src/plugins/file-vue.ts
  38. +2 −1 packages/vue-language-core/src/plugins/vue-sfc-customblocks.ts
  39. +2 −1 packages/vue-language-core/src/plugins/vue-sfc-scripts.ts
  40. +2 −1 packages/vue-language-core/src/plugins/vue-sfc-styles.ts
  41. +2 −1 packages/vue-language-core/src/plugins/vue-sfc-template.ts
  42. +2 −1 packages/vue-language-core/src/plugins/vue-template-html.ts
  43. +1 −0 packages/vue-language-core/src/plugins/vue-tsx.ts
  44. +9 −9 packages/vue-language-core/src/sourceFile.ts
  45. +13 −14 packages/vue-language-core/src/types.ts
  46. +13 −0 packages/vue-language-core/src/utils/shared.ts
  47. +10 −5 packages/vue-language-core/src/utils/ts.ts
  48. +16 −18 packages/vue-language-core/src/utils/vue2TemplateCompiler.ts
  49. +0 −15 packages/vue-language-core/tsconfig.build.json
  50. +8 −0 packages/vue-language-core/tsconfig.json
  51. +3 −3 packages/vue-language-plugin-pug/package.json
  52. +0 −20 packages/vue-language-plugin-pug/tsconfig.build.json
  53. +11 −0 packages/vue-language-plugin-pug/tsconfig.json
  54. +4 −4 packages/vue-language-server/package.json
  55. +0 −26 packages/vue-language-server/tsconfig.build.json
  56. +13 −0 packages/vue-language-server/tsconfig.json
  57. +68 −0 packages/vue-language-service/data/language-blocks/en.json
  58. +68 −0 packages/vue-language-service/data/language-blocks/fr.json
  59. +68 −0 packages/vue-language-service/data/language-blocks/ja.json
  60. +68 −0 packages/vue-language-service/data/language-blocks/ko.json
  61. +694 −0 packages/vue-language-service/data/language-blocks/pt.json
  62. +68 −0 packages/vue-language-service/data/language-blocks/zh-cn.json
  63. +12 −0 packages/vue-language-service/data/model-modifiers/en.json
  64. +12 −0 packages/vue-language-service/data/model-modifiers/fr.json
  65. +12 −0 packages/vue-language-service/data/model-modifiers/ja.json
  66. +12 −0 packages/vue-language-service/data/model-modifiers/ko.json
  67. +116 −0 packages/vue-language-service/data/model-modifiers/pt.json
  68. +12 −0 packages/vue-language-service/data/model-modifiers/zh-cn.json
  69. +104 −0 packages/vue-language-service/data/template/en.json
  70. +104 −0 packages/vue-language-service/data/template/fr.json
  71. +104 −0 packages/vue-language-service/data/template/ja.json
  72. +104 −0 packages/vue-language-service/data/template/ko.json
  73. +978 −0 packages/vue-language-service/data/template/pt.json
  74. +105 −1 packages/vue-language-service/data/template/zh-cn.json
  75. +10 −10 packages/vue-language-service/package.json
  76. +6 −0 packages/vue-language-service/scripts/update-html-data.js
  77. +4 −4 packages/vue-language-service/src/helpers.ts
  78. +21 −22 packages/vue-language-service/src/ideFeatures/nameCasing.ts
  79. +55 −51 packages/vue-language-service/src/languageService.ts
  80. +9 −0 packages/vue-language-service/src/plugins/data.ts
  81. +3 −3 packages/vue-language-service/src/plugins/vue-autoinsert-dotvalue.ts
  82. +1 −1 packages/vue-language-service/src/plugins/vue-autoinsert-parentheses.ts
  83. +1 −1 packages/vue-language-service/src/plugins/vue-autoinsert-space.ts
  84. +2 −2 packages/vue-language-service/src/plugins/vue-codelens-references.ts
  85. +1 −1 packages/vue-language-service/src/plugins/vue-directive-comments.ts
  86. +2 −2 packages/vue-language-service/src/plugins/vue-extract-file.ts
  87. +33 −33 packages/vue-language-service/src/plugins/vue-template.ts
  88. +5 −6 packages/vue-language-service/src/plugins/vue-toggle-v-bind-codeaction.ts
  89. +1 −1 packages/vue-language-service/src/plugins/vue-twoslash-queries.ts
  90. +1 −1 packages/vue-language-service/src/plugins/vue-visualize-hidden-callback-param.ts
  91. +1 −1 packages/vue-language-service/src/plugins/vue.ts
  92. +0 −12 packages/vue-language-service/tests/tsconfig.json
  93. +1 −1 packages/vue-language-service/tests/utils/createTester.ts
  94. +1 −1 packages/vue-language-service/tests/utils/format.ts
  95. +0 −23 packages/vue-language-service/tsconfig.build.json
  96. +12 −0 packages/vue-language-service/tsconfig.json
  97. +12 −0 packages/vue-test-workspace/complete/core#8811/input/entry.vue
  98. +12 −0 packages/vue-test-workspace/complete/core#8811/output/entry.vue
  99. +2 −2 packages/vue-test-workspace/package.json
  100. +2 −4 packages/vue-test-workspace/tsconfig.json
  101. +1 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/#3318/Comp.vue
  102. +7 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/#3318/main.vue
  103. +1 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/components/main.vue
  104. +5 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/defineExpose/Comp.vue
  105. +6 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/defineExpose/main.vue
  106. +1 −0 packages/vue-test-workspace/vue-tsc/non-strict-template/defineProp_B/main.vue
  107. +2 −2 packages/vue-tsc-eslint-hook/package.json
  108. +0 −20 packages/vue-tsc-eslint-hook/tsconfig.build.json
  109. +11 −0 packages/vue-tsc-eslint-hook/tsconfig.json
  110. +3 −3 packages/vue-tsc/package.json
  111. +0 −23 packages/vue-tsc/tsconfig.build.json
  112. +12 −0 packages/vue-tsc/tsconfig.json
  113. +2 −2 packages/vue-typescript/package.json
  114. +0 −20 packages/vue-typescript/tsconfig.build.json
  115. +11 −0 packages/vue-typescript/tsconfig.json
  116. +866 −452 pnpm-lock.yaml
  117. +19 −0 tsconfig.base.json
  118. +0 −18 tsconfig.build-ci.json
  119. +0 −33 tsconfig.build.json
  120. +9 −0 tsconfig.ci.json
  121. +17 −58 tsconfig.json
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
modules-cache-max-age=0
prefer-frozen-lockfile=true
auto-install-peers=false
resolution-mode=highest
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -15,5 +15,9 @@
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
}
},
"[vue]": {
"editor.defaultFormatter": "Vue.volar"
},
"vue.server.path": "./packages/vue-language-server/bin/vue-language-server.js",
}
45 changes: 28 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
# Changelog

## 1.8.8 (2023/7/27)

- fix: language server crashed due to importing unexist library ([#3453](https://github.com/vuejs/language-tools/issues/3453)) ([#3454](https://github.com/vuejs/language-tools/issues/3454))

## 1.8.7 (2023/7/27)
## 1.8.10 (2023/9/6)

- feat: support auto-complete for directives ([#2559](https://github.com/vuejs/language-tools/issues/2559))
- feat: support extract component for options api
- feat: re-support external component parsing ([#3328](https://github.com/vuejs/language-tools/issues/3328))
- feat: support function expression emit event ([#3445](https://github.com/vuejs/language-tools/issues/3445)) - thanks @lvjiaxuan
- perf: reuse VueFile instances between monorepo packages ([#3450](https://github.com/vuejs/language-tools/issues/3450))
- fix: handle node next module resolution ([#3159](https://github.com/vuejs/language-tools/issues/3159)) - thanks @kalvenschraut
- fix: generate valid code when using `__VLS_PropsChildren` ([#3442](https://github.com/vuejs/language-tools/issues/3442)) - thanks @so1ve
- fix: component auto-import cannot insert import statement
- fix: extract component cannot extract interpolations
- fix: allow top-level await in script setup blocks with generics ([#3441](https://github.com/vuejs/language-tools/issues/3441)) - thanks @so1ve
- feat: added Portuguese integration documentation ([#3535](https://github.com/vuejs/language-tools/issues/3535))
- feat: exposed `configFileName` for `createParsedCommandLineByJson()` function ([#3456](https://github.com/vuejs/language-tools/issues/3456)) - thanks @qmhc
- feat: support nested plugins ([#3530](https://github.com/vuejs/language-tools/issues/3530)) - thanks @so1ve
- feat(vscode): add `vue.server.runtime` setting and support for Bun runtime
- feat(vscode): add `vue.server.path` setting for customize server module path
- fix: correctly hyphen-case props ([#3424](https://github.com/vuejs/language-tools/issues/3424)) - thanks @so1ve
- fix: generic components should respect `strictTemplates` ([#3487](https://github.com/vuejs/language-tools/issues/3487)) - thanks @so1ve
- fix(vue-component-type-helpers): correctly handle generic components when using `ComponentExposed` ([#3536](https://github.com/vuejs/language-tools/issues/3536)) - thanks @so1ve

### Full-time Support by

@@ -36,9 +30,9 @@
<tbody>
<tr>
<td>
<a href="https://volta.net/"><img src="https://raw.githubusercontent.com/vuejs/language-tools/HEAD/.github/sponsors/volta.svg" height="60" /></a>
<a href="https://nuxt.com/"><img src="https://raw.githubusercontent.com/vuejs/language-tools/HEAD/.github/sponsors/nuxt.svg" height="60" /></a>
</td>
<td>Supercharged GitHub experience</td>
<td>The Intuitive Web Framework</td>
</tr>
<tr>
<td>
@@ -71,6 +65,23 @@ JavaScript Framework</td>
<a href="https://opencollective.com/volarjs">Open Collective</a>
</h5>

## 1.8.8 (2023/7/27)

- fix: language server crashed due to importing unexist library ([#3453](https://github.com/vuejs/language-tools/issues/3453)) ([#3454](https://github.com/vuejs/language-tools/issues/3454))

## 1.8.7 (2023/7/27)

- feat: support auto-complete for directives ([#2559](https://github.com/vuejs/language-tools/issues/2559))
- feat: support extract component for options api
- feat: re-support external component parsing ([#3328](https://github.com/vuejs/language-tools/issues/3328))
- feat: support function expression emit event ([#3445](https://github.com/vuejs/language-tools/issues/3445)) - thanks @lvjiaxuan
- perf: reuse VueFile instances between monorepo packages ([#3450](https://github.com/vuejs/language-tools/issues/3450))
- fix: handle node next module resolution ([#3159](https://github.com/vuejs/language-tools/issues/3159)) - thanks @kalvenschraut
- fix: generate valid code when using `__VLS_PropsChildren` ([#3442](https://github.com/vuejs/language-tools/issues/3442)) - thanks @so1ve
- fix: component auto-import cannot insert import statement
- fix: extract component cannot extract interpolations
- fix: allow top-level await in script setup blocks with generics ([#3441](https://github.com/vuejs/language-tools/issues/3441)) - thanks @so1ve

## 1.8.6 (2023/7/22)

- feat: add support for extract component code action ([#2496](https://github.com/vuejs/language-tools/issues/2496)) - thanks @zardoy
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -4,5 +4,5 @@
"packages": [
"packages/*"
],
"version": "1.8.8"
"version": "1.8.10"
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"private": true,
"scripts": {
"build": "tsc -b tsconfig.build.json",
"build-ci": "tsc -b tsconfig.build-ci.json",
"build": "tsc -b",
"build-ci": "tsc -b tsconfig.ci.json",
"watch": "npm run build && (npm run watch:base & npm run watch:vue & npm run watch:typescript-vue-plugin)",
"watch:base": "tsc -b tsconfig.build.json -w",
"watch:base": "tsc -b -w",
"watch:vue": "cd ./packages/vscode-vue && npm run watch",
"watch:typescript-vue-plugin": "cd ./packages/vscode-typescript-vue-plugin && npm run watch",
"prerelease": "npm run build && npm run test",
6 changes: 3 additions & 3 deletions packages/typescript-vue-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typescript-vue-plugin",
"version": "1.8.8",
"version": "1.8.10",
"main": "out/index.js",
"license": "MIT",
"files": [
@@ -13,8 +13,8 @@
"directory": "packages/typescript-vue-plugin"
},
"dependencies": {
"@vue/language-core": "1.8.8",
"@vue/typescript": "1.8.8",
"@vue/language-core": "1.8.10",
"@vue/typescript": "1.8.10",
"vscode-uri": "^3.0.7"
}
}
23 changes: 0 additions & 23 deletions packages/typescript-vue-plugin/tsconfig.build.json

This file was deleted.

12 changes: 12 additions & 0 deletions packages/typescript-vue-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "out",
"rootDir": "src",
},
"include": [ "src" ],
"references": [
{ "path": "../vue-language-core/tsconfig.json" },
{ "path": "../vue-typescript/tsconfig.json" },
],
}
2 changes: 1 addition & 1 deletion packages/vscode-typescript-vue-plugin/README.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ This plugin proxies TS server requests to provide some extra functionality:

- When finding references in *.ts files, you also get results from *.vue files.
- When renaming in *.ts files, references on *.vue files also get adjusted.
- When typing import statements, .vue* files will also appear for autocompletion.
- When typing import statements, *.vue files will also appear for autocompletion.
- (And some extra details most people don't need to know...)

## Sponsors
4 changes: 2 additions & 2 deletions packages/vscode-typescript-vue-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "vscode-typescript-vue-plugin",
"version": "1.8.8",
"version": "1.8.10",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
@@ -37,7 +37,7 @@
},
"devDependencies": {
"esbuild": "0.15.18",
"typescript-vue-plugin": "1.8.8",
"typescript-vue-plugin": "1.8.10",
"vsce": "latest"
}
}
2 changes: 1 addition & 1 deletion packages/vscode-typescript-vue-plugin/scripts/build.js
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ require('esbuild').build({
],
format: 'cjs',
platform: 'node',
tsconfig: '../../tsconfig.build.json',
tsconfig: './tsconfig.json',
minify: process.argv.includes('--minify'),
watch: process.argv.includes('--watch'),
plugins: [{
20 changes: 0 additions & 20 deletions packages/vscode-typescript-vue-plugin/tsconfig.build.json

This file was deleted.

11 changes: 11 additions & 0 deletions packages/vscode-typescript-vue-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"outDir": "out",
"rootDir": "src",
},
"include": [ "src" ],
"references": [
{ "path": "../typescript-vue-plugin/tsconfig.json" },
]
}
3 changes: 1 addition & 2 deletions packages/vscode-vue/.vscodeignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
out
scripts
src
tsconfig.build.json
tsconfig.build.tsbuildinfo
tsconfig.*
meta.json
stats.html
3 changes: 1 addition & 2 deletions packages/vscode-vue/README.md
Original file line number Diff line number Diff line change
@@ -91,8 +91,7 @@ For Global components, you need to define `GlobalComponents` interface, for exam

```typescript
// components.d.ts
declare module '@vue/runtime-core' { // Vue 3
// declare module 'vue' { // Vue 2.7
declare module 'vue' { // Vue >= 2.7
// declare module '@vue/runtime-dom' { // Vue <= 2.6.14
export interface GlobalComponents {
RouterLink: typeof import('vue-router')['RouterLink']
27 changes: 22 additions & 5 deletions packages/vscode-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "volar",
"version": "1.8.8",
"version": "1.8.10",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
@@ -408,6 +408,23 @@
"default": "off",
"description": "Traces the communication between VS Code and the language server."
},
"vue.server.path": {
"type": [
"string",
"null"
],
"default": null,
"description": "Path to node_modules/vue-language-server/bin/vue-language-server.js."
},
"vue.server.runtime": {
"type": "string",
"enum": [
"node",
"bun"
],
"default": "node",
"description": "Vue Language Server runtime."
},
"vue.server.configFilePath": {
"type": "string",
"default": "./volar.config.js",
@@ -416,7 +433,7 @@
"vue.server.maxFileSize": {
"type": "number",
"default": 20971520,
"description": "Maximum file size for Vue Server to load. (default: 20MB)"
"description": "Maximum file size for Vue Language Server to load. (default: 20MB)"
},
"vue.server.petiteVue.supportHtmlFile": {
"type": "boolean",
@@ -720,14 +737,14 @@
"pack:next": "npm run build && vsce package",
"release": "npm run build:minify && vsce publish",
"release:next": "npm run build && vsce publish --pre-release",
"bundle-size": "npm run build:minify --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
"size": "npm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
},
"devDependencies": {
"@types/semver": "^7.3.13",
"@types/vscode": "1.67.0",
"@volar/vscode": "~1.10.0",
"@vue/language-core": "1.8.8",
"@vue/language-server": "1.8.8",
"@vue/language-core": "1.8.10",
"@vue/language-server": "1.8.10",
"esbuild": "0.15.18",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
2 changes: 1 addition & 1 deletion packages/vscode-vue/scripts/build.js
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ require('esbuild').build({
],
format: 'cjs',
platform: 'node',
tsconfig: '../../tsconfig.build.json',
tsconfig: './tsconfig.json',
define: { 'process.env.NODE_ENV': '"production"' },
minify: process.argv.includes('--minify'),
watch: process.argv.includes('--watch'),
12 changes: 12 additions & 0 deletions packages/vscode-vue/src/common.ts
Original file line number Diff line number Diff line change
@@ -143,8 +143,20 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
activateServerSys(client);
}

async function requestReloadVscode() {
const reload = await vscode.window.showInformationMessage(
'Please reload VSCode to restart language servers.',
'Reload Window'
);
if (reload === undefined) return; // cancel
vscode.commands.executeCommand('workbench.action.reloadWindow');
}

function activateServerMaxOldSpaceSizeChange() {
vscode.workspace.onDidChangeConfiguration((e) => {
if (e.affectsConfiguration('vue.server.runtime') || e.affectsConfiguration('vue.server.path')) {
requestReloadVscode();
}
if (e.affectsConfiguration('vue')) {
vscode.commands.executeCommand('volar.action.restartServer');
}
2 changes: 2 additions & 0 deletions packages/vscode-vue/src/config.ts
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@ export const config = {
return _config().get('doctor')!;
},
get server(): Readonly<{
path: null | string;
runtime: 'node' | 'bun';
maxOldSpaceSize: number;
maxFileSize: number;
reverseConfigFilePriority: boolean;
20 changes: 15 additions & 5 deletions packages/vscode-vue/src/nodeClientMain.ts
Original file line number Diff line number Diff line change
@@ -47,7 +47,18 @@ export async function activate(context: vscode.ExtensionContext) {
}
}

const serverModule = vscode.Uri.joinPath(context.extensionUri, 'server.js');
let serverModule = vscode.Uri.joinPath(context.extensionUri, 'server.js');

if (config.server.path) {
try {
const roots = (vscode.workspace.workspaceFolders ?? []).map(folder => folder.uri.fsPath);
const serverPath = require.resolve(config.server.path, { paths: roots });
serverModule = vscode.Uri.file(serverPath);
} catch (err) {
vscode.window.showWarningMessage(`Cannot find vue language server path: ${config.server.path}`);
}
}

const runOptions: lsp.ForkOptions = {};
if (config.server.maxOldSpaceSize) {
runOptions.execArgv ??= [];
@@ -66,16 +77,15 @@ export async function activate(context: vscode.ExtensionContext) {
options: debugOptions
},
};
const bunPath: string | undefined = undefined; // path to .bun/bin/bun
if (bunPath) {
if (config.server.runtime === 'bun') {
serverOptions = {
run: {
transport: {
kind: lsp.TransportKind.socket,
port: port + 10,
},
options: runOptions,
command: bunPath,
command: 'bun',
args: ['--bun', 'run', serverModule.fsPath],
},
debug: {
@@ -84,7 +94,7 @@ export async function activate(context: vscode.ExtensionContext) {
port: port + 10,
},
options: debugOptions,
command: bunPath,
command: 'bun',
args: ['--bun', 'run', serverModule.fsPath],
},
};
Loading