Skip to content

Commit

Permalink
Merge branch 'master' into pr/4661
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Oct 22, 2024
2 parents 96d34ee + b17ef78 commit 962f1b4
Show file tree
Hide file tree
Showing 160 changed files with 3,322 additions and 2,289 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @johnsoncodehk @so1ve @KazariEX @zhiyuanzmj @KermanX @davidmatter
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ body:
description: Output of `npx envinfo --system --binaries --browsers`
render: shell
placeholder: System, Binaries, Browsers
- type: textarea
id: dependencies
attributes:
label: package.json dependencies
description: You may add your list of dependencies here as it helps us to investigate your report.
render: json
placeholder: |
{
"dependencies": {},
"devDependencies": {},
}
- type: textarea
id: steps-to-reproduce
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

# lint
- name: Auto-fix
run: npm run lint:fix
run: pnpm run lint:fix

# commit
- name: Commit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-html-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

# update data
- name: Update HTML Data
run: cd packages/language-service && npm run update-html-data
run: cd packages/language-service && pnpm run update-html-data

# commit
- name: Commit
Expand Down
133 changes: 132 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,137 @@

> [Join the Insiders Program](https://github.com/vuejs/language-tools/wiki/Get-Insiders-Edition) for more exclusive features and updates.
## 2.1.6 <sup>official</sup>, 2.1.7 <sup>insiders</sup> (2024-09-05)

### Features

- **language-plugin-pug:** support initial indentation (#4774)
- **language-service:** JSDoc display support when typing props on component template (#4796) - Thanks to @joy-yu!
- **language-core:** typed directives in template (#4807) - Thanks to @KazariEX!

### Bug Fixes

- **language-core:** wrap template refs with `unref` in interpolation (#4777) - Thanks to @KazariEX!
- **language-core:** ensure to pass tsc on inline global types (#4782) - Thanks to @KazariEX!
- **language-core:** infer native template ref as build-in element interface (#4786) - Thanks to @KazariEX!
- **language-core:** generate `__VLS_StyleModules` after template (#4790) - Thanks to @KazariEX!
- **language-core:** make `expose` of non-generic template ref required (#4795) - Thanks to @zhiyuanzmj!
- **language-core:** avoid using `__typeProps` with runtime props (#4800) - Thanks to @KazariEX!
- **language-core:** ignore unknown attrs error when strictTemplates is not enabled (#4785)
- **language-core:** prevent append globalTypes to virtual file (#4806) - Thanks to @zhiyuanzmj!
- **language-core:** prevent type error when use defineSlots and non-template (#4809) - Thanks to @zhiyuanzmj!
- **typescript-plugin:** disconnect socket on error (#4672)

### Performance

- **language-core:** don't emit event lnlayhint when content is none (#4776) - Thanks to @Gehbt!

### Other Changes

- **language-core:** split `__VLS_templateResult` (#4781) - Thanks to @KazariEX!
- **language-core:** wrap template virtual code into a function (#4784)
- **language-core:** move `templateRef` into `composibles` (#4791) - Thanks to @KazariEX!
- **language-core:** generate global types for the first parsed Vue component if cannot write global types file

### Tests

- **language-server:** add renaming case for template `ref()` (#4794) - Thanks to @KazariEX!
- **tsc:** update to Vue 3.5 (#4725)
- **tsc:** unknown props on non-strict generic component (#4792)

## 2.1.4 <sup>official</sup>, 2.1.5 <sup>insiders</sup> (2024-09-01)

### Features

- **typescript-plugin, language-server:** generate global types file into `node_modules/.vue-global-types` (#4752) - Thanks to @KazariEX!
- **language-core:** navigation support for template-ref (#4726) - Thanks to @KazariEX!

### Bug Fixes

- **language-core, typescript-plugin, language-server:** apply snake case on globalTypes filename (#4749) - Thanks to @KazariEX!
- **language-core:** hoist `$refs` type (#4763)
- **language-core:** disable lib check on global types file (#4767) - Thanks to @KazariEX!
- **language-core:** prevent circular reference of templateRef (#4768) - Thanks to @zhiyuanzmj!
- **language-core:** using interface merging for `GlobalComponents`
- **language-core:** `fallthroughAttributes` causes global components to be self-referential (#4761)
- **language-core:** auto-completion for the last line of template block (#4771) - Thanks to @zhiyuanzmj!
- **language-core:** update ast correctly on repeated `v-for` modifications (#4772) - Thanks to @KazariEX!
- **language-server:** leaking named pipes (#4672)
- **typescript-plugin:** compatible with Yarn PnP (#4751)
- **vscode:** whitelist `ms-dynamics-smb.al` extension for Vue Hybrid Mode. (#4765) - Thanks to @kyleweishaupt!

### Other Changes

- Add optional "dependencies" textarea to issue template (#4758) - Thanks to @davidmatter!

## 2.1.2 <sup>official</sup>, 2.1.3 <sup>insiders</sup> (2024-08-29)

### Bug Fixes

- **language-core, typescript-plugin, language-server:** write globalTypes into dist for correct export (#4740) (#4737) (#4738) (#4739) - Thanks to @KazariEX!
- **language-core:** don't default `vueCompilerOptions.lib` to `@vue/runtime-dom` for Vue 2

## 2.1.0 <sup>official</sup>, 2.1.1 <sup>insiders</sup> (2024-08-29)

### Features

- **language-core:** inlay hints for destructured props (#4634) - Thanks to @KazariEX!
- **language-core:** typed fallthrough attributes (#4103) - Thanks to @A5rocks, @so1ve!
- **language-core:** document links for classname within `:class` (#4642) - Thanks to @KazariEX!
- **language-core:** auto infer type for $refs & useTemplateRef (#4644) - Thanks to @zhiyuanzmj!
- **language-core:** type support for CSS Modules API (#4674) - Thanks to @KazariEX!
- **language-service:** better completion for directives (#4640) - Thanks to @KazariEX!
- **language-service:** better sorting & filtering of completion (#4671) - Thanks to @KazariEX!
- **language-service:** add style scoped and module completion (#4705) - Thanks to @runyasak!

### Bug Fixes

- **vscode:** type of `vue.server.hybridMode` config (#4703) - Thanks to @KermanX!
- **language-core:** dependency on vulnerable version of `vue-template-compiler` (#4613) - Thanks to @yyx990803!
- **language-core:** support parse method to access ctx var in object (#4609) - Thanks to @linghaoSu!
- **language-core:** escape \ and ' in className avoid type error (#4619) - Thanks to @linghaoSu!
- **language-core:** semantic highlight of the end tag of namespaced elements (#4623) - Thanks to @KermanX!
- **language-core:** nullable modelvalues (#4648) - Thanks to @davidmatter!
- **language-core:** should try casting dynamic slot name into constant (#4669) - Thanks to @KermanX!
- **language-core:** local name support for prop using runtime api (#4650) - Thanks to @KazariEX!
- **language-core:** optimize matching of scoped class and `v-bind()` (#4679) - Thanks to @KazariEX!
- **language-core:** should preserve generic info in directive (#4686) - Thanks to @KermanX!
- **language-core:** generate `ref` as identifier instead of interpolation (#4688) - Thanks to @KazariEX!
- **language-core:** correct type narrowing from script to template (#4689) - Thanks to @KazariEX!
- **language-core:** should camelize prop name in `experimentalModelPropName` (#4691) - Thanks to @KermanX!
- **language-core:** drop duplicate hints on incomplete tag (#4696) - Thanks to @KazariEX!
- **language-core:** correct inlay hints for v-bind with modifier (#4721) - Thanks to @KazariEX!
- **language-core:** transform range of `file-md` correctly (#4735) - Thanks to @KazariEX!
- **language-plugin-pug:** should cache proxyed object (#4626) - Thanks to @KermanX!
- **language-plugin-pug:** compute offset correctly of pug class (#4652) - Thanks to @KazariEX!
- **language-service:** completion documentations for binding attributes (#4667) - Thanks to @KazariEX!
- **language-service:** avoid converting internal id of special tags (#4643) - Thanks to @KazariEX!
- **language-service:** reinstate the completion for modifiers (#4639) - Thanks to @KazariEX!
- **language-service:** consistent data from provider for sfc completion (#4645) - Thanks to @KazariEX!
- **typescript-plugin:** unknown request type warning (#4715) - Thanks to @davidmatter!

### Refactors

- **language-core:** extract SFC root tags to separate virtual code
- **language-core:** removed `__hint` trick from codegen
- **language-core:** rewrite a part of confusing codegen code
- **language-core:** reduce virtual code generated by component tags (#4714)
- **language-core:** do not wrap template virtual code with function (#4731)
- **language-core**: write real files to FS for shared global types (#4736)
- **component-meta:** remove deprecated `createComponentMetaCheckerByJsonConfig`, `createComponentMetaChecker` api

### Other Changes

- Upgraded Volar from `v2.4.0-alpha.18` to `v2.4.1`:
- Ensure unopened files are synced to project (#4711) (#4632) - Thanks to @davidmatter!
- **ci:** integrated [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
- **tsc:** test all typecheck cases in one tsconfig (#4723)
- **tsc:** add test for TS-next (#4724)
- **tsc:** add tests for for #3779, #3820 (#3838) - Thanks to @so1ve!
- **vscode:** add grammar test (#3861) - Thanks to @so1ve!
- **language-service:** migrate tests to `@volar/test-utils` (#4719)
- **language-core:** add scoped classes renaming case (#4727) - Thanks to @KazariEX!

## 2.0.28 <sup>official</sup>, 2.0.29 <sup>insiders</sup> (2024-07-22)

### Features
Expand All @@ -15,7 +146,7 @@
- **language-service:** remove `v-bind` code action (#4601)
- **vscode:** add empty pattern to codeblock attributes scope (#4590) - Thanks @KermanX

### Fixes
### Bug Fixes

- **tsc:** errors should be thrown instead of being console.log printed
- **language-server:** observe named pipes changes when server startup (#4292)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ lspconfig.tsserver.setup {
},
},
},
}

lspconfig.volar.setup {
init_options = {
vue = {
hybridMode = false,
},
},
},
}
```

### nvim-cmp integration
Expand Down
33 changes: 18 additions & 15 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.28",
"version": "2.1.6",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
Expand Down Expand Up @@ -255,7 +255,10 @@
"description": "Traces the communication between VS Code and the language server."
},
"vue.server.hybridMode": {
"type": ["boolean", "string"],
"type": [
"boolean",
"string"
],
"default": "auto",
"enum": [
"auto",
Expand Down Expand Up @@ -386,7 +389,7 @@
"vue.inlayHints.destructuredProps": {
"type": "boolean",
"default": false,
"description": "Show inlay hints for destructured prop."
"description": "Show inlay hints for destructured props."
},
"vue.inlayHints.missingProps": {
"type": "boolean",
Expand Down Expand Up @@ -535,24 +538,24 @@
]
},
"scripts": {
"prebuild": "cd ../.. && npm run build",
"prebuild": "cd ../.. && pnpm run build",
"build": "node scripts/build",
"build:minify": "npm run build -- --minify",
"watch": "npm run build -- --watch",
"pack": "npm run build:minify && vsce package",
"pack:next": "npm run build && vsce package",
"release": "npm run build:minify && vsce publish",
"release:next": "npm run build && vsce publish --pre-release",
"size": "npm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
"build:minify": "pnpm run build -- --minify",
"watch": "pnpm run build -- --watch",
"pack": "pnpm run build:minify && vsce package",
"pack:next": "pnpm run build && vsce package",
"release": "pnpm run build:minify && vsce publish",
"release:next": "pnpm run build && vsce publish --pre-release",
"size": "pnpm run build:minify -- --metafile && esbuild-visualizer --metadata ./meta.json && open ./stats.html"
},
"devDependencies": {
"@types/semver": "^7.5.3",
"@types/vscode": "^1.82.0",
"@volar/vscode": "~2.4.0",
"@volar/vscode": "~2.4.1",
"@vscode/vsce": "latest",
"@vue/language-core": "2.0.28",
"@vue/language-server": "2.0.28",
"@vue/typescript-plugin": "2.0.28",
"@vue/language-core": "2.1.6",
"@vue/language-server": "2.1.6",
"@vue/typescript-plugin": "2.1.6",
"esbuild": "~0.21.0",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
Expand Down
3 changes: 2 additions & 1 deletion extensions/vscode/src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ function isExtensionCompatibleWithHybridMode(extension: vscode.Extension<any>) {
|| extension.id === 'Divlo.vscode-styled-jsx-languageserver'
|| extension.id === 'nrwl.angular-console'
|| extension.id === 'ShenQingchuan.vue-vine-extension'
|| extension.id === 'ms-dynamics-smb.al'
) {
return true;
}
Expand Down Expand Up @@ -263,7 +264,7 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang
]) {
try {
const res = await fetch(url);
onJson(await res.json());
onJson(await res.json() as any);
succeed = true;
break;
} catch { }
Expand Down
26 changes: 25 additions & 1 deletion insiders.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
{
"latest": "2.0.29-alpha.1",
"latest": "2.1.7",
"versions": [
{
"version": "2.1.7",
"date": "2024-9-5",
"downloads": {
"GitHub": "https://github.com/volarjs/insiders/releases/tag/v2.1.7",
"AFDIAN": "https://afdian.com/p/bd258ca66af211efb39a5254001e7c00"
}
},
{
"version": "2.1.5",
"date": "2024-9-1",
"downloads": {
"GitHub": "https://github.com/volarjs/insiders/releases/tag/v2.1.5",
"AFDIAN": "https://afdian.com/p/cb02b2e067cd11ef89c852540025c377"
}
},
{
"version": "2.1.1",
"date": "2024-8-29",
"downloads": {
"GitHub": "https://github.com/volarjs/insiders/releases/tag/v2.1.1",
"AFDIAN": "https://afdian.com/p/8e25a7d6659f11efa87452540025c377"
}
},
{
"version": "2.0.29-alpha.1",
"date": "2024-7-26",
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.28"
"version": "2.1.6"
}
38 changes: 12 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,31 @@
"packageManager": "pnpm@9.4.0",
"scripts": {
"build": "tsc -b",
"watch": "npm run build && (npm run watch:base & npm run watch:vue)",
"watch": "pnpm run build && pnpm run \"/^watch:.*/\"",
"watch:base": "tsc -b -w",
"watch:vue": "cd ./extensions/vscode && npm run watch",
"prerelease": "npm run build && npm run test",
"version:test": "lerna version --exact --force-publish --yes --sync-workspace-lock --no-push --no-git-tag-version",
"release": "npm run release:base && npm run release:vue",
"release:base": "lerna publish --exact --force-publish --yes --sync-workspace-lock",
"release:vue": "cd ./extensions/vscode && npm run release",
"release:next": "npm run release:next-base && npm run release:next-vue",
"release:next-base": "npm run release:base -- --dist-tag next",
"release:next-vue": "cd ./extensions/vscode && npm run release:next",
"watch:vue": "cd ./extensions/vscode && pnpm run watch",
"prerelease": "pnpm run build && pnpm run test",
"version": "lerna version --exact --force-publish --yes --sync-workspace-lock --no-push --no-git-tag-version",
"release": "pnpm run release:base && pnpm run release:vue",
"release:base": "lerna publish --exact --force-publish --yes --sync-workspace-lock --no-git-tag-version",
"release:vue": "cd ./extensions/vscode && pnpm run release",
"release:next": "pnpm run release:next-base && pnpm run release:next-vue",
"release:next-base": "pnpm run release:base -- --dist-tag next",
"release:next-vue": "cd ./extensions/vscode && pnpm run release:next",
"test": "vitest run",
"test:update": "vitest run --update",
"lint": "tsslint --projects {tsconfig.json,packages/*/tsconfig.json,extensions/*/tsconfig.json}",
"lint:fix": "npm run lint -- --fix",
"lint:fix": "pnpm run lint -- --fix",
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
},
"devDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"@volar/language-service": "~2.4.0",
"@volar/language-service": "~2.4.1",
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
},
"pnpm": {
"overrides": {
"@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee",
"@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee",
"@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee",
"@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee",
"@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee",
"@volar/test-utils": "https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@28cbdee",
"@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee",
"@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee",
"volar-service-typescript": "https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed",
"inquirer": "9.2.23"
}
}
}
10 changes: 0 additions & 10 deletions packages/component-meta/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ import type { MetaCheckerOptions } from './lib/types';

export * from './lib/types';

/**
* @deprecated Use `createCheckerByJson` instead.
*/
export const createComponentMetaCheckerByJsonConfig = createCheckerByJson;

/**
* @deprecated Use `createChecker` instead.
*/
export const createComponentMetaChecker = createChecker;

export function createCheckerByJson(
rootPath: string,
json: any,
Expand Down
Loading

0 comments on commit 962f1b4

Please sign in to comment.