diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index ed952f8895..0000000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @johnsoncodehk @so1ve @KazariEX @zhiyuanzmj @KermanX @davidmatter diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index acee81e741..5f059cff01 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,6 @@ name: "\U0001F41E Bug report" description: Create a report to help us improve +type: Bug labels: ["pending triage"] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index a95927bea0..dfc370f979 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,6 +1,6 @@ name: "\U0001F680 New feature proposal" description: Suggest an idea for this project -labels: ["feature request"] +type: Feature body: - type: markdown attributes: diff --git a/.github/workflows/auto-fix.yml b/.github/workflows/auto-fix.yml index ebdaa68ec9..b8f97ddd67 100644 --- a/.github/workflows/auto-fix.yml +++ b/.github/workflows/auto-fix.yml @@ -3,7 +3,13 @@ name: auto-fix on: push: branches: - - 'master' + - master + pull_request: + branches: + - master + +permissions: + contents: write jobs: auto-fix: diff --git a/.github/workflows/close-cannot-repoduce-issues.yml b/.github/workflows/close-cannot-repoduce-issues.yml new file mode 100644 index 0000000000..c6e3a1eef3 --- /dev/null +++ b/.github/workflows/close-cannot-repoduce-issues.yml @@ -0,0 +1,21 @@ +name: Auto close issues with "can't reproduce" label + +on: + schedule: + - cron: '0 0 * * *' + +permissions: + issues: write + +jobs: + close-issues: + if: github.repository == 'vuejs/language-tools' + runs-on: ubuntu-latest + steps: + - name: can't reproduce + uses: actions-cool/issues-helper@v3 + with: + actions: close-issues + token: ${{ secrets.GITHUB_TOKEN }} + labels: "can't reproduce" + inactive-day: 3 diff --git a/.github/workflows/extension-build.yml b/.github/workflows/extension-build.yml new file mode 100644 index 0000000000..637f439b95 --- /dev/null +++ b/.github/workflows/extension-build.yml @@ -0,0 +1,31 @@ +name: extension + +on: + push: + branches: + - 'master' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm run build && pnpm --filter volar run pack + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: extensions + path: ./extensions/vscode/volar-*.vsix diff --git a/.github/workflows/extension-release.yml b/.github/workflows/extension-release.yml new file mode 100644 index 0000000000..d7ea870bc0 --- /dev/null +++ b/.github/workflows/extension-release.yml @@ -0,0 +1,40 @@ +name: extension + +on: + workflow_dispatch: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install -g ovsx && pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build && pnpm --filter volar run build:prod + + - name: Publish + run: | + VERSION=$(jq -r .version package.json) + if [[ "$VERSION" == *-* ]]; then + echo "Detected prerelease version: $VERSION" + pnpm ovsx publish --pre-release + else + echo "Detected stable release version: $VERSION" + pnpm ovsx publish + fi + working-directory: extensions/vscode + env: + OVSX_PAT: ${{ secrets.OVSX_PAT }} diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml index 8d9c819f06..033250d0fd 100644 --- a/.github/workflows/pkg.pr.new.yml +++ b/.github/workflows/pkg.pr.new.yml @@ -1,4 +1,5 @@ -name: Publish Any Commit +name: publish-any-commit + on: [push, pull_request] jobs: @@ -6,14 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 - - run: corepack enable - uses: actions/setup-node@v4 with: node-version: 20 - cache: "pnpm" + cache: pnpm - name: Install dependencies run: pnpm install diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 01e60841a7..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: release - -on: - workflow_dispatch: - push: - tags: - - '*' - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4 - - - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - run: pnpm install -g ovsx - - run: pnpm install --frozen-lockfile - - run: pnpm run build:minify && pnpm ovsx publish - working-directory: extensions/vscode - env: - OVSX_PAT: ${{ secrets.OVSX_PAT }} - # - run: pnpm ovsx publish - # working-directory: extensions/vscode-typescript-plugin - # env: - # OVSX_PAT: ${{ secrets.OVSX_PAT }} diff --git a/.github/workflows/update-html-data.yml b/.github/workflows/update-html-data.yml index fde2f6bccf..b228081acd 100644 --- a/.github/workflows/update-html-data.yml +++ b/.github/workflows/update-html-data.yml @@ -1,6 +1,9 @@ name: update-html-data on: + push: + branches: + - 'master' workflow_dispatch: schedule: - cron: '0 0 * * *' diff --git a/.vscode/settings.json b/.vscode/settings.json index da50bdc4ff..0efd9ce70d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,9 @@ "typescript.format.semicolons": "insert", "editor.insertSpaces": false, "editor.detectIndentation": false, + "editor.codeActionsOnSave": { + "source.organizeImports": "always" + }, "json.format.keepLines": true, "typescript.tsdk": "node_modules/typescript/lib", "[typescript]": { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 070d88eb16..00b138e8a6 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -25,9 +25,16 @@ "panel": "dedicated", "reveal": "never" }, - "problemMatcher": [ - "$tsc-watch" - ] + "problemMatcher": { + "pattern": { + "regexp": "__________" + }, + "background": { + "activeOnStart": true, + "beginsPattern": " ", + "endsPattern": "Waiting for changes..." + } + } } ] } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e27573f7a..340a9006fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,181 @@ > [Join the Insiders Program](https://github.com/vuejs/language-tools/wiki/Get-Insiders-Edition) for more exclusive features and updates. +## 2.2.10 official (2025-04-22) + +## Bug Fixes + +- fix(language-core): generate condition guards for model events (#5225) - Thanks to @KazariEX! +- fix(language-core): prevent global types generation in declaration files (#5239) - Thanks to @KazariEX! +- fix(language-core): prevent eager inference of slot props from generics (#5247) - Thanks to @KazariEX! +- fix(typescript-plugin): prevent highlighting native element tags with same name as components (#5253) - Thanks to @KazariEX! + +## 2.2.8 official, 2.2.9 insiders (2025-03-02) + +### Bug Fixes + +- revert "fix(language-core): validate `v-model` variable against model type" + +## 2.2.6 official, 2.2.7 insiders (2025-03-01) + +### Features + +- feat(language-core): infer prop JSDoc from `defineModel`'s leading comments (#5211) - Thanks to @KazariEX! + +### Bug Fixes + +- fix(language-core): map camelized prop name correctly (#5207) - Thanks to @KazariEX! +- fix(component-meta): resolve `defineModel` options to collect `default` value (#5209) - Thanks to @KazariEX! +- fix(language-core): avoid duplicate generation of `defineExpose`'s codes - Thanks to @KazariEX! +- fix(language-core): generate camelized prop name for `defineModel` (#5213) - Thanks to @KazariEX! +- fix(language-core): validate `v-model` variable against model type (#5214) - Thanks to @KazariEX! +- fix(language-core): use keywords instead of semicolons to separate script sections (#5217) - Thanks to @KazariEX! + +### Other Changes + +- ci: auto close issues with `can't reproduce` label - Thanks to @KazariEX! +- refactor(language-core): defer the calculation of `linkedCodeMappings` offsets (#5220) - Thanks to @KazariEX! + +## 2.2.4 official, 2.2.5 insiders (2025-02-22) + +### Features + +- feat(language-service): map sfc compiler errors outside the template inner content (#5045) - Thanks to @KazariEX! +- feat(language-core): introduce options to control type inference of `$attrs`, `$el`, `$refs` and `$slots` (#5135) - Thanks to @KazariEX! +- feat(language-core): enhance single root nodes collection (#4819) - Thanks to @KazariEX! + +### Bug Fixes + +- fix(language-core): move `generateSfcBlockSection` to the end to fix missing comma errors (#5184) - Thanks to @zhiyuanzmj! +- fix(language-core): handle edge case of default slot name mismatch - Thanks to @KazariEX! +- fix(language-core): combine dollar variable keys from the upper level interface - Thanks to @KazariEX! +- fix(language-core): hoist the variables that may cause `TS4081` (#5192) - Thanks to @KazariEX! +- fix(language-core): adjust regex match for `@vue-generic` to improve offset calculation (#5193) - Thanks to @Gehbt! +- fix(language-core): correct codegen of native element refs - Thanks to @KazariEX! +- fix(language-core): ignore latex block content (#5151) - Thanks to @KazariEX! +- fix(language-core): do not emit `undefined` for model with default value (#5198) - Thanks to @RylanBueckert-Broadsign! +- fix(language-service): typescript-semantic renaming first in style blocks (#4685) - Thanks to @KazariEX! +- fix(typescript-plugin): prevent removed components from appearing in the completion list - Thanks to @KazariEX! + +### Other Changes + +- refactor(language-core): drop invalid `v-scope` implemention - Thanks to @KazariEX! +- refactor(language-core): improve type declaration of `v-for` - Thanks to @KazariEX! +- test: enable `declaration` to track more errors - Thanks to @KazariEX! +- refactor(language-core): remove semantic highlight of style module names - Thanks to @KazariEX! +- chore(language-core): add docs for `@vue-expect-error` support (#5176) - Thanks to @machty! +- ci: upload extension as artifact for each commit - Thanks to @KazariEX! + +## 2.2.2 official, 2.2.3 insiders (2025-02-15) + +### Features + +- feat(language-core): navigation support for `$attrs`, `$slots`, `$refs` and `$el` in the template (#5056) - Thanks to @KazariEX! +- feat(language-service): support global directives completion (#4989) - Thanks to @KazariEX! +- feat(language-core): type support of `useAttrs` (#5106) - Thanks to @KazariEX! +- feat(language-core): add options for fine-grained configuration of `strictTemplates` (#5138) +- feat(language-service): display deprecated info of props in completion (#5134) - Thanks to @KazariEX! +- feat(component-meta): collect destructured props defaults (#5101) - Thanks to @Akryum! +- feat(language-core): add `checkUnknownDirectives` option (#5141) - Thanks to @KazariEX! +- feat(language-core): support `\n```", + "configuration.inlayHints.vBindShorthand": "v-bind の省略記法のインレイヒントを表示します:\n\n```html\n\n \n```", + "configuration.format.template.initialIndent": "`