Skip to content

Commit

Permalink
Merge branch 'master' into pr/4245
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 12, 2024
2 parents 630c74e + 5216e74 commit 04215cd
Show file tree
Hide file tree
Showing 18 changed files with 175 additions and 134 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 2.1.0-insiders.4 (2024/4/10)

Download Pages: [GitHub Releases](https://github.com/volarjs/insiders/releases/tag/v2.1.0-insiders.4), [爱发电电圈](https://afdian.net/p/46a5f4a8f72011ee97fe52540025c377)

> [Join the Insiders Program](https://github.com/vuejs/language-tools/wiki/Get-Insiders-Edition) for more exclusive features and updates.
### Other Changes

- Merged [v2.0.12](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md#2012-2024410).

## 2.0.12 (2024/4/10)

### Bug Fixes

- **vscode:** restart tsserver before restart vue language server (#4242)
- **tsc:** remove exit early condition
- **typescript-plugin:** handle named pipe server timeout
- **language-core:** `@vue-ignore` not working for fragment v-if/v-for nodes (#4232)

### Other Changes

- Upgrade Volar from `v2.2.0-alpha.6` to `v2.2.0-alpha.7` for a typescript plugin bug fixes

## 2.1.0-insiders.3 (2024/4/7)

Download Pages: [GitHub Releases](https://github.com/volarjs/insiders/releases/tag/v2.1.0-insiders.3), [爱发电电圈](https://afdian.net/p/5bf99cfaf4ec11ee9e1f5254001e7c00)
Expand Down
10 changes: 5 additions & 5 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "volar",
"version": "2.0.11",
"version": "2.0.12",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
Expand Down Expand Up @@ -532,10 +532,10 @@
"devDependencies": {
"@types/semver": "^7.5.3",
"@types/vscode": "^1.82.0",
"@volar/vscode": "2.2.0-alpha.7",
"@vue/language-core": "2.0.11",
"@vue/language-server": "2.0.11",
"@vue/typescript-plugin": "2.0.11",
"@volar/vscode": "2.2.0-alpha.8",
"@vue/language-core": "2.0.12",
"@vue/language-server": "2.0.12",
"@vue/typescript-plugin": "2.0.12",
"esbuild": "latest",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"packages/*",
"test-workspace"
],
"version": "2.0.11"
"version": "2.0.12"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@volar/language-service": "2.2.0-alpha.7",
"@volar/language-service": "2.2.0-alpha.8",
"@volar/tsl-config": "latest",
"tsl": "latest",
"typescript": "latest",
Expand Down
8 changes: 4 additions & 4 deletions packages/component-meta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-component-meta",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand All @@ -12,10 +12,10 @@
"directory": "packages/component-meta"
},
"dependencies": {
"@volar/typescript": "2.2.0-alpha.7",
"@vue/language-core": "2.0.11",
"@volar/typescript": "2.2.0-alpha.8",
"@vue/language-core": "2.0.12",
"path-browserify": "^1.0.1",
"vue-component-type-helpers": "2.0.11"
"vue-component-type-helpers": "2.0.12"
},
"peerDependencies": {
"typescript": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/component-type-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-component-type-helpers",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand Down
12 changes: 10 additions & 2 deletions packages/language-core/lib/generators/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ export function* generate(
}

yield _ts(` {\n`);
yield* resetDirectiveComments('end of v-if start');
if (isFragment(node)) {
yield* resetDirectiveComments('end of v-if start');
}
let prev: CompilerDOM.TemplateChildNode | undefined;
for (const childNode of branch.children) {
yield* generateAstNode(childNode, parentEl, prev, componentCtxVar);
Expand Down Expand Up @@ -557,7 +559,9 @@ export function* generate(
);
yield _ts('!)'); // #3102
yield _ts(') {\n');
yield* resetDirectiveComments('end of v-for start');
if (isFragment(node)) {
yield* resetDirectiveComments('end of v-for start');
}
let prev: CompilerDOM.TemplateChildNode | undefined;
for (const childNode of node.children) {
yield* generateAstNode(childNode, parentEl, prev, componentCtxVar);
Expand Down Expand Up @@ -1800,6 +1804,10 @@ export function* generate(
}
}

function isFragment(node: CompilerDOM.IfNode | CompilerDOM.ForNode) {
return node.codegenNode && 'consequent' in node.codegenNode && 'tag' in node.codegenNode.consequent && node.codegenNode.consequent.tag === CompilerDOM.FRAGMENT;
}

export function createTsAst(ts: typeof import('typescript'), astHolder: any, text: string) {
if (astHolder.__volar_ast_text !== text) {
astHolder.__volar_ast_text = text;
Expand Down
4 changes: 2 additions & 2 deletions packages/language-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/language-core",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand All @@ -12,7 +12,7 @@
"directory": "packages/language-core"
},
"dependencies": {
"@volar/language-core": "2.2.0-alpha.7",
"@volar/language-core": "2.2.0-alpha.8",
"@vue/compiler-dom": "^3.4.0",
"@vue/shared": "^3.4.0",
"computeds": "^0.0.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/language-plugin-pug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/language-plugin-pug",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand All @@ -13,10 +13,10 @@
},
"devDependencies": {
"@types/node": "latest",
"@vue/language-core": "2.0.11"
"@vue/language-core": "2.0.12"
},
"dependencies": {
"@volar/source-map": "2.2.0-alpha.7",
"@volar/source-map": "2.2.0-alpha.8",
"volar-service-pug": "0.0.38"
}
}
12 changes: 6 additions & 6 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/language-server",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand All @@ -15,11 +15,11 @@
"directory": "packages/language-server"
},
"dependencies": {
"@volar/language-core": "2.2.0-alpha.7",
"@volar/language-server": "2.2.0-alpha.7",
"@vue/language-core": "2.0.11",
"@vue/language-service": "2.0.11",
"@vue/typescript-plugin": "2.0.11",
"@volar/language-core": "2.2.0-alpha.8",
"@volar/language-server": "2.2.0-alpha.8",
"@vue/language-core": "2.0.12",
"@vue/language-service": "2.0.12",
"@vue/typescript-plugin": "2.0.12",
"vscode-languageserver-protocol": "^3.17.5"
}
}
2 changes: 1 addition & 1 deletion packages/language-service/data/language-blocks/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@
"valueSet": "v",
"description": {
"kind": "markdown",
"value": "\nUm marcador `<style module>` é compilado como [Módulos de CSS](https://github.com/css-modules/css-modules) e expõe as classes de CSS resultantes ao componente como um objeto sob a chave de `$style`:\n\n```vue\n<template>\n <p :class=\"$style.red\">This should be red</p>\n</template>\n\n<style module>\n.red {\n color: red;\n}\n</style>\n```\n\nAs classes resultantes têm o seu nome gerados com caracteres embaralhados para evitar colisões, alcançando o mesmo efeito de isolar o CSS apenas ao componente atual.\n\nConsulte a [especificação dos Módulos de CSS](https://github.com/css-modules/css-modules) por mais detalhes, tais como [exceções globais](https://github.com/css-modules/css-modules#exceptions) e [composição](https://github.com/css-modules/css-modules#composition).\n\n### Nome de Injeção Personalizado \n\nNós podemos personalizar a chave da propriedade do objeto de classes injetadas dando ao atributo `module` um valor:\n\n```vue\n<template>\n <p :class=\"classes.red\">red</p>\n</template>\n\n<style module=\"classes\">\n.red {\n color: red;\n}\n</style>\n```\n\n### Uso com API de Composição \n\nAs classes injetadas podem ser acessadas na `setup()` e no `<script setup>` através da API `useCssModule`. Para os blocos `<style module>` com nomes de injeção personalizados, `useCssModule` aceita o valor do atributo `module` correspondente como primeiro argumento:\n\n```js\nimport { useCssModule } from 'vue'\n\n// dentro do âmbito de setup()...\n// padrão, retorna as classes do marcador `<style module>`\nuseCssModule()\n\n// personalizado, retorna as classes do marcador `<style module=\"classes\">`\nuseCssModule('classes')\n```\n"
"value": "\nUm marcador `<style module>` é compilado como [Módulos de CSS](https://github.com/css-modules/css-modules) e expõe as classes de CSS resultantes ao componente como um objeto sob a chave de `$style`:\n\n```vue\n<template>\n <p :class=\"$style.red\">This should be red</p>\n</template>\n\n<style module>\n.red {\n color: red;\n}\n</style>\n```\n\nAs classes resultantes têm o seu nome gerados com caracteres embaralhados para evitar colisões, alcançando o mesmo efeito de isolar o CSS apenas ao componente atual.\n\nConsulte a [especificação dos Módulos de CSS](https://github.com/css-modules/css-modules) por mais detalhes, tais como [exceções globais](https://github.com/css-modules/css-modules/blob/master/docs/composition.md#exceptions) e [composição](https://github.com/css-modules/css-modules#composition).\n\n### Nome de Injeção Personalizado \n\nNós podemos personalizar a chave da propriedade do objeto de classes injetadas dando ao atributo `module` um valor:\n\n```vue\n<template>\n <p :class=\"classes.red\">red</p>\n</template>\n\n<style module=\"classes\">\n.red {\n color: red;\n}\n</style>\n```\n\n### Uso com API de Composição \n\nAs classes injetadas podem ser acessadas na `setup()` e no `<script setup>` através da API `useCssModule`. Para os blocos `<style module>` com nomes de injeção personalizados, `useCssModule` aceita o valor do atributo `module` correspondente como primeiro argumento:\n\n```js\nimport { useCssModule } from 'vue'\n\n// dentro do âmbito de setup()...\n// padrão, retorna as classes do marcador `<style module>`\nuseCssModule()\n\n// personalizado, retorna as classes do marcador `<style module=\"classes\">`\nuseCssModule('classes')\n```\n"
},
"references": [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/language-service/data/template/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"name": "Suspense",
"description": {
"kind": "markdown",
"value": "\nUsed for orchestrating nested async dependencies in a component tree.\n\n- **Props**\n\n ```ts\n interface SuspenseProps {\n timeout?: string | number\n }\n ```\n\n- **Events**\n\n - `@resolve`\n - `@pending`\n - `@fallback`\n\n- **Details**\n\n `<Suspense>` accepts two slots: the `#default` slot and the `#fallback` slot. It will display the content of the fallback slot while rendering the default slot in memory.\n\n If it encounters async dependencies ([Async Components](https://vuejs.org/guide/components/async.html) and components with [`async setup()`](https://vuejs.org/guide/built-ins/suspense.html#async-setup)) while rendering the default slot, it will wait until all of them are resolved before displaying the default slot.\n\n- **See also** [Guide - Suspense](https://vuejs.org/guide/built-ins/suspense.html)\n"
"value": "\nUsed for orchestrating nested async dependencies in a component tree.\n\n- **Props**\n\n ```ts\n interface SuspenseProps {\n timeout?: string | number\n suspensible?: boolean\n }\n ```\n\n- **Events**\n\n - `@resolve`\n - `@pending`\n - `@fallback`\n\n- **Details**\n\n `<Suspense>` accepts two slots: the `#default` slot and the `#fallback` slot. It will display the content of the fallback slot while rendering the default slot in memory.\n\n If it encounters async dependencies ([Async Components](https://vuejs.org/guide/components/async.html) and components with [`async setup()`](https://vuejs.org/guide/built-ins/suspense.html#async-setup)) while rendering the default slot, it will wait until all of them are resolved before displaying the default slot.\n\n By setting the Suspense as `suspensible`, all the async dependency handling\n will be handled by the parent Suspense. See [implementation details](https://github.com/vuejs/core/pull/6736)\n\n- **See also** [Guide - Suspense](https://vuejs.org/guide/built-ins/suspense.html)\n"
},
"attributes": [],
"references": [
Expand Down
14 changes: 7 additions & 7 deletions packages/language-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/language-service",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"data",
Expand All @@ -16,13 +16,13 @@
"update-html-data": "node ./scripts/update-html-data.js"
},
"dependencies": {
"@volar/language-core": "2.2.0-alpha.7",
"@volar/language-service": "2.2.0-alpha.7",
"@volar/typescript": "2.2.0-alpha.7",
"@volar/language-core": "2.2.0-alpha.8",
"@volar/language-service": "2.2.0-alpha.8",
"@volar/typescript": "2.2.0-alpha.8",
"@vue/compiler-dom": "^3.4.0",
"@vue/language-core": "2.0.11",
"@vue/language-core": "2.0.12",
"@vue/shared": "^3.4.0",
"@vue/typescript-plugin": "2.0.11",
"@vue/typescript-plugin": "2.0.12",
"computeds": "^0.0.1",
"path-browserify": "^1.0.1",
"volar-service-css": "0.0.38",
Expand All @@ -40,7 +40,7 @@
"devDependencies": {
"@types/node": "latest",
"@types/path-browserify": "latest",
"@volar/kit": "2.2.0-alpha.7",
"@volar/kit": "2.2.0-alpha.8",
"vscode-languageserver-protocol": "^3.17.5"
}
}
6 changes: 3 additions & 3 deletions packages/tsc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-tsc",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"bin",
Expand All @@ -16,8 +16,8 @@
"vue-tsc": "./bin/vue-tsc.js"
},
"dependencies": {
"@volar/typescript": "2.2.0-alpha.7",
"@vue/language-core": "2.0.11",
"@volar/typescript": "2.2.0-alpha.8",
"@vue/language-core": "2.0.12",
"semver": "^7.5.4"
},
"peerDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/typescript-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/typescript-plugin",
"version": "2.0.11",
"version": "2.0.12",
"license": "MIT",
"files": [
"**/*.js",
Expand All @@ -12,8 +12,8 @@
"directory": "packages/typescript-plugin"
},
"dependencies": {
"@volar/typescript": "2.2.0-alpha.7",
"@vue/language-core": "2.0.11",
"@volar/typescript": "2.2.0-alpha.8",
"@vue/language-core": "2.0.12",
"@vue/shared": "^3.4.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 04215cd

Please sign in to comment.