From 0e52a2d21fdd7c68447b7cd3d5c06876762cdc8b Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 16 Aug 2024 22:25:03 +0800 Subject: [PATCH 01/37] chore: bump next volar --- package.json | 15 ++-- pnpm-lock.yaml | 201 +++++++++++++++++++++++-------------------------- 2 files changed, 102 insertions(+), 114 deletions(-) diff --git a/package.json b/package.json index 3f8b522a06..e8bd01a1ac 100644 --- a/package.json +++ b/package.json @@ -31,14 +31,13 @@ }, "pnpm": { "overrides": { - "@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382", - "@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382", - "@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382", - "@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382", - "@volar/snapshot-document": "https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382", - "@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382", - "@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382", - "@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382", + "@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034", + "@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034", + "@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034", + "@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034", + "@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034", + "@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034", + "@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034", "volar-service-css": "https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3", "volar-service-emmet": "https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3", "volar-service-html": "https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55b14ddf48..da78f2aab2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,14 +5,13 @@ settings: excludeLinksFromLockfile: false overrides: - '@volar/kit': https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382 - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 - '@volar/snapshot-document': https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382 - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - '@volar/vscode': https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382 + '@volar/kit': https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + '@volar/vscode': https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 volar-service-css: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 volar-service-emmet: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 @@ -42,8 +41,8 @@ importers: specifier: latest version: 1.0.14 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 typescript: specifier: latest version: 5.5.3 @@ -63,8 +62,8 @@ importers: specifier: ^1.82.0 version: 1.91.0 '@volar/vscode': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 '@vscode/vsce': specifier: latest version: 3.0.0 @@ -93,8 +92,8 @@ importers: packages/component-meta: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -120,8 +119,8 @@ importers: packages/language-core: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -157,8 +156,8 @@ importers: specifier: ^1.0.1 version: 1.0.2 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 '@vue/compiler-sfc': specifier: ^3.4.0 version: 3.4.31 @@ -166,8 +165,8 @@ importers: packages/language-plugin-pug: dependencies: '@volar/source-map': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 volar-service-pug: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 @@ -182,11 +181,11 @@ importers: packages/language-server: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 '@volar/language-server': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -206,14 +205,14 @@ importers: packages/language-service: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -234,28 +233,28 @@ importers: version: 1.0.1 volar-service-css: specifier: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-emmet: specifier: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-html: specifier: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-json: specifier: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-pug: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 volar-service-pug-beautify: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-typescript: specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) volar-service-typescript-twoslash-queries: specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + version: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) vscode-html-languageservice: specifier: ^5.2.0 version: 5.3.0 @@ -273,8 +272,8 @@ importers: specifier: latest version: 1.0.2 '@volar/kit': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382(typescript@5.5.3) + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034(typescript@5.5.3) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -282,8 +281,8 @@ importers: packages/tsc: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -301,8 +300,8 @@ importers: packages/typescript-plugin: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -1109,38 +1108,34 @@ packages: '@vitest/utils@2.0.3': resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382} + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034} version: 2.4.0-alpha.18 peerDependencies: typescript: '*' - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382} + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034} version: 2.4.0-alpha.18 - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382} + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034} version: 2.4.0-alpha.18 - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382} + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034} version: 2.4.0-alpha.18 - '@volar/snapshot-document@https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382} + '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034} version: 2.4.0-alpha.18 - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382} + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034} version: 2.4.0-alpha.18 - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382} - version: 2.4.0-alpha.18 - - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382} + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034} version: 2.4.0-alpha.18 '@vscode/emmet-helper@2.9.3': @@ -3306,7 +3301,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3315,7 +3310,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3324,7 +3319,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3333,7 +3328,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3342,7 +3337,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3355,7 +3350,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3364,7 +3359,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 peerDependenciesMeta: '@volar/language-service': optional: true @@ -4387,25 +4382,24 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ed93382(typescript@5.5.3)': + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034(typescript@5.5.3)': dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 typesafe-path: 0.2.2 typescript: 5.5.3 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382': + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034': dependencies: - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382 + '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382': + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 - '@volar/snapshot-document': https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -4413,29 +4407,24 @@ snapshots: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382': + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/snapshot-document@https://pkg.pr.new/volarjs/volar.js/@volar/snapshot-document@ed93382': - dependencies: - vscode-languageserver-protocol: 3.17.5 - vscode-languageserver-textdocument: 1.0.11 - - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ed93382': {} + '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034': {} - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ed93382': + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ed93382 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ed93382': + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034': dependencies: - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ed93382 + '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 path-browserify: 1.0.1 vscode-languageclient: 9.0.1 vscode-nls: 5.2.0 @@ -6797,61 +6786,61 @@ snapshots: - supports-color - terser - volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: vscode-css-languageservice: 6.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: vscode-json-languageservice: 5.4.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 volar-service-pug@https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3: dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 muggle-string: 0.4.1 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382) + volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 - volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382): + volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): dependencies: path-browserify: 1.0.1 semver: 7.6.2 @@ -6860,7 +6849,7 @@ snapshots: vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ed93382 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 vscode-css-languageservice@6.3.0: dependencies: From 2e559dbd4658fc0331200912c81128ff313d7857 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 18 Aug 2024 10:20:02 +0800 Subject: [PATCH 02/37] chore: bump next volar --- extensions/vscode/src/common.ts | 1 - package.json | 14 +- .../language-server/lib/hybridModeProject.ts | 11 +- packages/language-server/lib/initialize.ts | 2 +- .../lib/plugins/vue-document-drop.ts | 2 +- pnpm-lock.yaml | 190 +++++++++--------- 6 files changed, 109 insertions(+), 111 deletions(-) diff --git a/extensions/vscode/src/common.ts b/extensions/vscode/src/common.ts index 985eefaf31..3cbdce7cb7 100644 --- a/extensions/vscode/src/common.ts +++ b/extensions/vscode/src/common.ts @@ -234,7 +234,6 @@ async function doActivate(context: vscode.ExtensionContext, createLc: CreateLang lsp.activateAutoInsertion(selectors, client); lsp.activateDocumentDropEdit(selectors, client); lsp.activateWriteVirtualFiles('vue.action.writeVirtualFiles', client); - lsp.activateServerSys(client); if (!enabledHybridMode) { lsp.activateTsConfigStatusItem(selectors, 'vue.tsconfig', client); diff --git a/package.json b/package.json index e8bd01a1ac..925cd9ddaa 100644 --- a/package.json +++ b/package.json @@ -31,13 +31,13 @@ }, "pnpm": { "overrides": { - "@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034", - "@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034", - "@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034", - "@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034", - "@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034", - "@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034", - "@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034", + "@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192", + "@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192", + "@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192", + "@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192", + "@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192", + "@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192", + "@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192", "volar-service-css": "https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3", "volar-service-emmet": "https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3", "volar-service-html": "https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3", diff --git a/packages/language-server/lib/hybridModeProject.ts b/packages/language-server/lib/hybridModeProject.ts index 91a408bd57..b7e27df265 100644 --- a/packages/language-server/lib/hybridModeProject.ts +++ b/packages/language-server/lib/hybridModeProject.ts @@ -25,9 +25,9 @@ export function createHybridModeProject( setup(_server) { server = _server; onSomePipeReadyCallbacks.push(() => { - server.diagnosticsSupport?.refresh(project, false); + server.languageFeatures.refreshDiagnostics(false); }); - server.onDidChangeWatchedFiles(({ changes }) => { + server.fileWatcher.onDidChangeWatchedFiles(({ changes }) => { for (const change of changes) { const changeUri = URI.parse(change.uri); if (tsconfigProjects.has(changeUri)) { @@ -90,11 +90,10 @@ export function createHybridModeProject( asFileName, }); const language = createLanguage([ - { getLanguageId: uri => server.documents.get(server.getSyncedDocumentKey(uri) ?? uri.toString())?.languageId }, + { getLanguageId: uri => server.documents.get(uri)?.languageId }, ...languagePlugins, ], createUriMap(), uri => { - const documentKey = server.getSyncedDocumentKey(uri); - const document = documentKey ? server.documents.get(documentKey) : undefined; + const document = server.documents.get(uri); if (document) { language.scripts.set(uri, document.getSnapshot(), document.languageId); } @@ -107,7 +106,7 @@ export function createHybridModeProject( return createLanguageService( language, server.languageServicePlugins, - createLanguageServiceEnvironment(server, [...server.workspaceFolders.keys()]), + createLanguageServiceEnvironment(server, [...server.workspaceFolders.all]), project ); } diff --git a/packages/language-server/lib/initialize.ts b/packages/language-server/lib/initialize.ts index 042e6d13f5..0ef344ed69 100644 --- a/packages/language-server/lib/initialize.ts +++ b/packages/language-server/lib/initialize.ts @@ -70,7 +70,7 @@ export function initialize( watchingExtensions.add(ext); } fileWatcher?.then(dispose => dispose.dispose()); - fileWatcher = server.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']); + fileWatcher = server.fileWatcher.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']); } } } diff --git a/packages/language-service/lib/plugins/vue-document-drop.ts b/packages/language-service/lib/plugins/vue-document-drop.ts index 4d84d994eb..f7fdaaf859 100644 --- a/packages/language-service/lib/plugins/vue-document-drop.ts +++ b/packages/language-service/lib/plugins/vue-document-drop.ts @@ -14,7 +14,7 @@ export function create( return { name: 'vue-document-drop', capabilities: { - // documentDropEditsProvider: true, + documentDropEditsProvider: true, }, create(context): LanguageServicePluginInstance { if (!context.project.vue) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da78f2aab2..f4404c0ab9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,13 +5,13 @@ settings: excludeLinksFromLockfile: false overrides: - '@volar/kit': https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034 - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - '@volar/vscode': https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 + '@volar/kit': https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + '@volar/vscode': https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 volar-service-css: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 volar-service-emmet: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 @@ -41,8 +41,8 @@ importers: specifier: latest version: 1.0.14 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 typescript: specifier: latest version: 5.5.3 @@ -62,8 +62,8 @@ importers: specifier: ^1.82.0 version: 1.91.0 '@volar/vscode': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 '@vscode/vsce': specifier: latest version: 3.0.0 @@ -92,8 +92,8 @@ importers: packages/component-meta: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -119,8 +119,8 @@ importers: packages/language-core: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -156,8 +156,8 @@ importers: specifier: ^1.0.1 version: 1.0.2 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 '@vue/compiler-sfc': specifier: ^3.4.0 version: 3.4.31 @@ -165,8 +165,8 @@ importers: packages/language-plugin-pug: dependencies: '@volar/source-map': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 volar-service-pug: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 @@ -181,11 +181,11 @@ importers: packages/language-server: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 '@volar/language-server': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -205,14 +205,14 @@ importers: packages/language-service: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -233,28 +233,28 @@ importers: version: 1.0.1 volar-service-css: specifier: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-emmet: specifier: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-html: specifier: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-json: specifier: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-pug: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 volar-service-pug-beautify: specifier: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-typescript: specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) volar-service-typescript-twoslash-queries: specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + version: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) vscode-html-languageservice: specifier: ^5.2.0 version: 5.3.0 @@ -272,8 +272,8 @@ importers: specifier: latest version: 1.0.2 '@volar/kit': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034(typescript@5.5.3) + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192(typescript@5.5.3) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -281,8 +281,8 @@ importers: packages/tsc: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -300,8 +300,8 @@ importers: packages/typescript-plugin: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -1108,34 +1108,34 @@ packages: '@vitest/utils@2.0.3': resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034} + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192} version: 2.4.0-alpha.18 peerDependencies: typescript: '*' - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034} + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192} version: 2.4.0-alpha.18 - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034} + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192} version: 2.4.0-alpha.18 - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034} + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192} version: 2.4.0-alpha.18 - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034} + '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192} version: 2.4.0-alpha.18 - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034} + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192} version: 2.4.0-alpha.18 - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034} + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192} version: 2.4.0-alpha.18 '@vscode/emmet-helper@2.9.3': @@ -3301,7 +3301,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3310,7 +3310,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3319,7 +3319,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3328,7 +3328,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3337,7 +3337,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3350,7 +3350,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -3359,7 +3359,7 @@ packages: resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3} version: 0.0.59 peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 peerDependenciesMeta: '@volar/language-service': optional: true @@ -4382,24 +4382,24 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@7f93034(typescript@5.5.3)': + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192(typescript@5.5.3)': dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 typesafe-path: 0.2.2 typescript: 5.5.3 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034': + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192': dependencies: - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034 + '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034': + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -4407,24 +4407,24 @@ snapshots: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034': + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@7f93034': {} + '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192': {} - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@7f93034': + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@7f93034 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@7f93034': + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192': dependencies: - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@7f93034 + '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 path-browserify: 1.0.1 vscode-languageclient: 9.0.1 vscode-nls: 5.2.0 @@ -6786,61 +6786,61 @@ snapshots: - supports-color - terser - volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: vscode-css-languageservice: 6.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: vscode-json-languageservice: 5.4.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 volar-service-pug@https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3: dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 muggle-string: 0.4.1 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034) + volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 - volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034): + volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): dependencies: path-browserify: 1.0.1 semver: 7.6.2 @@ -6849,7 +6849,7 @@ snapshots: vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@7f93034 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 vscode-css-languageservice@6.3.0: dependencies: From a39b2bec0d22db2b35194e890704dc9dc3331850 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Sun, 18 Aug 2024 18:15:35 +0800 Subject: [PATCH 03/37] fix(vscode): type of `vue.server.hybridMode` config (#4703) --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 5528373103..175ad60522 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -255,7 +255,7 @@ "description": "Traces the communication between VS Code and the language server." }, "vue.server.hybridMode": { - "type": "boolean", + "type": ["boolean", "string"], "default": "auto", "enum": [ "auto", From efba00b55572e5129b1af7d07ec4157297cd6db8 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 18 Aug 2024 18:16:58 +0800 Subject: [PATCH 04/37] refactor: remove unnecessary type casting in generateComponent function --- packages/language-core/lib/codegen/template/element.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index c9bd547e13..73fa83d5f6 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -176,7 +176,7 @@ export function* generateComponent( resolveRenameNewName: node.tag !== expectName ? camelizeComponentName : undefined, resolveRenameEditText: getTagRenameApply(node.tag), }, - } as VueCodeInformation + } ); yield `;`; } @@ -194,7 +194,7 @@ export function* generateComponent( isAdditional: true, onlyImport: true, }, - } as VueCodeInformation + } ); yield `,`; } From d24c984d13889518f0404a8f673ab6c0c2ca0e70 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Mon, 19 Aug 2024 13:48:22 +0800 Subject: [PATCH 05/37] chore: update to Volar 2.4.0 --- extensions/vscode/package.json | 2 +- package.json | 19 +- packages/component-meta/lib/base.ts | 137 ++++----- packages/component-meta/package.json | 2 +- packages/language-core/package.json | 4 +- packages/language-plugin-pug/package.json | 4 +- .../language-server/lib/hybridModeProject.ts | 2 +- packages/language-server/package.json | 4 +- packages/language-service/package.json | 24 +- .../tests/utils/createTester.ts | 1 - packages/tsc/package.json | 2 +- packages/typescript-plugin/package.json | 2 +- pnpm-lock.yaml | 264 ++++++++---------- 13 files changed, 199 insertions(+), 268 deletions(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 175ad60522..f8bf2c5aa7 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -548,7 +548,7 @@ "devDependencies": { "@types/semver": "^7.5.3", "@types/vscode": "^1.82.0", - "@volar/vscode": "~2.4.0-alpha.18", + "@volar/vscode": "~2.4.0", "@vscode/vsce": "latest", "@vue/language-core": "2.0.28", "@vue/language-server": "2.0.28", diff --git a/package.json b/package.json index 925cd9ddaa..414132f019 100644 --- a/package.json +++ b/package.json @@ -24,30 +24,13 @@ "@lerna-lite/publish": "latest", "@tsslint/cli": "latest", "@tsslint/config": "latest", - "@volar/language-service": "~2.4.0-alpha.18", + "@volar/language-service": "~2.4.0", "typescript": "latest", "vite": "latest", "vitest": "latest" }, "pnpm": { "overrides": { - "@volar/kit": "https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192", - "@volar/language-core": "https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192", - "@volar/language-server": "https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192", - "@volar/language-service": "https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192", - "@volar/source-map": "https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192", - "@volar/typescript": "https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192", - "@volar/vscode": "https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192", - "volar-service-css": "https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3", - "volar-service-emmet": "https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3", - "volar-service-html": "https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3", - "volar-service-json": "https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3", - "volar-service-markdown": "https://pkg.pr.new/volarjs/services/volar-service-markdown@f520ee3", - "volar-service-prettyhtml": "https://pkg.pr.new/volarjs/services/volar-service-prettyhtml@f520ee3", - "volar-service-pug": "https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3", - "volar-service-pug-beautify": "https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3", - "volar-service-typescript": "https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3", - "volar-service-typescript-twoslash-queries": "https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3", "inquirer": "9.2.23" } } diff --git a/packages/component-meta/lib/base.ts b/packages/component-meta/lib/base.ts index 2b18d45d16..e71738e5e4 100644 --- a/packages/component-meta/lib/base.ts +++ b/packages/component-meta/lib/base.ts @@ -27,7 +27,7 @@ export function createCheckerByJsonConfigBase( checkerOptions: MetaCheckerOptions = {} ) { rootDir = rootDir.replace(windowsPathReg, '/'); - return createCheckerWorker( + return baseCreate( ts, () => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json), checkerOptions, @@ -42,7 +42,7 @@ export function createCheckerBase( checkerOptions: MetaCheckerOptions = {} ) { tsconfig = tsconfig.replace(windowsPathReg, '/'); - return createCheckerWorker( + return baseCreate( ts, () => vue.createParsedCommandLine(ts, ts.sys, tsconfig), checkerOptions, @@ -51,75 +51,28 @@ export function createCheckerBase( ); } -function createCheckerWorker( +export function baseCreate( ts: typeof import('typescript'), - loadParsedCommandLine: () => vue.ParsedCommandLine, + getCommandLine: () => vue.ParsedCommandLine, checkerOptions: MetaCheckerOptions, rootPath: string, globalComponentName: string ) { - - /** - * Original Host - */ - - let parsedCommandLine = loadParsedCommandLine(); - let fileNames = parsedCommandLine.fileNames.map(path => path.replace(windowsPathReg, '/')); + let commandLine = getCommandLine(); + let fileNames = commandLine.fileNames.map(path => path.replace(windowsPathReg, '/')); let projectVersion = 0; - const scriptSnapshots = new Map(); const projectHost: TypeScriptProjectHost = { getCurrentDirectory: () => rootPath, getProjectVersion: () => projectVersion.toString(), - getCompilationSettings: () => parsedCommandLine.options, + getCompilationSettings: () => commandLine.options, getScriptFileNames: () => fileNames, - getProjectReferences: () => parsedCommandLine.projectReferences, - getScriptSnapshot: fileName => { - if (!scriptSnapshots.has(fileName)) { - const fileText = ts.sys.readFile(fileName); - if (fileText !== undefined) { - scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(fileText)); - } - } - return scriptSnapshots.get(fileName); - }, + getProjectReferences: () => commandLine.projectReferences, }; - - return { - ...baseCreate(ts, projectHost, parsedCommandLine.vueOptions, checkerOptions, globalComponentName), - updateFile(fileName: string, text: string) { - fileName = fileName.replace(windowsPathReg, '/'); - scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(text)); - projectVersion++; - }, - deleteFile(fileName: string) { - fileName = fileName.replace(windowsPathReg, '/'); - fileNames = fileNames.filter(f => f !== fileName); - projectVersion++; - }, - reload() { - parsedCommandLine = loadParsedCommandLine(); - fileNames = parsedCommandLine.fileNames.map(path => path.replace(windowsPathReg, '/')); - this.clearCache(); - }, - clearCache() { - scriptSnapshots.clear(); - projectVersion++; - }, - }; -} - -export function baseCreate( - ts: typeof import('typescript'), - projectHost: TypeScriptProjectHost, - vueCompilerOptions: vue.VueCompilerOptions, - checkerOptions: MetaCheckerOptions, - globalComponentName: string -) { const globalComponentSnapshot = ts.ScriptSnapshot.fromString(''); - const metaSnapshots: Record = {}; + const scriptSnapshots = new Map(); + const metaSnapshots = new Map(); const getScriptFileNames = projectHost.getScriptFileNames; - const getScriptSnapshot = projectHost.getScriptSnapshot; projectHost.getScriptFileNames = () => { const names = getScriptFileNames(); return [ @@ -129,20 +82,6 @@ export function baseCreate( getMetaFileName(globalComponentName), ]; }; - projectHost.getScriptSnapshot = fileName => { - if (isMetaFileName(fileName)) { - if (!metaSnapshots[fileName]) { - metaSnapshots[fileName] = ts.ScriptSnapshot.fromString(getMetaScriptContent(fileName)); - } - return metaSnapshots[fileName]; - } - else if (fileName === globalComponentName) { - return globalComponentSnapshot; - } - else { - return getScriptSnapshot(fileName); - } - }; const vueLanguagePlugin = vue.createVueLanguagePlugin2( ts, @@ -153,7 +92,7 @@ export function baseCreate( ts.sys.useCaseSensitiveFileNames ), projectHost.getCompilationSettings(), - vueCompilerOptions + commandLine.vueOptions ); const language = vue.createLanguage( [ @@ -166,7 +105,30 @@ export function baseCreate( ], new vue.FileMap(ts.sys.useCaseSensitiveFileNames), fileName => { - const snapshot = projectHost.getScriptSnapshot(fileName); + let snapshot = scriptSnapshots.get(fileName); + + if (fileName === globalComponentName) { + snapshot = globalComponentSnapshot; + } + else if (isMetaFileName(fileName)) { + if (!metaSnapshots.has(fileName)) { + metaSnapshots.set(fileName, ts.ScriptSnapshot.fromString(getMetaScriptContent(fileName))); + } + snapshot = metaSnapshots.get(fileName); + } + else { + if (!scriptSnapshots.has(fileName)) { + const fileText = ts.sys.readFile(fileName); + if (fileText !== undefined) { + scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(fileText)); + } + else { + scriptSnapshots.set(fileName, undefined); + } + } + snapshot = scriptSnapshots.get(fileName); + } + if (snapshot) { language.scripts.set(fileName, snapshot); } @@ -182,7 +144,7 @@ export function baseCreate( const getScriptKind = languageServiceHost.getScriptKind?.bind(languageServiceHost); languageServiceHost.getScriptKind = fileName => { const scriptKind = getScriptKind!(fileName); - if (vueCompilerOptions.extensions.some(ext => fileName.endsWith(ext))) { + if (commandLine.vueOptions.extensions.some(ext => fileName.endsWith(ext))) { if (scriptKind === ts.ScriptKind.JS) { return ts.ScriptKind.TS; } @@ -199,6 +161,25 @@ export function baseCreate( return { getExportNames, getComponentMeta, + updateFile(fileName: string, text: string) { + fileName = fileName.replace(windowsPathReg, '/'); + scriptSnapshots.set(fileName, ts.ScriptSnapshot.fromString(text)); + projectVersion++; + }, + deleteFile(fileName: string) { + fileName = fileName.replace(windowsPathReg, '/'); + fileNames = fileNames.filter(f => f !== fileName); + projectVersion++; + }, + reload() { + commandLine = getCommandLine(); + fileNames = commandLine.fileNames.map(path => path.replace(windowsPathReg, '/')); + this.clearCache(); + }, + clearCache() { + scriptSnapshots.clear(); + projectVersion++; + }, __internal__: { tsLs, }, @@ -210,7 +191,7 @@ export function baseCreate( function getMetaFileName(fileName: string) { return ( - vueCompilerOptions.extensions.some(ext => fileName.endsWith(ext)) + commandLine.vueOptions.extensions.some(ext => fileName.endsWith(ext)) ? fileName : fileName.substring(0, fileName.lastIndexOf('.')) ) + '.meta.ts'; @@ -229,7 +210,7 @@ interface ComponentMeta { exposed: ComponentExposed; }; -${vueCompilerOptions.target < 3 ? vue2TypeHelpersCode : typeHelpersCode} +${commandLine.vueOptions.target < 3 ? vue2TypeHelpersCode : typeHelpersCode} `.trim(); return code; } @@ -321,11 +302,11 @@ ${vueCompilerOptions.target < 3 ? vue2TypeHelpersCode : typeHelpersCode} // fill defaults const printer = ts.createPrinter(checkerOptions.printer); - const snapshot = projectHost.getScriptSnapshot(componentPath)!; + const snapshot = language.scripts.get(componentPath)?.snapshot!; const vueFile = language.scripts.get(componentPath)?.generated?.root; const vueDefaults = vueFile && exportName === 'default' - ? (vueFile instanceof vue.VueVirtualCode ? readVueComponentDefaultProps(vueFile, printer, ts, vueCompilerOptions) : {}) + ? (vueFile instanceof vue.VueVirtualCode ? readVueComponentDefaultProps(vueFile, printer, ts, commandLine.vueOptions) : {}) : {}; const tsDefaults = !vueFile ? readTsComponentDefaultProps( componentPath.substring(componentPath.lastIndexOf('.') + 1), // ts | js | tsx | jsx diff --git a/packages/component-meta/package.json b/packages/component-meta/package.json index a904348e96..054bd20773 100644 --- a/packages/component-meta/package.json +++ b/packages/component-meta/package.json @@ -12,7 +12,7 @@ "directory": "packages/component-meta" }, "dependencies": { - "@volar/typescript": "~2.4.0-alpha.18", + "@volar/typescript": "~2.4.0", "@vue/language-core": "2.0.28", "path-browserify": "^1.0.1", "vue-component-type-helpers": "2.0.28" diff --git a/packages/language-core/package.json b/packages/language-core/package.json index 6efe2a6ee8..6ad5683c03 100644 --- a/packages/language-core/package.json +++ b/packages/language-core/package.json @@ -12,7 +12,7 @@ "directory": "packages/language-core" }, "dependencies": { - "@volar/language-core": "~2.4.0-alpha.18", + "@volar/language-core": "~2.4.0", "@vue/compiler-dom": "^3.4.0", "@vue/shared": "^3.4.0", "computeds": "^0.0.1", @@ -25,7 +25,7 @@ "@types/minimatch": "^5.1.2", "@types/node": "latest", "@types/path-browserify": "^1.0.1", - "@volar/typescript": "~2.4.0-alpha.18", + "@volar/typescript": "~2.4.0", "@vue/compiler-sfc": "^3.4.0" }, "peerDependencies": { diff --git a/packages/language-plugin-pug/package.json b/packages/language-plugin-pug/package.json index 89d52962d5..ff722f9c1e 100644 --- a/packages/language-plugin-pug/package.json +++ b/packages/language-plugin-pug/package.json @@ -16,7 +16,7 @@ "@vue/language-core": "2.0.28" }, "dependencies": { - "@volar/source-map": "~2.4.0-alpha.18", - "volar-service-pug": "0.0.59" + "@volar/source-map": "~2.4.0", + "volar-service-pug": "0.0.61" } } diff --git a/packages/language-server/lib/hybridModeProject.ts b/packages/language-server/lib/hybridModeProject.ts index b7e27df265..985ec5a3b5 100644 --- a/packages/language-server/lib/hybridModeProject.ts +++ b/packages/language-server/lib/hybridModeProject.ts @@ -25,7 +25,7 @@ export function createHybridModeProject( setup(_server) { server = _server; onSomePipeReadyCallbacks.push(() => { - server.languageFeatures.refreshDiagnostics(false); + server.languageFeatures.requestRefresh(false); }); server.fileWatcher.onDidChangeWatchedFiles(({ changes }) => { for (const change of changes) { diff --git a/packages/language-server/package.json b/packages/language-server/package.json index 6e6002742e..bd4773003b 100644 --- a/packages/language-server/package.json +++ b/packages/language-server/package.json @@ -15,8 +15,8 @@ "directory": "packages/language-server" }, "dependencies": { - "@volar/language-core": "~2.4.0-alpha.18", - "@volar/language-server": "~2.4.0-alpha.18", + "@volar/language-core": "~2.4.0", + "@volar/language-server": "~2.4.0", "@vue/language-core": "2.0.28", "@vue/language-service": "2.0.28", "@vue/typescript-plugin": "2.0.28", diff --git a/packages/language-service/package.json b/packages/language-service/package.json index 2f707cefa1..a632909434 100644 --- a/packages/language-service/package.json +++ b/packages/language-service/package.json @@ -16,23 +16,23 @@ "update-html-data": "node ./scripts/update-html-data.js" }, "dependencies": { - "@volar/language-core": "~2.4.0-alpha.18", - "@volar/language-service": "~2.4.0-alpha.18", - "@volar/typescript": "~2.4.0-alpha.18", + "@volar/language-core": "~2.4.0", + "@volar/language-service": "~2.4.0", + "@volar/typescript": "~2.4.0", "@vue/compiler-dom": "^3.4.0", "@vue/language-core": "2.0.28", "@vue/shared": "^3.4.0", "@vue/typescript-plugin": "2.0.28", "computeds": "^0.0.1", "path-browserify": "^1.0.1", - "volar-service-css": "0.0.59", - "volar-service-emmet": "0.0.59", - "volar-service-html": "0.0.59", - "volar-service-json": "0.0.59", - "volar-service-pug": "0.0.59", - "volar-service-pug-beautify": "0.0.59", - "volar-service-typescript": "0.0.59", - "volar-service-typescript-twoslash-queries": "0.0.59", + "volar-service-css": "0.0.61", + "volar-service-emmet": "0.0.61", + "volar-service-html": "0.0.61", + "volar-service-json": "0.0.61", + "volar-service-pug": "0.0.61", + "volar-service-pug-beautify": "0.0.61", + "volar-service-typescript": "0.0.61", + "volar-service-typescript-twoslash-queries": "0.0.61", "vscode-html-languageservice": "^5.2.0", "vscode-languageserver-textdocument": "^1.0.11", "vscode-uri": "^3.0.8" @@ -40,7 +40,7 @@ "devDependencies": { "@types/node": "latest", "@types/path-browserify": "latest", - "@volar/kit": "~2.4.0-alpha.18", + "@volar/kit": "~2.4.0", "vscode-languageserver-protocol": "^3.17.5" } } diff --git a/packages/language-service/tests/utils/createTester.ts b/packages/language-service/tests/utils/createTester.ts index df4c6b9102..e0c9e6f017 100644 --- a/packages/language-service/tests/utils/createTester.ts +++ b/packages/language-service/tests/utils/createTester.ts @@ -22,7 +22,6 @@ function createTester(rootUri: URI) { getProjectVersion: () => '0', getScriptFileNames: () => parsedCommandLine.fileNames, getCompilationSettings: () => parsedCommandLine.options, - getScriptSnapshot, }; const vueLanguagePlugin = createVueLanguagePlugin2( ts, diff --git a/packages/tsc/package.json b/packages/tsc/package.json index 7ede11d22d..044e74a115 100644 --- a/packages/tsc/package.json +++ b/packages/tsc/package.json @@ -16,7 +16,7 @@ "vue-tsc": "./bin/vue-tsc.js" }, "dependencies": { - "@volar/typescript": "~2.4.0-alpha.18", + "@volar/typescript": "~2.4.0", "@vue/language-core": "2.0.28", "semver": "^7.5.4" }, diff --git a/packages/typescript-plugin/package.json b/packages/typescript-plugin/package.json index 47712f9507..d5d28e4397 100644 --- a/packages/typescript-plugin/package.json +++ b/packages/typescript-plugin/package.json @@ -12,7 +12,7 @@ "directory": "packages/typescript-plugin" }, "dependencies": { - "@volar/typescript": "~2.4.0-alpha.18", + "@volar/typescript": "~2.4.0", "@vue/language-core": "2.0.28", "@vue/shared": "^3.4.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f4404c0ab9..af9786a46f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,23 +5,6 @@ settings: excludeLinksFromLockfile: false overrides: - '@volar/kit': https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192 - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - '@volar/vscode': https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 - volar-service-css: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 - volar-service-emmet: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 - volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 - volar-service-json: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3 - volar-service-markdown: https://pkg.pr.new/volarjs/services/volar-service-markdown@f520ee3 - volar-service-prettyhtml: https://pkg.pr.new/volarjs/services/volar-service-prettyhtml@f520ee3 - volar-service-pug: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 - volar-service-pug-beautify: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3 - volar-service-typescript: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3 - volar-service-typescript-twoslash-queries: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3 inquirer: 9.2.23 importers: @@ -41,8 +24,8 @@ importers: specifier: latest version: 1.0.14 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + specifier: ~2.4.0 + version: 2.4.0 typescript: specifier: latest version: 5.5.3 @@ -62,8 +45,8 @@ importers: specifier: ^1.82.0 version: 1.91.0 '@volar/vscode': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vscode/vsce': specifier: latest version: 3.0.0 @@ -92,8 +75,8 @@ importers: packages/component-meta: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -119,8 +102,8 @@ importers: packages/language-core: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -156,8 +139,8 @@ importers: specifier: ^1.0.1 version: 1.0.2 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/compiler-sfc': specifier: ^3.4.0 version: 3.4.31 @@ -165,11 +148,11 @@ importers: packages/language-plugin-pug: dependencies: '@volar/source-map': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 + specifier: ~2.4.0 + version: 2.4.0 volar-service-pug: - specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 + specifier: 0.0.61 + version: 0.0.61 devDependencies: '@types/node': specifier: latest @@ -181,11 +164,11 @@ importers: packages/language-server: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@volar/language-server': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -205,14 +188,14 @@ importers: packages/language-service: dependencies: '@volar/language-core': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@volar/language-service': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -232,29 +215,29 @@ importers: specifier: ^1.0.1 version: 1.0.1 volar-service-css: - specifier: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-emmet: - specifier: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-html: - specifier: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-json: - specifier: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-pug: - specifier: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3 + specifier: 0.0.61 + version: 0.0.61 volar-service-pug-beautify: - specifier: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-typescript: - specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) volar-service-typescript-twoslash-queries: - specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3 - version: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + specifier: 0.0.61 + version: 0.0.61(@volar/language-service@2.4.0) vscode-html-languageservice: specifier: ^5.2.0 version: 5.3.0 @@ -272,8 +255,8 @@ importers: specifier: latest version: 1.0.2 '@volar/kit': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192(typescript@5.5.3) + specifier: ~2.4.0 + version: 2.4.0(typescript@5.5.3) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -281,8 +264,8 @@ importers: packages/tsc: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -300,8 +283,8 @@ importers: packages/typescript-plugin: dependencies: '@volar/typescript': - specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 - version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + specifier: ~2.4.0 + version: 2.4.0 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -1108,35 +1091,28 @@ packages: '@vitest/utils@2.0.3': resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192} - version: 2.4.0-alpha.18 + '@volar/kit@2.4.0': + resolution: {integrity: sha512-uqwtPKhrbnP+3f8hs+ltDYXLZ6Wdbs54IzkaPocasI4aBhqWLht5qXctE1MqpZU52wbH359E0u9nhxEFmyon+w==} peerDependencies: typescript: '*' - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192} - version: 2.4.0-alpha.18 + '@volar/language-core@2.4.0': + resolution: {integrity: sha512-FTla+khE+sYK0qJP+6hwPAAUwiNHVMph4RUXpxf/FIPKUP61NFrVZorml4mjFShnueR2y9/j8/vnh09YwVdH7A==} - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192} - version: 2.4.0-alpha.18 + '@volar/language-server@2.4.0': + resolution: {integrity: sha512-rmGIjAxWekWQiGH97Mosb4juiD/hfFYNQKV5Py9r7vDOLSkbIwRhITbwHm88NJKs8P6TNc6w/PfBXN6yjKadJg==} - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192} - version: 2.4.0-alpha.18 + '@volar/language-service@2.4.0': + resolution: {integrity: sha512-4P3yeQXIL68mLfS3n6P3m02IRg3GnLHUU9k/1PCHEfm5FG9bySkDOc72dbBn2vAa2BxOqm18bmmZXrsWuQ5AOw==} - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192} - version: 2.4.0-alpha.18 + '@volar/source-map@2.4.0': + resolution: {integrity: sha512-2ceY8/NEZvN6F44TXw2qRP6AQsvCYhV2bxaBPWxV9HqIfkbRydSksTFObCF1DBDNBfKiZTS8G/4vqV6cvjdOIQ==} - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192} - version: 2.4.0-alpha.18 + '@volar/typescript@2.4.0': + resolution: {integrity: sha512-9zx3lQWgHmVd+JRRAHUSRiEhe4TlzL7U7e6ulWXOxHH/WNYxzKwCvZD7WYWEZFdw4dHfTD9vUR0yPQO6GilCaQ==} - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192': - resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192} - version: 2.4.0-alpha.18 + '@volar/vscode@2.4.0': + resolution: {integrity: sha512-VOnUgtmu+xGOqVKouRM8ZSeVOFPqmcTDfi3wif5peXpkOPsCgNdS/zns0xunuh9J6Ck5SV+QffPfmNW9XARnxw==} '@vscode/emmet-helper@2.9.3': resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} @@ -3297,69 +3273,61 @@ packages: jsdom: optional: true - volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3} - version: 0.0.59 + volar-service-css@0.0.61: + resolution: {integrity: sha512-Ct9L/w+IB1JU8F4jofcNCGoHy6TF83aiapfZq9A0qYYpq+Kk5dH+ONS+rVZSsuhsunq8UvAuF8Gk6B8IFLfniw==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3} - version: 0.0.59 + volar-service-emmet@0.0.61: + resolution: {integrity: sha512-iiYqBxjjcekqrRruw4COQHZME6EZYWVbkHjHDbULpml3g8HGJHzpAMkj9tXNCPxf36A+f1oUYjsvZt36qPg4cg==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3} - version: 0.0.59 + volar-service-html@0.0.61: + resolution: {integrity: sha512-yFE+YmmgqIL5HI4ORqP++IYb1QaGcv+xBboI0WkCxJJ/M35HZj7f5rbT3eQ24ECLXFbFCFanckwyWJVz5KmN3Q==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3} - version: 0.0.59 + volar-service-json@0.0.61: + resolution: {integrity: sha512-9PpEib6XE99gFjjjl8IkITktSvfPW39jFAGsHggT6SdlIb8zC7J0+rMjkyVUAUOpWvY5jPqkByX43LcxZvkrdQ==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3} - version: 0.0.59 + volar-service-pug-beautify@0.0.61: + resolution: {integrity: sha512-FvZEZJdZ64pa3a0u1Urz08g4gHjuPcdMsEsJGiDLYqJnIZEGZRyhHUjSxfmAxihZCzp738W90tOMQDbgeQMGhA==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-pug@https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3} - version: 0.0.59 + volar-service-pug@0.0.61: + resolution: {integrity: sha512-G6cTxFpwedV98JsmQUFHt7BP9+r/VnT4iq0SruKzEG2lpV0iUH6zVa5fZfoKj0zZOtvXvOI1nJDHzV7eULSwCQ==} - volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3} - version: 0.0.59 + volar-service-typescript-twoslash-queries@0.0.61: + resolution: {integrity: sha512-99FICGrEF0r1E2tV+SvprHPw9Knyg7BdW2fUch0tf59kG+KG+Tj4tL6tUg+cy8f23O/VXlmsWFMIE+bx1dXPnQ==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3: - resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3} - version: 0.0.59 + volar-service-typescript@0.0.61: + resolution: {integrity: sha512-4kRHxVbW7wFBHZWRU6yWxTgiKETBDIJNwmJUAWeP0mHaKpnDGj/astdRFKqGFRYVeEYl45lcUPhdJyrzanjsdQ==} peerDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': ~2.4.0 peerDependenciesMeta: '@volar/language-service': optional: true @@ -4382,24 +4350,24 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@ab44192(typescript@5.5.3)': + '@volar/kit@2.4.0(typescript@5.5.3)': dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + '@volar/language-service': 2.4.0 + '@volar/typescript': 2.4.0 typesafe-path: 0.2.2 typescript: 5.5.3 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192': + '@volar/language-core@2.4.0': dependencies: - '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192 + '@volar/source-map': 2.4.0 - '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192': + '@volar/language-server@2.4.0': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 - '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192 + '@volar/language-core': 2.4.0 + '@volar/language-service': 2.4.0 + '@volar/typescript': 2.4.0 path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -4407,24 +4375,24 @@ snapshots: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192': + '@volar/language-service@2.4.0': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + '@volar/language-core': 2.4.0 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@ab44192': {} + '@volar/source-map@2.4.0': {} - '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@ab44192': + '@volar/typescript@2.4.0': dependencies: - '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@ab44192 + '@volar/language-core': 2.4.0 path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@ab44192': + '@volar/vscode@2.4.0': dependencies: - '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@ab44192 + '@volar/language-server': 2.4.0 path-browserify: 1.0.1 vscode-languageclient: 9.0.1 vscode-nls: 5.2.0 @@ -6786,61 +6754,61 @@ snapshots: - supports-color - terser - volar-service-css@https://pkg.pr.new/volarjs/services/volar-service-css@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-css@0.0.61(@volar/language-service@2.4.0): dependencies: vscode-css-languageservice: 6.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-emmet@https://pkg.pr.new/volarjs/services/volar-service-emmet@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-emmet@0.0.61(@volar/language-service@2.4.0): dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-html@https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-html@0.0.61(@volar/language-service@2.4.0): dependencies: vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-json@https://pkg.pr.new/volarjs/services/volar-service-json@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-json@0.0.61(@volar/language-service@2.4.0): dependencies: vscode-json-languageservice: 5.4.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-pug-beautify@https://pkg.pr.new/volarjs/services/volar-service-pug-beautify@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-pug-beautify@0.0.61(@volar/language-service@2.4.0): dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-pug@https://pkg.pr.new/volarjs/services/volar-service-pug@f520ee3: + volar-service-pug@0.0.61: dependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 muggle-string: 0.4.1 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: https://pkg.pr.new/volarjs/services/volar-service-html@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192) + volar-service-html: 0.0.61(@volar/language-service@2.4.0) vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 - volar-service-typescript-twoslash-queries@https://pkg.pr.new/volarjs/services/volar-service-typescript-twoslash-queries@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@2.4.0): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 - volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@f520ee3(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192): + volar-service-typescript@0.0.61(@volar/language-service@2.4.0): dependencies: path-browserify: 1.0.1 semver: 7.6.2 @@ -6849,7 +6817,7 @@ snapshots: vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@ab44192 + '@volar/language-service': 2.4.0 vscode-css-languageservice@6.3.0: dependencies: From 1fcd22d2fb3e3ac7fd4c4e61013bf7ede1c8d4bd Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Fri, 23 Aug 2024 03:48:00 +0800 Subject: [PATCH 06/37] ci: add pkg.pr.new --- .github/workflows/pkg.pr.new.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/pkg.pr.new.yml diff --git a/.github/workflows/pkg.pr.new.yml b/.github/workflows/pkg.pr.new.yml new file mode 100644 index 0000000000..8d9c819f06 --- /dev/null +++ b/.github/workflows/pkg.pr.new.yml @@ -0,0 +1,24 @@ +name: Publish Any Commit +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - run: corepack enable + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - run: pnpx pkg-pr-new publish './packages/*' From 8592f9e263fe4d7fbb7991c031f535274c3098c5 Mon Sep 17 00:00:00 2001 From: David Matter Date: Sat, 24 Aug 2024 09:29:43 +0200 Subject: [PATCH 07/37] fix(typescript-plugin): unknown request type warning (#4715) --- packages/typescript-plugin/lib/server.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/typescript-plugin/lib/server.ts b/packages/typescript-plugin/lib/server.ts index ec3d9d1e94..30ae6d5629 100644 --- a/packages/typescript-plugin/lib/server.ts +++ b/packages/typescript-plugin/lib/server.ts @@ -47,27 +47,27 @@ export async function startNamedPipeServer( } const request: Request = JSON.parse(text); const fileName = request.args[0]; + const requestContext: RequestContext = { + typescript: ts, + languageService: info.languageService, + languageServiceHost: info.languageServiceHost, + language: language, + isTsPlugin: true, + getFileId: (fileName: string) => fileName, + }; if (request.type === 'containsFile') { sendResponse( info.project.containsFile(ts.server.toNormalizedPath(fileName)) ); } - if (request.type === 'projectInfo') { + else if (request.type === 'projectInfo') { sendResponse({ name: info.project.getProjectName(), kind: info.project.projectKind, currentDirectory: info.project.getCurrentDirectory(), } satisfies ProjectInfo); } - const requestContext: RequestContext = { - typescript: ts, - languageService: info.languageService, - languageServiceHost: info.languageServiceHost, - language: language, - isTsPlugin: true, - getFileId: (fileName: string) => fileName, - }; - if (request.type === 'collectExtractProps') { + else if (request.type === 'collectExtractProps') { const result = collectExtractProps.apply(requestContext, request.args as any); sendResponse(result); } From 1b9c3eed8c4b4ad249620ac896162e0dea4f9f30 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sat, 24 Aug 2024 15:52:25 +0800 Subject: [PATCH 08/37] lint: exclude Vue files --- tsslint.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tsslint.config.ts b/tsslint.config.ts index b8d7199a65..5639618308 100644 --- a/tsslint.config.ts +++ b/tsslint.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from '@tsslint/config'; import { getDefaultRules as getDefaultVolarRules } from 'https://raw.githubusercontent.com/volarjs/volar.js/master/tsslint.config.ts'; export default defineConfig({ + exclude: ['**/*.vue'], rules: { ...getDefaultVolarRules(), }, From cf2953913625f001d6d99bdd06051844673398ba Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sat, 24 Aug 2024 15:58:07 +0800 Subject: [PATCH 09/37] lint: includes test files --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 414132f019..12b5376536 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "release:next-base": "npm run release:base -- --dist-tag next", "release:next-vue": "cd ./extensions/vscode && npm run release:next", "test": "vitest run", - "lint": "tsslint --projects {packages/*/tsconfig.json,extensions/*/tsconfig.json}", + "lint": "tsslint --projects {tsconfig.json,packages/*/tsconfig.json,extensions/*/tsconfig.json}", "lint:fix": "npm run lint -- --fix", "chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter" }, From 653651a23b90bbfde4ff9859185ddb47d1dfd2ee Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 24 Aug 2024 07:58:45 +0000 Subject: [PATCH 10/37] ci(lint): auto-fix --- packages/component-meta/tests/index.spec.ts | 8 ++++---- packages/language-service/tests/complete.ts | 6 +++--- packages/language-service/tests/findDefinition.ts | 4 ++-- packages/language-service/tests/inlayHint.ts | 4 ++-- packages/language-service/tests/reference.ts | 4 ++-- packages/language-service/tests/rename.ts | 4 ++-- packages/language-service/tests/utils/mockEnv.ts | 2 +- packages/tsc/tests/index.spec.ts | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/component-meta/tests/index.spec.ts b/packages/component-meta/tests/index.spec.ts index 83d034da2e..dfe7f7dcd5 100644 --- a/packages/component-meta/tests/index.spec.ts +++ b/packages/component-meta/tests/index.spec.ts @@ -727,7 +727,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ test('emits-generic', () => { const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/events/component-generic.vue'); const meta = checker.getComponentMeta(componentPath); - const foo = meta.events.find(event =>event.name === 'foo'); + const foo = meta.events.find(event => event.name === 'foo'); expect(foo?.description).toBe('Emitted when foo...'); }); @@ -736,7 +736,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ test.skip('emits-class', () => { const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/events/component-class.vue'); const meta = checker.getComponentMeta(componentPath); - const foo = meta.events.find(event =>event.name === 'foo'); + const foo = meta.events.find(event => event.name === 'foo'); expect(foo?.description).toBe('Emitted when foo...'); }); @@ -858,7 +858,7 @@ const checkerOptions: MetaCheckerOptions = { }; const tsconfigChecker = createChecker( path.resolve(__dirname, '../../../test-workspace/component-meta/tsconfig.json'), - checkerOptions, + checkerOptions ); const noTsConfigChecker = createCheckerByJson( path.resolve(__dirname, '../../../test-workspace/component-meta'), @@ -868,7 +868,7 @@ const noTsConfigChecker = createCheckerByJson( "**/*", ], }, - checkerOptions, + checkerOptions ); worker(tsconfigChecker, true); diff --git a/packages/language-service/tests/complete.ts b/packages/language-service/tests/complete.ts index 959ae6efac..582287949d 100644 --- a/packages/language-service/tests/complete.ts +++ b/packages/language-service/tests/complete.ts @@ -43,7 +43,7 @@ for (const dirName of testDirs) { let complete = await tester.languageService.getCompletionItems( uri, position, - { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked }, + { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked } ); if (!complete.items.length) { @@ -51,7 +51,7 @@ for (const dirName of testDirs) { complete = await tester.languageService.getCompletionItems( uri, position, - { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked }, + { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked } ); } @@ -107,7 +107,7 @@ function findCompleteActions(text: string) { return [...text.matchAll(/(\^*)complete:\s*([\S]*)/g)].map(flag => { - const offset = flag.index!; + const offset = flag.index; const label = flag[2]; return { diff --git a/packages/language-service/tests/findDefinition.ts b/packages/language-service/tests/findDefinition.ts index 77a0362b7a..c359d44e3b 100644 --- a/packages/language-service/tests/findDefinition.ts +++ b/packages/language-service/tests/findDefinition.ts @@ -36,7 +36,7 @@ for (const dirName of testDirs) { const locations = await tester.languageService.getDefinition( uri, - position, + position ); expect(locations).toBeDefined(); @@ -78,7 +78,7 @@ function findActions(text: string) { return [...text.matchAll(definitionReg)].map(flag => { - const offset = flag.index!; + const offset = flag.index; const targetFile = flag[2]; const targeRange = { start: Number(flag[3]), diff --git a/packages/language-service/tests/inlayHint.ts b/packages/language-service/tests/inlayHint.ts index f95e8b3470..47a4acc65f 100644 --- a/packages/language-service/tests/inlayHint.ts +++ b/packages/language-service/tests/inlayHint.ts @@ -38,7 +38,7 @@ for (const dirName of testDirs) { const inlayHints = await tester.languageService.getInlayHints( uri, - range, + range ); const inlayHint = inlayHints?.find(inlayHint => inlayHint.label === action.label); @@ -69,7 +69,7 @@ function findActions(text: string) { return [...text.matchAll(inlayHintReg)].map(flag => { - const offset = flag.index!; + const offset = flag.index; const label = flag[2]; return { diff --git a/packages/language-service/tests/reference.ts b/packages/language-service/tests/reference.ts index 9df5698645..d7fab82f3b 100644 --- a/packages/language-service/tests/reference.ts +++ b/packages/language-service/tests/reference.ts @@ -36,7 +36,7 @@ for (const dirName of testDirs) { const locations = await tester.languageService.getReferences( uri, position, - { includeDeclaration: true }, + { includeDeclaration: true } ); expect(locations).toBeDefined(); @@ -67,7 +67,7 @@ function findActions(text: string) { return [...text.matchAll(referenceReg)].map(flag => { - const offset = flag.index!; + const offset = flag.index; // The definition itself is also counted const count = Number(flag[2]) + 1; diff --git a/packages/language-service/tests/rename.ts b/packages/language-service/tests/rename.ts index c21b964d98..b3655b0ab4 100644 --- a/packages/language-service/tests/rename.ts +++ b/packages/language-service/tests/rename.ts @@ -39,7 +39,7 @@ for (const dirName of testDirs) { const edit = await tester.languageService.getRenameEdits( uri, position, - action.newName, + action.newName ); expect(edit).toBeDefined(); @@ -86,7 +86,7 @@ function findRenameActions(text: string) { return [...text.matchAll(renameReg)].map(flag => { - const start = flag.index!; + const start = flag.index; const end = start + flag[1].length; const newName = flag[2]; diff --git a/packages/language-service/tests/utils/mockEnv.ts b/packages/language-service/tests/utils/mockEnv.ts index d6781bd61b..2f642fe373 100644 --- a/packages/language-service/tests/utils/mockEnv.ts +++ b/packages/language-service/tests/utils/mockEnv.ts @@ -12,7 +12,7 @@ export function createMockServiceEnv( ): LanguageServiceEnvironment { return { workspaceFolders: [rootUri], - async getConfiguration(section: string) { + getConfiguration(section: string) { const settings = getSettings(); if (settings[section]) { return settings[section]; diff --git a/packages/tsc/tests/index.spec.ts b/packages/tsc/tests/index.spec.ts index 7d39072d75..feff8b7560 100644 --- a/packages/tsc/tests/index.spec.ts +++ b/packages/tsc/tests/index.spec.ts @@ -57,19 +57,19 @@ function runVueTsc(cwd: string) { { silent: true, cwd - }, + } ); cp.stdout?.setEncoding('utf8'); - cp.stdout?.on('data', (data) => { + cp.stdout?.on('data', data => { console.log(data); }); cp.stderr?.setEncoding('utf8'); - cp.stderr?.on('data', (data) => { + cp.stderr?.on('data', data => { console.error(data); }); - cp.on('exit', (code) => { + cp.on('exit', code => { if (code === 0) { resolve(undefined); } else { From 0020c08b98a452cc55a30d45567f9e7fb7bee4d6 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 25 Aug 2024 15:44:04 +0800 Subject: [PATCH 11/37] test(language-service): migrate tests to `@volar/test-utils` (#4719) --- package.json | 10 + packages/language-server/lib/initialize.ts | 2 +- packages/language-server/package.json | 1 + .../language-server/tests/completions.spec.ts | 410 +++++++++ .../language-server/tests/definitions.spec.ts | 161 ++++ .../language-server/tests/inlayHints.spec.ts | 222 +++++ .../language-server/tests/references.spec.ts | 199 +++++ .../language-server/tests/renaming.spec.ts | 798 ++++++++++++++++++ packages/language-server/tests/server.ts | 43 + packages/language-service/index.ts | 7 +- packages/language-service/tests/complete.ts | 118 --- .../language-service/tests/findDefinition.ts | 94 --- packages/language-service/tests/index.spec.ts | 5 - packages/language-service/tests/inlayHint.ts | 80 -- packages/language-service/tests/reference.ts | 79 -- packages/language-service/tests/rename.ts | 99 --- .../tests/utils/createTester.ts | 109 --- .../language-service/tests/utils/mockEnv.ts | 82 -- .../lib/requests/collectExtractProps.ts | 7 +- .../lib/requests/componentInfos.ts | 24 +- .../lib/requests/getPropertiesAtLocation.ts | 7 +- pnpm-lock.yaml | 219 +++-- .../complete/#2454/input/entry.vue | 8 - .../complete/#2454/output/entry.vue | 8 - .../#2511/input/component-for-auto-import.vue | 1 - .../complete/#2511/input/entry.vue | 4 - .../complete/#2511/output/entry.vue | 4 - .../complete/#3658/input/entry.vue | 8 - .../complete/#3658/output/entry.vue | 8 - .../complete/#4639/input/entry.vue | 7 - .../complete/#4639/output/entry.vue | 7 - .../complete/$event/input/entry.vue | 4 - .../complete/$event/output/entry.vue | 4 - .../input/component-for-auto-import.vue | 1 - .../component-auto-import/input/entry.vue | 7 - .../component-auto-import/output/entry.vue | 9 - .../complete/core#8811/input/entry.vue | 12 - .../complete/core#8811/output/entry.vue | 12 - .../complete/directives/input/entry.vue | 12 - .../complete/directives/output/entry.vue | 12 - .../complete/script-setup/input/entry.vue | 8 - .../complete/script-setup/output/entry.vue | 8 - .../complete/slot-name/input/main.vue | 15 - .../complete/slot-name/output/main.vue | 15 - .../vue-file-path/input/alias-path.vue | 4 - .../vue-file-path/input/component.vue | 1 - .../vue-file-path/input/relative-path.vue | 4 - .../vue-file-path/output/alias-path.vue | 4 - .../vue-file-path/output/relative-path.vue | 4 - .../find-definition/#2600/entry.vue | 4 - .../find-definition/#2600/foo.vue | 7 - .../find-definition/alias-path/entry.vue | 6 - .../find-definition/alias-path/foo.ts | 1 - .../find-definition/ts-to-vue/component.vue | 1 - .../find-definition/ts-to-vue/entry.ts | 4 - .../inlay-hint/destructured-props/entry.vue | 52 -- .../inline-handler-leading/entry.vue | 8 - .../inlay-hint/missing-props/Comp.vue | 5 - .../inlay-hint/missing-props/entry.vue | 8 - .../inlay-hint/option-wrapper/entry.vue | 4 - .../reference/slot-default/entry.vue | 4 - .../reference/slot-default/foo.vue | 9 - .../reference/slot-named/entry.vue | 4 - .../reference/slot-named/foo.vue | 7 - .../reference/v-bind-shorthand/child.vue | 6 - .../reference/v-bind-shorthand/entry.vue | 13 - .../rename/#2410/input/entry.vue | 4 - .../rename/#2410/output/entry.vue | 4 - .../rename/component-prop/input/component.vue | 8 - .../rename/component-prop/input/entry.vue | 8 - .../component-prop/output/component.vue | 8 - .../rename/component-prop/output/entry.vue | 8 - .../rename/component-tag/input/component.vue | 2 - .../rename/component-tag/input/entry.vue | 9 - .../rename/component-tag/output/component.vue | 2 - .../rename/component-tag/output/entry.vue | 9 - .../component-type-prop/input/component.vue | 8 - .../component-type-prop/input/entry.vue | 8 - .../component-type-prop/output/component.vue | 8 - .../component-type-prop/output/entry.vue | 8 - .../rename/css-module/input/entry.vue | 13 - .../rename/css-module/output/entry.vue | 13 - .../rename/css-scoped/input/entry.vue | 8 - .../rename/css-scoped/output/entry.vue | 8 - .../rename/css-vars/input/entry.vue | 20 - .../rename/css-vars/output/entry.vue | 20 - .../rename/dynamic-prop/input/entry.vue | 9 - .../rename/dynamic-prop/output/entry.vue | 9 - .../rename/regular-component/input/entry.vue | 17 - .../rename/regular-component/output/entry.vue | 17 - .../rename/script-setup/input/entry.vue | 9 - .../rename/script-setup/output/entry.vue | 9 - test-workspace/language-service/tsconfig.json | 14 - test-workspace/tsconfigProject/empty.vue | 0 test-workspace/tsconfigProject/tsconfig.json | 9 + vitest.config.ts | 4 +- 96 files changed, 1996 insertions(+), 1387 deletions(-) create mode 100644 packages/language-server/tests/completions.spec.ts create mode 100644 packages/language-server/tests/definitions.spec.ts create mode 100644 packages/language-server/tests/inlayHints.spec.ts create mode 100644 packages/language-server/tests/references.spec.ts create mode 100644 packages/language-server/tests/renaming.spec.ts create mode 100644 packages/language-server/tests/server.ts delete mode 100644 packages/language-service/tests/complete.ts delete mode 100644 packages/language-service/tests/findDefinition.ts delete mode 100644 packages/language-service/tests/index.spec.ts delete mode 100644 packages/language-service/tests/inlayHint.ts delete mode 100644 packages/language-service/tests/reference.ts delete mode 100644 packages/language-service/tests/rename.ts delete mode 100644 packages/language-service/tests/utils/createTester.ts delete mode 100644 packages/language-service/tests/utils/mockEnv.ts delete mode 100644 test-workspace/language-service/complete/#2454/input/entry.vue delete mode 100644 test-workspace/language-service/complete/#2454/output/entry.vue delete mode 100644 test-workspace/language-service/complete/#2511/input/component-for-auto-import.vue delete mode 100644 test-workspace/language-service/complete/#2511/input/entry.vue delete mode 100644 test-workspace/language-service/complete/#2511/output/entry.vue delete mode 100644 test-workspace/language-service/complete/#3658/input/entry.vue delete mode 100644 test-workspace/language-service/complete/#3658/output/entry.vue delete mode 100644 test-workspace/language-service/complete/#4639/input/entry.vue delete mode 100644 test-workspace/language-service/complete/#4639/output/entry.vue delete mode 100644 test-workspace/language-service/complete/$event/input/entry.vue delete mode 100644 test-workspace/language-service/complete/$event/output/entry.vue delete mode 100644 test-workspace/language-service/complete/component-auto-import/input/component-for-auto-import.vue delete mode 100644 test-workspace/language-service/complete/component-auto-import/input/entry.vue delete mode 100644 test-workspace/language-service/complete/component-auto-import/output/entry.vue delete mode 100644 test-workspace/language-service/complete/core#8811/input/entry.vue delete mode 100644 test-workspace/language-service/complete/core#8811/output/entry.vue delete mode 100644 test-workspace/language-service/complete/directives/input/entry.vue delete mode 100644 test-workspace/language-service/complete/directives/output/entry.vue delete mode 100644 test-workspace/language-service/complete/script-setup/input/entry.vue delete mode 100644 test-workspace/language-service/complete/script-setup/output/entry.vue delete mode 100644 test-workspace/language-service/complete/slot-name/input/main.vue delete mode 100644 test-workspace/language-service/complete/slot-name/output/main.vue delete mode 100644 test-workspace/language-service/complete/vue-file-path/input/alias-path.vue delete mode 100644 test-workspace/language-service/complete/vue-file-path/input/component.vue delete mode 100644 test-workspace/language-service/complete/vue-file-path/input/relative-path.vue delete mode 100644 test-workspace/language-service/complete/vue-file-path/output/alias-path.vue delete mode 100644 test-workspace/language-service/complete/vue-file-path/output/relative-path.vue delete mode 100644 test-workspace/language-service/find-definition/#2600/entry.vue delete mode 100644 test-workspace/language-service/find-definition/#2600/foo.vue delete mode 100644 test-workspace/language-service/find-definition/alias-path/entry.vue delete mode 100644 test-workspace/language-service/find-definition/alias-path/foo.ts delete mode 100644 test-workspace/language-service/find-definition/ts-to-vue/component.vue delete mode 100644 test-workspace/language-service/find-definition/ts-to-vue/entry.ts delete mode 100644 test-workspace/language-service/inlay-hint/destructured-props/entry.vue delete mode 100644 test-workspace/language-service/inlay-hint/inline-handler-leading/entry.vue delete mode 100644 test-workspace/language-service/inlay-hint/missing-props/Comp.vue delete mode 100644 test-workspace/language-service/inlay-hint/missing-props/entry.vue delete mode 100644 test-workspace/language-service/inlay-hint/option-wrapper/entry.vue delete mode 100644 test-workspace/language-service/reference/slot-default/entry.vue delete mode 100644 test-workspace/language-service/reference/slot-default/foo.vue delete mode 100644 test-workspace/language-service/reference/slot-named/entry.vue delete mode 100644 test-workspace/language-service/reference/slot-named/foo.vue delete mode 100644 test-workspace/language-service/reference/v-bind-shorthand/child.vue delete mode 100644 test-workspace/language-service/reference/v-bind-shorthand/entry.vue delete mode 100644 test-workspace/language-service/rename/#2410/input/entry.vue delete mode 100644 test-workspace/language-service/rename/#2410/output/entry.vue delete mode 100644 test-workspace/language-service/rename/component-prop/input/component.vue delete mode 100644 test-workspace/language-service/rename/component-prop/input/entry.vue delete mode 100644 test-workspace/language-service/rename/component-prop/output/component.vue delete mode 100644 test-workspace/language-service/rename/component-prop/output/entry.vue delete mode 100644 test-workspace/language-service/rename/component-tag/input/component.vue delete mode 100644 test-workspace/language-service/rename/component-tag/input/entry.vue delete mode 100644 test-workspace/language-service/rename/component-tag/output/component.vue delete mode 100644 test-workspace/language-service/rename/component-tag/output/entry.vue delete mode 100644 test-workspace/language-service/rename/component-type-prop/input/component.vue delete mode 100644 test-workspace/language-service/rename/component-type-prop/input/entry.vue delete mode 100644 test-workspace/language-service/rename/component-type-prop/output/component.vue delete mode 100644 test-workspace/language-service/rename/component-type-prop/output/entry.vue delete mode 100644 test-workspace/language-service/rename/css-module/input/entry.vue delete mode 100644 test-workspace/language-service/rename/css-module/output/entry.vue delete mode 100644 test-workspace/language-service/rename/css-scoped/input/entry.vue delete mode 100644 test-workspace/language-service/rename/css-scoped/output/entry.vue delete mode 100644 test-workspace/language-service/rename/css-vars/input/entry.vue delete mode 100644 test-workspace/language-service/rename/css-vars/output/entry.vue delete mode 100644 test-workspace/language-service/rename/dynamic-prop/input/entry.vue delete mode 100644 test-workspace/language-service/rename/dynamic-prop/output/entry.vue delete mode 100644 test-workspace/language-service/rename/regular-component/input/entry.vue delete mode 100644 test-workspace/language-service/rename/regular-component/output/entry.vue delete mode 100644 test-workspace/language-service/rename/script-setup/input/entry.vue delete mode 100644 test-workspace/language-service/rename/script-setup/output/entry.vue delete mode 100644 test-workspace/language-service/tsconfig.json create mode 100644 test-workspace/tsconfigProject/empty.vue create mode 100644 test-workspace/tsconfigProject/tsconfig.json diff --git a/package.json b/package.json index 12b5376536..2e95edd2db 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "release:next-base": "npm run release:base -- --dist-tag next", "release:next-vue": "cd ./extensions/vscode && npm 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", "chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter" @@ -31,6 +32,15 @@ }, "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" } } diff --git a/packages/language-server/lib/initialize.ts b/packages/language-server/lib/initialize.ts index 0ef344ed69..450353bfcb 100644 --- a/packages/language-server/lib/initialize.ts +++ b/packages/language-server/lib/initialize.ts @@ -56,7 +56,7 @@ export function initialize( }; } ), - getFullLanguageServicePlugins(ts) + getFullLanguageServicePlugins(ts, { disableAutoImportCache: params.initializationOptions.typescript.disableAutoImportCache }) ); function updateFileWatcher(vueCompilerOptions: VueCompilerOptions) { diff --git a/packages/language-server/package.json b/packages/language-server/package.json index bd4773003b..543f4ee864 100644 --- a/packages/language-server/package.json +++ b/packages/language-server/package.json @@ -17,6 +17,7 @@ "dependencies": { "@volar/language-core": "~2.4.0", "@volar/language-server": "~2.4.0", + "@volar/test-utils": "~2.4.0", "@vue/language-core": "2.0.28", "@vue/language-service": "2.0.28", "@vue/typescript-plugin": "2.0.28", diff --git a/packages/language-server/tests/completions.spec.ts b/packages/language-server/tests/completions.spec.ts new file mode 100644 index 0000000000..9323cef6f0 --- /dev/null +++ b/packages/language-server/tests/completions.spec.ts @@ -0,0 +1,410 @@ +import { TextDocument } from '@volar/language-server'; +import { afterEach, describe, expect, it } from 'vitest'; +import { URI } from 'vscode-uri'; +import { getLanguageServer, testWorkspacePath } from './server.js'; + +describe('Completions', async () => { + + it('Vue tags', async () => { + expect( + (await requestCompletionList('fixture.vue', 'vue', `<|`)).items.map(item => item.label) + ).toMatchInlineSnapshot(` + [ + "template", + "script", + "script setup", + "style", + "script lang="ts"", + "script lang="tsx"", + "script lang="jsx"", + "script setup lang="ts"", + "script setup lang="tsx"", + "script setup lang="jsx"", + "style lang="css"", + "style lang="scss"", + "style lang="less"", + "style lang="postcss"", + "template lang="pug"", + ] + `); + }); + + it('HTML tags and built-in components', async () => { + expect( + (await requestCompletionList('fixture.vue', 'vue', ``)).items.map(item => item.label) + ).toMatchInlineSnapshot(` + [ + "!DOCTYPE", + "html", + "head", + "title", + "base", + "link", + "meta", + "style", + "body", + "article", + "section", + "nav", + "aside", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "footer", + "address", + "p", + "hr", + "pre", + "blockquote", + "ol", + "ul", + "li", + "dl", + "dt", + "dd", + "figure", + "figcaption", + "main", + "div", + "a", + "em", + "strong", + "small", + "s", + "cite", + "q", + "dfn", + "abbr", + "ruby", + "rb", + "rt", + "rp", + "time", + "code", + "var", + "samp", + "kbd", + "sub", + "sup", + "i", + "b", + "u", + "mark", + "bdi", + "bdo", + "span", + "br", + "wbr", + "ins", + "del", + "picture", + "img", + "iframe", + "embed", + "object", + "param", + "video", + "audio", + "source", + "track", + "map", + "area", + "table", + "caption", + "colgroup", + "col", + "tbody", + "thead", + "tfoot", + "tr", + "td", + "th", + "form", + "label", + "input", + "button", + "select", + "datalist", + "optgroup", + "option", + "textarea", + "output", + "progress", + "meter", + "fieldset", + "legend", + "details", + "summary", + "dialog", + "script", + "noscript", + "canvas", + "data", + "hgroup", + "menu", + "Transition", + "TransitionGroup", + "KeepAlive", + "Teleport", + "Suspense", + "component", + "slot", + "template", + "fixture", + ] + `); + }); + + it('Directives', async () => { + await requestCompletionItem('fixture.vue', 'vue', ``, 'v-html'); + await requestCompletionItem('fixture.vue', 'vue', ``, 'v-cloak'); + await requestCompletionItem('fixture.vue', 'vue', ``, 'v-else'); + await requestCompletionItem('fixture.vue', 'vue', ``, 'v-pre'); + }); + + it('$event argument', async () => { + await requestCompletionItem('fixture.vue', 'vue', ``, 'event'); + }); + + it(' + `, 'foo'); + }); + + it('Slot name', async () => { + await requestCompletionItem('fixture.vue', 'vue', ` + + + + `, 'default'); + }); + + it('#2454', async () => { + await requestCompletionItem('fixture.vue', 'vue', ` + + + + `, 'v-loading'); + }); + + it('#2511', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/component-for-auto-import.vue', 'vue', ``); + expect( + (await requestCompletionItem('tsconfigProject/fixture.vue', 'vue', ` + + `, 'ComponentForAutoImport')).textEdit + ).toMatchInlineSnapshot(` + { + "newText": "import componentForAutoImport$1 from './component-for-auto-import.vue';", + "range": { + "end": { + "character": 23, + "line": 2, + }, + "start": { + "character": 4, + "line": 2, + }, + }, + } + `); + }); + + it('#3658', async () => { + await requestCompletionItem('fixture.vue', 'vue', ` + + `, 'foo'); + }); + + it('#4639', async () => { + await requestCompletionItem('fixture.vue', 'vue', ` + + `, 'capture'); + }); + + it('Alias path', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await requestCompletionItem('tsconfigProject/fixture.vue', 'vue', ` + + `, 'empty.vue'); + }); + + it('Relative path', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await requestCompletionItem('tsconfigProject/fixture.vue', 'vue', ` + + `, 'empty.vue'); + }); + + it('Component auto import', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/ComponentForAutoImport.vue', 'vue', ``); + expect( + (await requestCompletionItem('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'ComponentForAutoImport')) + ).toMatchInlineSnapshot(` + { + "additionalTextEdits": [ + { + "newText": " + import ComponentForAutoImport from './ComponentForAutoImport.vue'; + ", + "range": { + "end": { + "character": 28, + "line": 1, + }, + "start": { + "character": 28, + "line": 1, + }, + }, + }, + ], + "detail": "Add import from "./ComponentForAutoImport.vue" + (property) default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>", + "documentation": { + "kind": "markdown", + "value": "", + }, + "insertTextFormat": 1, + "kind": 5, + "label": "ComponentForAutoImport", + "labelDetails": { + "description": "./ComponentForAutoImport.vue", + }, + "sortText": "ï¿¿16", + "textEdit": { + "newText": "ComponentForAutoImport", + "range": { + "end": { + "character": 19, + "line": 5, + }, + "start": { + "character": 6, + "line": 5, + }, + }, + }, + } + `); + }); + + it('core#8811', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await requestCompletionItem('tsconfigProject/fixture.vue', 'vue', ` + + + + `, ':-foo-bar'); + }); + + const openedDocuments: TextDocument[] = []; + + afterEach(async () => { + const server = await getLanguageServer(); + for (const document of openedDocuments) { + await server.closeTextDocument(document.uri); + } + openedDocuments.length = 0; + }); + + /** + * @deprecated Remove this when #4717 fixed. + */ + async function ensureGlobalTypesHolder(folderName: string) { + const document = await prepareDocument(`${folderName}/globalTypesHolder.vue`, 'vue', ''); + const server = await getLanguageServer(); + await server.sendDocumentDiagnosticRequest(document.uri); + } + + async function requestCompletionItem(fileName: string, languageId: string, content: string, itemLabel: string) { + const completions = await requestCompletionList(fileName, languageId, content); + let completion = completions.items.find(item => item.label === itemLabel); + expect(completion).toBeDefined(); + if (completion!.data) { + const server = await getLanguageServer(); + completion = await server.sendCompletionResolveRequest(completion!); + expect(completion).toBeDefined(); + } + return completion!; + } + + async function requestCompletionList(fileName: string, languageId: string, content: string) { + const offset = content.indexOf('|'); + expect(offset).toBeGreaterThanOrEqual(0); + content = content.slice(0, offset) + content.slice(offset + 1); + + const server = await getLanguageServer(); + let document = await prepareDocument(fileName, languageId, content); + + const position = document.positionAt(offset); + const completions = await server.sendCompletionRequest(document.uri, position); + expect(completions).toBeDefined(); + + return completions!; + } + + async function prepareDocument(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + const uri = URI.file(`${testWorkspacePath}/${fileName}`); + const document = await server.openInMemoryDocument(uri.toString(), languageId, content); + if (openedDocuments.every(d => d.uri !== document.uri)) { + openedDocuments.push(document); + } + return document; + } +}); diff --git a/packages/language-server/tests/definitions.spec.ts b/packages/language-server/tests/definitions.spec.ts new file mode 100644 index 0000000000..7edc6ed622 --- /dev/null +++ b/packages/language-server/tests/definitions.spec.ts @@ -0,0 +1,161 @@ +import { Location, TextDocument } from '@volar/language-server'; +import { afterEach, describe, expect, it } from 'vitest'; +import { URI } from 'vscode-uri'; +import { getLanguageServer, testWorkspacePath } from './server.js'; + +describe('Definitions', async () => { + + it('TS to vue', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestDefinition('tsconfigProject/fixture1.ts', 'typescript', `import C|omponent from './empty.vue';`) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 0, + "line": 0, + }, + "start": { + "character": 0, + "line": 0, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/empty.vue", + }, + ] + `); + expect( + await requestDefinition('tsconfigProject/fixture2.ts', 'typescript', `import Component from '|./empty.vue';`) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 0, + "line": 0, + }, + "start": { + "character": 0, + "line": 0, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/empty.vue", + }, + ] + `); + }); + + it('Alias path', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.ts', 'typescript', `export const foo = 'foo';`); + expect( + await requestDefinition('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 25, + "line": 0, + }, + "start": { + "character": 0, + "line": 0, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/foo.ts", + }, + ] + `); + }); + + it('#2600', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + + + `); + expect( + await requestDefinition('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 0, + "line": 0, + }, + "start": { + "character": 0, + "line": 0, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/foo.vue", + }, + ] + `); + }); + + const openedDocuments: TextDocument[] = []; + + afterEach(async () => { + const server = await getLanguageServer(); + for (const document of openedDocuments) { + await server.closeTextDocument(document.uri); + } + openedDocuments.length = 0; + }); + + /** + * @deprecated Remove this when #4717 fixed. + */ + async function ensureGlobalTypesHolder(folderName: string) { + const document = await prepareDocument(`${folderName}/globalTypesHolder.vue`, 'vue', ''); + const server = await getLanguageServer(); + await server.sendDocumentDiagnosticRequest(document.uri); + } + + async function requestDefinition(fileName: string, languageId: string, content: string) { + const offset = content.indexOf('|'); + expect(offset).toBeGreaterThanOrEqual(0); + content = content.slice(0, offset) + content.slice(offset + 1); + + const server = await getLanguageServer(); + let document = await prepareDocument(fileName, languageId, content); + + const position = document.positionAt(offset); + const definition = await server.sendDefinitionRequest(document.uri, position) as Location[] | null; + expect(definition).toBeDefined(); + + for (const loc of definition!) { + loc.uri = 'file://${testWorkspacePath}' + loc.uri.slice(URI.file(testWorkspacePath).toString().length); + } + + return definition!; + } + + async function prepareDocument(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + const uri = URI.file(`${testWorkspacePath}/${fileName}`); + const document = await server.openInMemoryDocument(uri.toString(), languageId, content); + if (openedDocuments.every(d => d.uri !== document.uri)) { + openedDocuments.push(document); + } + return document; + } +}); diff --git a/packages/language-server/tests/inlayHints.spec.ts b/packages/language-server/tests/inlayHints.spec.ts new file mode 100644 index 0000000000..f3ac6a899a --- /dev/null +++ b/packages/language-server/tests/inlayHints.spec.ts @@ -0,0 +1,222 @@ +import { TextDocument } from '@volar/language-server'; +import { afterEach, describe, expect, it } from 'vitest'; +import { URI } from 'vscode-uri'; +import { getLanguageServer, testWorkspacePath } from './server.js'; + +describe('Definitions', async () => { + + it('Inline handler leading', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestInlayHintsResult('tsconfigProject/fixture.vue', 'vue', ` + + + + `) + ).toMatchInlineSnapshot(` + " + + + + " + `); + }); + + it('Missing props', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + `); + expect( + await requestInlayHintsResult('tsconfigProject/fixture.vue', 'vue', ` + + + + `) + ).toMatchInlineSnapshot(` + " + + + + " + `); + }); + + it('Options wrapper', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestInlayHintsResult('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + " + + " + `); + }); + + it('Destructured props', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestInlayHintsResult('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + " + + " + `); + }); + + const openedDocuments: TextDocument[] = []; + + afterEach(async () => { + const server = await getLanguageServer(); + for (const document of openedDocuments) { + await server.closeTextDocument(document.uri); + } + openedDocuments.length = 0; + }); + + /** + * @deprecated Remove this when #4717 fixed. + */ + async function ensureGlobalTypesHolder(folderName: string) { + const document = await prepareDocument(`${folderName}/globalTypesHolder.vue`, 'vue', ''); + const server = await getLanguageServer(); + await server.sendDocumentDiagnosticRequest(document.uri); + } + + async function requestInlayHintsResult(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + let document = await prepareDocument(fileName, languageId, content); + + const inlayHints = await server.sendInlayHintRequest(document.uri, { start: document.positionAt(0), end: document.positionAt(content.length) }); + expect(inlayHints).toBeDefined(); + expect(inlayHints!.length).greaterThan(0); + + let text = document.getText(); + for (const hint of inlayHints!.sort((a, b) => document.offsetAt(b.position) - document.offsetAt(a.position))) { + const offset = document.offsetAt(hint.position); + text = text.slice(0, offset) + '/* ' + hint.label + ' */' + text.slice(offset); + } + + return text; + } + + async function prepareDocument(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + const uri = URI.file(`${testWorkspacePath}/${fileName}`); + const document = await server.openInMemoryDocument(uri.toString(), languageId, content); + if (openedDocuments.every(d => d.uri !== document.uri)) { + openedDocuments.push(document); + } + return document; + } +}); diff --git a/packages/language-server/tests/references.spec.ts b/packages/language-server/tests/references.spec.ts new file mode 100644 index 0000000000..c7916f5357 --- /dev/null +++ b/packages/language-server/tests/references.spec.ts @@ -0,0 +1,199 @@ +import { TextDocument } from '@volar/language-server'; +import { afterEach, describe, expect, it } from 'vitest'; +import { URI } from 'vscode-uri'; +import { getLanguageServer, testWorkspacePath } from './server.js'; + +describe('Definitions', async () => { + + it('Default slot', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + + + `); + expect( + await requestReferences('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 16, + "line": 7, + }, + "start": { + "character": 5, + "line": 7, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/foo.vue", + }, + { + "range": { + "end": { + "character": 10, + "line": 2, + }, + "start": { + "character": 6, + "line": 2, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/fixture.vue", + }, + ] + `); + }); + + it('Named slot', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + + + `); + expect( + await requestReferences('tsconfigProject/fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 17, + "line": 6, + }, + "start": { + "character": 14, + "line": 6, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/foo.vue", + }, + { + "range": { + "end": { + "character": 19, + "line": 2, + }, + "start": { + "character": 16, + "line": 2, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/fixture.vue", + }, + ] + `); + }); + + it('v-bind shorthand', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestReferences('tsconfigProject/fixture.vue', 'vue', ` + + + + `) + ).toMatchInlineSnapshot(` + [ + { + "range": { + "end": { + "character": 14, + "line": 6, + }, + "start": { + "character": 11, + "line": 6, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/fixture.vue", + }, + { + "range": { + "end": { + "character": 13, + "line": 2, + }, + "start": { + "character": 10, + "line": 2, + }, + }, + "uri": "file://\${testWorkspacePath}/tsconfigProject/fixture.vue", + }, + ] + `); + }); + + const openedDocuments: TextDocument[] = []; + + afterEach(async () => { + const server = await getLanguageServer(); + for (const document of openedDocuments) { + await server.closeTextDocument(document.uri); + } + openedDocuments.length = 0; + }); + + /** + * @deprecated Remove this when #4717 fixed. + */ + async function ensureGlobalTypesHolder(folderName: string) { + const document = await prepareDocument(`${folderName}/globalTypesHolder.vue`, 'vue', ''); + const server = await getLanguageServer(); + await server.sendDocumentDiagnosticRequest(document.uri); + } + + async function requestReferences(fileName: string, languageId: string, content: string) { + const offset = content.indexOf('|'); + expect(offset).toBeGreaterThanOrEqual(0); + content = content.slice(0, offset) + content.slice(offset + 1); + + const server = await getLanguageServer(); + let document = await prepareDocument(fileName, languageId, content); + + const position = document.positionAt(offset); + const references = await server.sendReferencesRequest(document.uri, position, { includeDeclaration: false }); + expect(references).toBeDefined(); + + for (const loc of references!) { + loc.uri = 'file://${testWorkspacePath}' + loc.uri.slice(URI.file(testWorkspacePath).toString().length); + } + + return references!; + } + + async function prepareDocument(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + const uri = URI.file(`${testWorkspacePath}/${fileName}`); + const document = await server.openInMemoryDocument(uri.toString(), languageId, content); + if (openedDocuments.every(d => d.uri !== document.uri)) { + openedDocuments.push(document); + } + return document; + } +}); diff --git a/packages/language-server/tests/renaming.spec.ts b/packages/language-server/tests/renaming.spec.ts new file mode 100644 index 0000000000..c4a0356278 --- /dev/null +++ b/packages/language-server/tests/renaming.spec.ts @@ -0,0 +1,798 @@ +import { TextDocument } from '@volar/language-server'; +import { afterEach, describe, expect, it } from 'vitest'; +import { URI } from 'vscode-uri'; +import { getLanguageServer, testWorkspacePath } from './server.js'; + +describe('Renaming', async () => { + + it('#2410', async () => { + expect( + await requestRename('fixture.vue', 'vue', ``, 'h2') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "h2", + "range": { + "end": { + "character": 18, + "line": 0, + }, + "start": { + "character": 16, + "line": 0, + }, + }, + }, + { + "newText": "h2", + "range": { + "end": { + "character": 13, + "line": 0, + }, + "start": { + "character": 11, + "line": 0, + }, + }, + }, + ], + }, + } + `); + expect( + await requestRename('fixture.vue', 'vue', ``, 'h2') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "h2", + "range": { + "end": { + "character": 18, + "line": 0, + }, + "start": { + "character": 16, + "line": 0, + }, + }, + }, + { + "newText": "h2", + "range": { + "end": { + "character": 13, + "line": 0, + }, + "start": { + "character": 11, + "line": 0, + }, + }, + }, + ], + }, + } + `); + }); + + it('CSS', async () => { + expect( + await requestRename('fixture.vue', 'vue', ` + + + + + + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 28, + "line": 2, + }, + "start": { + "character": 25, + "line": 2, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 8, + "line": 7, + }, + "start": { + "character": 5, + "line": 7, + }, + }, + }, + ], + }, + } + `); + expect( + await requestRename('fixture.vue', 'vue', ` + + + + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 20, + "line": 2, + }, + "start": { + "character": 17, + "line": 2, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 8, + "line": 6, + }, + "start": { + "character": 5, + "line": 6, + }, + }, + }, + ], + }, + } + `); + expect( + await requestRename('fixture.vue', 'vue', ` + + + + + + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 34, + "line": 10, + }, + "start": { + "character": 31, + "line": 10, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 28, + "line": 10, + }, + "start": { + "character": 25, + "line": 10, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 28, + "line": 7, + }, + "start": { + "character": 25, + "line": 7, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 13, + "line": 2, + }, + "start": { + "character": 10, + "line": 2, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 35, + "line": 12, + }, + "start": { + "character": 32, + "line": 12, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 29, + "line": 12, + }, + "start": { + "character": 26, + "line": 12, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 35, + "line": 11, + }, + "start": { + "character": 32, + "line": 11, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 29, + "line": 11, + }, + "start": { + "character": 26, + "line": 11, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 29, + "line": 9, + }, + "start": { + "character": 26, + "line": 9, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 29, + "line": 8, + }, + "start": { + "character": 26, + "line": 8, + }, + }, + }, + ], + }, + } + `); + }); + + it('Component props', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + + + `); + expect( + await requestRename('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'cccDdd') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "cccDdd", + "range": { + "end": { + "character": 24, + "line": 6, + }, + "start": { + "character": 18, + "line": 6, + }, + }, + }, + { + "newText": "cccDdd", + "range": { + "end": { + "character": 14, + "line": 2, + }, + "start": { + "character": 8, + "line": 2, + }, + }, + }, + ], + "file://\${testWorkspacePath}/tsconfigProject/foo.vue": [ + { + "newText": "cccDdd", + "range": { + "end": { + "character": 17, + "line": 3, + }, + "start": { + "character": 11, + "line": 3, + }, + }, + }, + { + "newText": "ccc-ddd", + "range": { + "end": { + "character": 18, + "line": 2, + }, + "start": { + "character": 11, + "line": 2, + }, + }, + }, + ], + }, + } + `); + }); + + it('Component type props', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + await prepareDocument('tsconfigProject/foo.vue', 'vue', ` + + + + `); + expect( + await requestRename('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'cccDdd') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "cccDdd", + "range": { + "end": { + "character": 14, + "line": 2, + }, + "start": { + "character": 8, + "line": 2, + }, + }, + }, + { + "newText": "cccDdd", + "range": { + "end": { + "character": 24, + "line": 6, + }, + "start": { + "character": 18, + "line": 6, + }, + }, + }, + ], + "file://\${testWorkspacePath}/tsconfigProject/foo.vue": [ + { + "newText": "cccDdd", + "range": { + "end": { + "character": 17, + "line": 3, + }, + "start": { + "character": 11, + "line": 3, + }, + }, + }, + { + "newText": "ccc-ddd", + "range": { + "end": { + "character": 18, + "line": 2, + }, + "start": { + "character": 11, + "line": 2, + }, + }, + }, + ], + }, + } + `); + }); + + it('Component dynamic props', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestRename('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 13, + "line": 6, + }, + "start": { + "character": 10, + "line": 6, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 15, + "line": 2, + }, + "start": { + "character": 12, + "line": 2, + }, + }, + }, + ], + }, + } + `); + }); + + it('Component returns', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestRename('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 11, + "line": 2, + }, + "start": { + "character": 8, + "line": 2, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 10, + "line": 11, + }, + "start": { + "character": 7, + "line": 11, + }, + }, + }, + ], + }, + } + `); + }); + + it(' + `, 'bar') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "bar", + "range": { + "end": { + "character": 13, + "line": 6, + }, + "start": { + "character": 10, + "line": 6, + }, + }, + }, + { + "newText": "bar", + "range": { + "end": { + "character": 11, + "line": 2, + }, + "start": { + "character": 8, + "line": 2, + }, + }, + }, + ], + }, + } + `); + }); + + it('Component tags', async () => { + await ensureGlobalTypesHolder('tsconfigProject'); + expect( + await requestRename('tsconfigProject/fixture.vue', 'vue', ` + + + + `, 'CcDd') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/tsconfigProject/fixture.vue": [ + { + "newText": "cc-dd", + "range": { + "end": { + "character": 19, + "line": 3, + }, + "start": { + "character": 14, + "line": 3, + }, + }, + }, + { + "newText": "cc-dd", + "range": { + "end": { + "character": 11, + "line": 3, + }, + "start": { + "character": 6, + "line": 3, + }, + }, + }, + { + "newText": "CcDd", + "range": { + "end": { + "character": 17, + "line": 2, + }, + "start": { + "character": 13, + "line": 2, + }, + }, + }, + { + "newText": "CcDd", + "range": { + "end": { + "character": 10, + "line": 2, + }, + "start": { + "character": 6, + "line": 2, + }, + }, + }, + { + "newText": "CcDd", + "range": { + "end": { + "character": 15, + "line": 7, + }, + "start": { + "character": 11, + "line": 7, + }, + }, + }, + ], + }, + } + `); + }); + + const openedDocuments: TextDocument[] = []; + + afterEach(async () => { + const server = await getLanguageServer(); + for (const document of openedDocuments) { + await server.closeTextDocument(document.uri); + } + openedDocuments.length = 0; + }); + + /** + * @deprecated Remove this when #4717 fixed. + */ + async function ensureGlobalTypesHolder(folderName: string) { + const document = await prepareDocument(`${folderName}/globalTypesHolder.vue`, 'vue', ''); + const server = await getLanguageServer(); + await server.sendDocumentDiagnosticRequest(document.uri); + } + + async function requestRename(fileName: string, languageId: string, _content: string, newName: string) { + const offset = _content.indexOf('|'); + expect(offset).toBeGreaterThanOrEqual(0); + const content = _content.slice(0, offset) + _content.slice(offset + 1); + + const server = await getLanguageServer(); + let document = await prepareDocument(fileName, languageId, content); + + const position = document.positionAt(offset); + const edit = await server.sendRenameRequest(document.uri, position, newName); + expect(edit).toBeDefined(); + + for (const [uri, edits] of Object.entries(edit!.changes!)) { + delete edit!.changes![uri]; + edit!.changes!['file://${testWorkspacePath}' + uri.slice(URI.file(testWorkspacePath).toString().length)] = edits; + } + + return edit; + } + + async function prepareDocument(fileName: string, languageId: string, content: string) { + const server = await getLanguageServer(); + const uri = URI.file(`${testWorkspacePath}/${fileName}`); + const document = await server.openInMemoryDocument(uri.toString(), languageId, content); + if (openedDocuments.every(d => d.uri !== document.uri)) { + openedDocuments.push(document); + } + return document; + } +}); diff --git a/packages/language-server/tests/server.ts b/packages/language-server/tests/server.ts new file mode 100644 index 0000000000..13b4464e0f --- /dev/null +++ b/packages/language-server/tests/server.ts @@ -0,0 +1,43 @@ +import { ConfigurationRequest, PublishDiagnosticsNotification } from '@volar/language-server'; +import type { LanguageServerHandle } from '@volar/test-utils'; +import { startLanguageServer } from '@volar/test-utils'; +import * as path from 'path'; +import { URI } from 'vscode-uri'; + +let serverHandle: LanguageServerHandle | undefined; + +export const testWorkspacePath = path.resolve(__dirname, '../../../test-workspace'); + +export async function getLanguageServer() { + if (!serverHandle) { + serverHandle = startLanguageServer(require.resolve('../bin/vue-language-server.js'), testWorkspacePath); + serverHandle.connection.onNotification(PublishDiagnosticsNotification.type, () => { }); + serverHandle.connection.onRequest(ConfigurationRequest.type, ({ items }) => { + return items.map(({ section }) => { + if (section?.startsWith('vue.inlayHints.')) { + return true; + } + return null; + }); + }); + + await serverHandle.initialize( + URI.file(testWorkspacePath).toString(), + { + typescript: { + tsdk: path.dirname(require.resolve('typescript/lib/typescript.js')), + disableAutoImportCache: true, + }, + vue: { + hybridMode: false, + }, + }, + { + workspace: { + configuration: true, + }, + } + ); + } + return serverHandle; +} diff --git a/packages/language-service/index.ts b/packages/language-service/index.ts index 42fef932bc..122442fa92 100644 --- a/packages/language-service/index.ts +++ b/packages/language-service/index.ts @@ -45,9 +45,12 @@ declare module '@volar/language-service' { } } -export function getFullLanguageServicePlugins(ts: typeof import('typescript')): LanguageServicePlugin[] { +export function getFullLanguageServicePlugins( + ts: typeof import('typescript'), + { disableAutoImportCache }: { disableAutoImportCache?: boolean; } = {} +): LanguageServicePlugin[] { const plugins: LanguageServicePlugin[] = [ - ...createTypeScriptPlugins(ts), + ...createTypeScriptPlugins(ts, { disableAutoImportCache }), ...getCommonLanguageServicePlugins( ts, getTsPluginClientForLSP diff --git a/packages/language-service/tests/complete.ts b/packages/language-service/tests/complete.ts deleted file mode 100644 index 582287949d..0000000000 --- a/packages/language-service/tests/complete.ts +++ /dev/null @@ -1,118 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { describe, expect, it } from 'vitest'; -import type * as vscode from 'vscode-languageserver-protocol'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { tester } from './utils/createTester'; -import { fileNameToUri } from './utils/mockEnv'; - -const baseDir = path.resolve(__dirname, '../../../test-workspace/language-service/complete'); -const testDirs = fs.readdirSync(baseDir); -const getLineText = (text: string, line: number) => text.replace(/\r\n/g, '\n').split('\n')[line]; - -for (const dirName of testDirs) { - - describe(`complete: ${dirName}`, async () => { - - const dir = path.join(baseDir, dirName); - const inputFiles = readFiles(path.join(dir, 'input')); - const outputFiles = readFiles(path.join(dir, 'output')); - - for (const file in inputFiles) { - - const filePath = path.join(dir, 'input', file); - const uri = fileNameToUri(filePath); - const fileText = inputFiles[file]; - const document = TextDocument.create('', '', 0, fileText); - const actions = findCompleteActions(fileText); - - const expectedFileText = outputFiles[file]; - - for (const action of actions) { - - const position = document.positionAt(action.offset); - - position.line--; - - const location = `${filePath}:${position.line + 1}:${position.character + 1}`; - - it(`${location} => ${action.label}`, async () => { - - expect(expectedFileText).toBeDefined(); - - let complete = await tester.languageService.getCompletionItems( - uri, - position, - { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked } - ); - - if (!complete.items.length) { - // fix #2511 test case, it's a bug of TS 5.3 - complete = await tester.languageService.getCompletionItems( - uri, - position, - { triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked } - ); - } - - let item = complete.items.find(item => item.label === action.label)!; - - expect(item).toBeDefined(); - - item = await tester.languageService.resolveCompletionItem(item); - - let edits: vscode.TextEdit[] = []; - - if (item.textEdit) { - if ('replace' in item.textEdit) { - edits.push({ range: item.textEdit.replace, newText: item.textEdit.newText }); - } - else { - edits.push(item.textEdit); - } - } - else { - edits.push({ range: { start: position, end: position }, newText: item.insertText ?? item.label }); - } - - if (item.additionalTextEdits) { - edits = edits.concat(item.additionalTextEdits); - } - - let result = TextDocument.applyEdits(TextDocument.create('', '', 0, fileText), edits); - - result = result.replace(/\$0/g, '').replace(/\$1/g, ''); - - expect(getLineText(result, position.line)).toBe(getLineText(expectedFileText, position.line)); - }); - } - } - }); -} - -function readFiles(dir: string) { - - const filesText: Record = {}; - const files = fs.readdirSync(dir); - - for (const file of files) { - const filePath = path.join(dir, file); - filesText[file] = fs.readFileSync(filePath, 'utf8'); - } - - return filesText; -} - -function findCompleteActions(text: string) { - - return [...text.matchAll(/(\^*)complete:\s*([\S]*)/g)].map(flag => { - - const offset = flag.index; - const label = flag[2]; - - return { - offset, - label, - }; - }); -} diff --git a/packages/language-service/tests/findDefinition.ts b/packages/language-service/tests/findDefinition.ts deleted file mode 100644 index c359d44e3b..0000000000 --- a/packages/language-service/tests/findDefinition.ts +++ /dev/null @@ -1,94 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { describe, expect, it } from 'vitest'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { tester } from './utils/createTester'; -import { fileNameToUri } from './utils/mockEnv'; - -const baseDir = path.resolve(__dirname, '../../../test-workspace/language-service/find-definition'); -const testDirs = fs.readdirSync(baseDir); - -for (const dirName of testDirs) { - - describe(`find definition: ${dirName}`, async () => { - - const dir = path.join(baseDir, dirName); - const inputFiles = readFiles(dir); - - for (const file in inputFiles) { - - const filePath = path.join(dir, file); - const uri = fileNameToUri(filePath); - const fileText = inputFiles[file]; - const document = TextDocument.create('', '', 0, fileText); - const actions = findActions(fileText); - - for (const action of actions) { - - const position = document.positionAt(action.offset); - - position.line--; - - const targetFile = path.resolve(dir, action.targetFile); - const targetDocument = TextDocument.create('', '', 0, fs.readFileSync(targetFile, 'utf8')); - - it(`${filePath}:${position.line + 1}:${position.character + 1} => ${targetFile}:${action.targeRange.start}`, async () => { - - const locations = await tester.languageService.getDefinition( - uri, - position - ); - - expect(locations).toBeDefined(); - - const location = locations?.find(loc => - loc.targetUri === fileNameToUri(targetFile).toString() - && targetDocument.offsetAt(loc.targetSelectionRange.start) === action.targeRange.start - && targetDocument.offsetAt(loc.targetSelectionRange.end) === action.targeRange.end - ); - - if (!location) { - console.log(JSON.stringify(locations, null, 2)); - console.log(action.targeRange); - } - - expect(location).toBeDefined(); - }); - } - } - }); -} - -function readFiles(dir: string) { - - const filesText: Record = {}; - const files = fs.readdirSync(dir); - - for (const file of files) { - const filePath = path.join(dir, file); - filesText[file] = fs.readFileSync(filePath, 'utf8'); - } - - return filesText; -} - -const definitionReg = /(\^*)definition:\s*([\S]*),\s*([\S]*),\s*([\S]*)/g; - -function findActions(text: string) { - - return [...text.matchAll(definitionReg)].map(flag => { - - const offset = flag.index; - const targetFile = flag[2]; - const targeRange = { - start: Number(flag[3]), - end: Number(flag[4]), - }; - - return { - offset, - targetFile, - targeRange, - }; - }); -} diff --git a/packages/language-service/tests/index.spec.ts b/packages/language-service/tests/index.spec.ts deleted file mode 100644 index d06f93278c..0000000000 --- a/packages/language-service/tests/index.spec.ts +++ /dev/null @@ -1,5 +0,0 @@ -import './complete'; -import './findDefinition'; -import './rename'; -import './reference'; -import './inlayHint'; diff --git a/packages/language-service/tests/inlayHint.ts b/packages/language-service/tests/inlayHint.ts deleted file mode 100644 index 47a4acc65f..0000000000 --- a/packages/language-service/tests/inlayHint.ts +++ /dev/null @@ -1,80 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { describe, expect, it } from 'vitest'; -import { Range } from 'vscode-languageserver-protocol'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { tester } from './utils/createTester'; -import { fileNameToUri } from './utils/mockEnv'; - -const baseDir = path.resolve(__dirname, '../../../test-workspace/language-service/inlay-hint'); -const testDirs = fs.readdirSync(baseDir); - -for (const dirName of testDirs) { - - describe(`inlay hint: ${dirName}`, async () => { - - const dir = path.join(baseDir, dirName); - const inputFiles = readFiles(dir); - - for (const file in inputFiles) { - - const filePath = path.join(dir, file); - const uri = fileNameToUri(filePath); - const fileText = inputFiles[file]; - const document = TextDocument.create('', '', 0, fileText); - const actions = findActions(fileText); - - for (const action of actions) { - - const position = document.positionAt(action.offset); - - position.line--; - - const range = Range.create(position, { ...position, character: position.character + 1 }); - - const location = `${filePath}:${position.line + 1}:${position.character + 1}`; - - it(`${location}`, async () => { - - const inlayHints = await tester.languageService.getInlayHints( - uri, - range - ); - - const inlayHint = inlayHints?.find(inlayHint => inlayHint.label === action.label); - - expect(inlayHint).toBeDefined(); - }); - } - } - }); -} - -function readFiles(dir: string) { - - const filesText: Record = {}; - const files = fs.readdirSync(dir); - - for (const file of files) { - const filePath = path.join(dir, file); - filesText[file] = fs.readFileSync(filePath, 'utf8'); - } - - return filesText; -} - -const inlayHintReg = /(\^*)inlayHint:\s*"(.+)"/g; - -function findActions(text: string) { - - return [...text.matchAll(inlayHintReg)].map(flag => { - - const offset = flag.index; - const label = flag[2]; - - return { - offset, - label - }; - }); -} diff --git a/packages/language-service/tests/reference.ts b/packages/language-service/tests/reference.ts deleted file mode 100644 index d7fab82f3b..0000000000 --- a/packages/language-service/tests/reference.ts +++ /dev/null @@ -1,79 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { describe, expect, it } from 'vitest'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { tester } from './utils/createTester'; -import { fileNameToUri } from './utils/mockEnv'; - -const baseDir = path.resolve(__dirname, '../../../test-workspace/language-service/reference'); -const testDirs = fs.readdirSync(baseDir); - -for (const dirName of testDirs) { - - describe(`find reference: ${dirName}`, async () => { - - const dir = path.join(baseDir, dirName); - const inputFiles = readFiles(dir); - - for (const file in inputFiles) { - - const filePath = path.join(dir, file); - const uri = fileNameToUri(filePath); - const fileText = inputFiles[file]; - const document = TextDocument.create('', '', 0, fileText); - const actions = findActions(fileText); - - for (const action of actions) { - - const position = document.positionAt(action.offset); - - position.line--; - - const location = `${filePath}:${position.line + 1}:${position.character + 1}`; - - it(`${location} => count: ${action.count}`, async () => { - - const locations = await tester.languageService.getReferences( - uri, - position, - { includeDeclaration: true } - ); - - expect(locations).toBeDefined(); - - expect(locations?.length).toBe(action.count); - }); - } - } - }); -} - -function readFiles(dir: string) { - - const filesText: Record = {}; - const files = fs.readdirSync(dir); - - for (const file of files) { - const filePath = path.join(dir, file); - filesText[file] = fs.readFileSync(filePath, 'utf8'); - } - - return filesText; -} - -const referenceReg = /(\^*)reference:\s*([\S]*)/g; - -function findActions(text: string) { - - return [...text.matchAll(referenceReg)].map(flag => { - - const offset = flag.index; - // The definition itself is also counted - const count = Number(flag[2]) + 1; - - return { - offset, - count, - }; - }); -} diff --git a/packages/language-service/tests/rename.ts b/packages/language-service/tests/rename.ts deleted file mode 100644 index b3655b0ab4..0000000000 --- a/packages/language-service/tests/rename.ts +++ /dev/null @@ -1,99 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { describe, expect, it } from 'vitest'; -import { TextDocument } from 'vscode-languageserver-textdocument'; -import { tester } from './utils/createTester'; -import { fileNameToUri } from './utils/mockEnv'; - -const baseDir = path.resolve(__dirname, '../../../test-workspace/language-service/rename'); -const testDirs = fs.readdirSync(baseDir); - -for (const dirName of testDirs) { - - describe(`rename: ${dirName}`, async () => { - - const dir = path.join(baseDir, dirName); - const inputFiles = readFiles(path.join(dir, 'input')); - const outputFiles = readFiles(path.join(dir, 'output')); - - for (const file in inputFiles) { - - const filePath = path.join(dir, 'input', file); - const uri = fileNameToUri(filePath); - const fileText = inputFiles[file]; - const document = TextDocument.create('', '', 0, fileText); - const actions = findRenameActions(fileText); - - for (const action of actions) { - - for (let offset = action.start; offset <= action.end; offset++) { - - const position = document.positionAt(offset); - - position.line--; - - const location = `${filePath}:${position.line + 1}:${position.character + 1}`; - - it(`${location} => ${action.newName}`, async () => { - - const edit = await tester.languageService.getRenameEdits( - uri, - position, - action.newName - ); - - expect(edit).toBeDefined(); - - const tempFiles = { ...inputFiles }; - - for (const uri in edit!.changes) { - for (const file in tempFiles) { - if (uri.endsWith(file)) { - tempFiles[file] = TextDocument.applyEdits(TextDocument.create('', '', 0, tempFiles[file]), edit!.changes[uri]); - } - } - } - - expect(Object.keys(tempFiles).length).toBe(Object.keys(outputFiles).length); - - for (const file in tempFiles) { - expect(tempFiles[file]).toBe(outputFiles[file]); - } - }); - } - } - - } - }); -} - -function readFiles(dir: string) { - - const filesText: Record = {}; - const files = fs.readdirSync(dir); - - for (const file of files) { - const filePath = path.join(dir, file); - filesText[file] = fs.readFileSync(filePath, 'utf8'); - } - - return filesText; -} - -const renameReg = /(\^*)rename:\s*([\S]*)/g; - -function findRenameActions(text: string) { - - return [...text.matchAll(renameReg)].map(flag => { - - const start = flag.index; - const end = start + flag[1].length; - const newName = flag[2]; - - return { - start, - end, - newName, - }; - }); -} diff --git a/packages/language-service/tests/utils/createTester.ts b/packages/language-service/tests/utils/createTester.ts deleted file mode 100644 index e0c9e6f017..0000000000 --- a/packages/language-service/tests/utils/createTester.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { ProjectContext, createLanguage, createLanguageService, createUriMap } from '@volar/language-service'; -import { TypeScriptProjectHost, createLanguageServiceHost, resolveFileLanguageId } from '@volar/typescript'; -import * as path from 'path'; -import * as ts from 'typescript'; -import { URI } from 'vscode-uri'; -import { createParsedCommandLine, createRootFileChecker, createVueLanguagePlugin2, getFullLanguageServicePlugins } from '../..'; -import { createMockServiceEnv, fileNameToUri, uriToFileName } from './mockEnv'; - -export const rootUri = URI.file(path.resolve(__dirname, '../../../../test-workspace/language-service')); -export const tester = createTester(rootUri); - -function createTester(rootUri: URI) { - - const serviceEnv = createMockServiceEnv(rootUri, () => currentVSCodeSettings ?? defaultVSCodeSettings); - const rootPath = uriToFileName(rootUri); - const realTsConfig = path.join(rootPath, 'tsconfig.json').replace(/\\/g, '/'); - const parsedCommandLine = createParsedCommandLine(ts, ts.sys, realTsConfig); - parsedCommandLine.fileNames = parsedCommandLine.fileNames.map(fileName => fileName.replace(/\\/g, '/')); - const scriptSnapshots = new Map(); - const projectHost: TypeScriptProjectHost = { - getCurrentDirectory: () => uriToFileName(rootUri), - getProjectVersion: () => '0', - getScriptFileNames: () => parsedCommandLine.fileNames, - getCompilationSettings: () => parsedCommandLine.options, - }; - const vueLanguagePlugin = createVueLanguagePlugin2( - ts, - uriToFileName, - createRootFileChecker( - projectHost.getProjectVersion ? () => projectHost.getProjectVersion!() : undefined, - () => projectHost.getScriptFileNames(), - ts.sys.useCaseSensitiveFileNames - ), - parsedCommandLine.options, - parsedCommandLine.vueOptions - ); - const vueServicePlugins = getFullLanguageServicePlugins(ts); - const defaultVSCodeSettings: any = { - 'typescript.preferences.quoteStyle': 'single', - 'javascript.preferences.quoteStyle': 'single', - 'vue.inlayHints.destructuredProps': true, - 'vue.inlayHints.missingProps': true, - 'vue.inlayHints.optionsWrapper': true, - 'vue.inlayHints.inlineHandlerLeading': true, - }; - let currentVSCodeSettings: any; - const language = createLanguage( - [ - vueLanguagePlugin, - { - getLanguageId(uri) { - return resolveFileLanguageId(uri.fsPath); - }, - }, - ], - createUriMap(), - uri => { - const snapshot = getScriptSnapshot(uriToFileName(uri)); - if (snapshot) { - language.scripts.set(uri, snapshot); - } - else { - language.scripts.delete(uri); - } - } - ); - const project: ProjectContext = {}; - project.typescript = { - configFileName: realTsConfig, - sys: ts.sys, - uriConverter: { - asFileName: uriToFileName, - asUri: fileNameToUri, - }, - ...createLanguageServiceHost(ts, ts.sys, language, fileNameToUri, projectHost), - }; - project.vue = { - compilerOptions: parsedCommandLine.vueOptions, - }; - const languageService = createLanguageService(language, vueServicePlugins, serviceEnv, project); - - return { - serviceEnv, - projectHost, - languageService, - setVSCodeSettings, - }; - - function setVSCodeSettings(settings: any = undefined) { - currentVSCodeSettings = settings; - } - function getScriptSnapshot(fileName: string) { - const snapshot = scriptSnapshots.get(fileName); - if (snapshot) { - return snapshot; - } - const text = getScriptText(fileName); - if (text !== undefined) { - const snapshot = ts.ScriptSnapshot.fromString(text); - scriptSnapshots.set(fileName, snapshot); - return snapshot; - } - } - function getScriptText(fileName: string) { - if (ts.sys.fileExists(fileName)) { - return ts.sys.readFile(fileName, 'utf8'); - } - } -} diff --git a/packages/language-service/tests/utils/mockEnv.ts b/packages/language-service/tests/utils/mockEnv.ts deleted file mode 100644 index 2f642fe373..0000000000 --- a/packages/language-service/tests/utils/mockEnv.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { FileType, LanguageServiceEnvironment } from '@volar/language-service'; -import { URI } from 'vscode-uri'; -import * as fs from 'fs'; - -export const uriToFileName = (uri: URI) => uri.fsPath.replace(/\\/g, '/'); - -export const fileNameToUri = (fileName: string) => URI.file(fileName); - -export function createMockServiceEnv( - rootUri: URI, - getSettings = () => ({} as any) -): LanguageServiceEnvironment { - return { - workspaceFolders: [rootUri], - getConfiguration(section: string) { - const settings = getSettings(); - if (settings[section]) { - return settings[section]; - } - let result: Record | undefined; - for (const key in settings) { - if (key.startsWith(section + '.')) { - const newKey = key.slice(section.length + 1); - result ??= {}; - result[newKey] = settings[key]; - } - } - return result; - }, - fs: { - stat(uri) { - if (uri.scheme === 'file') { - try { - const stats = fs.statSync(uriToFileName(uri), { throwIfNoEntry: false }); - if (stats) { - return { - type: stats.isFile() ? FileType.File - : stats.isDirectory() ? FileType.Directory - : stats.isSymbolicLink() ? FileType.SymbolicLink - : FileType.Unknown, - ctime: stats.ctimeMs, - mtime: stats.mtimeMs, - size: stats.size, - }; - } - } - catch { - return undefined; - } - } - }, - readFile(uri, encoding) { - if (uri.scheme === 'file') { - try { - return fs.readFileSync(uriToFileName(uri), { encoding: encoding as 'utf-8' ?? 'utf-8' }); - } - catch { - return undefined; - } - } - }, - readDirectory(uri) { - if (uri.scheme === 'file') { - try { - const dirName = uriToFileName(uri); - const files = fs.readdirSync(dirName, { withFileTypes: true }); - return files.map<[string, FileType]>(file => { - return [file.name, file.isFile() ? FileType.File - : file.isDirectory() ? FileType.Directory - : file.isSymbolicLink() ? FileType.SymbolicLink - : FileType.Unknown]; - }); - } - catch { - return []; - } - } - return []; - }, - } - }; -} diff --git a/packages/typescript-plugin/lib/requests/collectExtractProps.ts b/packages/typescript-plugin/lib/requests/collectExtractProps.ts index 5b785f6478..9d31da27de 100644 --- a/packages/typescript-plugin/lib/requests/collectExtractProps.ts +++ b/packages/typescript-plugin/lib/requests/collectExtractProps.ts @@ -1,5 +1,4 @@ import { VueVirtualCode, isSemanticTokensEnabled } from '@vue/language-core'; -import type * as ts from 'typescript'; import type { RequestContext } from './types'; export function collectExtractProps( @@ -19,11 +18,7 @@ export function collectExtractProps( type: string; model: boolean; }>(); - const program: ts.Program = (languageService as any).getCurrentProgram(); - if (!program) { - return; - } - + const program = languageService.getProgram()!; const sourceFile = program.getSourceFile(fileName)!; const checker = program.getTypeChecker(); const script = volarFile.generated?.languagePlugin.typescript?.getServiceScript(volarFile.generated.root); diff --git a/packages/typescript-plugin/lib/requests/componentInfos.ts b/packages/typescript-plugin/lib/requests/componentInfos.ts index 145a9e2e18..cb069cb09e 100644 --- a/packages/typescript-plugin/lib/requests/componentInfos.ts +++ b/packages/typescript-plugin/lib/requests/componentInfos.ts @@ -15,11 +15,7 @@ export function getComponentProps( return; } const vueCode = volarFile.generated.root; - const program: ts.Program = (languageService as any).getCurrentProgram(); - if (!program) { - return; - } - + const program = languageService.getProgram()!; const checker = program.getTypeChecker(); const components = getVariableType(ts, languageService, vueCode, '__VLS_components'); if (!components) { @@ -97,11 +93,7 @@ export function getComponentEvents( return; } const vueCode = volarFile.generated.root; - const program: ts.Program = (languageService as any).getCurrentProgram(); - if (!program) { - return; - } - + const program = languageService.getProgram()!; const checker = program.getTypeChecker(); const components = getVariableType(ts, languageService, vueCode, '__VLS_components'); if (!components) { @@ -221,10 +213,7 @@ export function getElementAttrs( if (!(volarFile?.generated?.root instanceof vue.VueVirtualCode)) { return; } - const program: ts.Program = (languageService as any).getCurrentProgram(); - if (!program) { - return; - } + const program = languageService.getProgram()!; let tsSourceFile: ts.SourceFile | undefined; @@ -251,14 +240,11 @@ export function getElementAttrs( function getVariableType( ts: typeof import('typescript'), - tsLs: ts.LanguageService, + languageService: ts.LanguageService, vueCode: vue.VueVirtualCode, name: string ) { - const program: ts.Program = (tsLs as any).getCurrentProgram(); - if (!program) { - return; - } + const program = languageService.getProgram()!; let tsSourceFile: ts.SourceFile | undefined; diff --git a/packages/typescript-plugin/lib/requests/getPropertiesAtLocation.ts b/packages/typescript-plugin/lib/requests/getPropertiesAtLocation.ts index 6713546d69..834e4ebe6b 100644 --- a/packages/typescript-plugin/lib/requests/getPropertiesAtLocation.ts +++ b/packages/typescript-plugin/lib/requests/getPropertiesAtLocation.ts @@ -37,12 +37,7 @@ export function getPropertiesAtLocation( } } - - const program: ts.Program = (languageService as any).getCurrentProgram(); - if (!program) { - return; - } - + const program = languageService.getProgram()!; const sourceFile = program.getSourceFile(fileName); if (!sourceFile) { return; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af9786a46f..df1fd94061 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,15 @@ settings: excludeLinksFromLockfile: false 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 importers: @@ -24,8 +33,8 @@ importers: specifier: latest version: 1.0.14 '@volar/language-service': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee typescript: specifier: latest version: 5.5.3 @@ -45,8 +54,8 @@ importers: specifier: ^1.82.0 version: 1.91.0 '@volar/vscode': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee '@vscode/vsce': specifier: latest version: 3.0.0 @@ -75,8 +84,8 @@ importers: packages/component-meta: dependencies: '@volar/typescript': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -102,8 +111,8 @@ importers: packages/language-core: dependencies: '@volar/language-core': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -139,8 +148,8 @@ importers: specifier: ^1.0.1 version: 1.0.2 '@volar/typescript': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/compiler-sfc': specifier: ^3.4.0 version: 3.4.31 @@ -148,8 +157,8 @@ importers: packages/language-plugin-pug: dependencies: '@volar/source-map': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee volar-service-pug: specifier: 0.0.61 version: 0.0.61 @@ -164,11 +173,14 @@ importers: packages/language-server: dependencies: '@volar/language-core': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee '@volar/language-server': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee + '@volar/test-utils': + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@28cbdee '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -188,14 +200,14 @@ importers: packages/language-service: dependencies: '@volar/language-core': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee '@volar/language-service': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee '@volar/typescript': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/compiler-dom': specifier: ^3.4.0 version: 3.4.31 @@ -216,28 +228,28 @@ importers: version: 1.0.1 volar-service-css: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-emmet: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-html: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-json: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-pug: specifier: 0.0.61 version: 0.0.61 volar-service-pug-beautify: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-typescript: - specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + specifier: https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed + version: https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) volar-service-typescript-twoslash-queries: specifier: 0.0.61 - version: 0.0.61(@volar/language-service@2.4.0) + version: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) vscode-html-languageservice: specifier: ^5.2.0 version: 5.3.0 @@ -255,8 +267,8 @@ importers: specifier: latest version: 1.0.2 '@volar/kit': - specifier: ~2.4.0 - version: 2.4.0(typescript@5.5.3) + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.5.3) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -264,8 +276,8 @@ importers: packages/tsc: dependencies: '@volar/typescript': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -283,8 +295,8 @@ importers: packages/typescript-plugin: dependencies: '@volar/typescript': - specifier: ~2.4.0 - version: 2.4.0 + specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee + version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -1091,28 +1103,39 @@ packages: '@vitest/utils@2.0.3': resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} - '@volar/kit@2.4.0': - resolution: {integrity: sha512-uqwtPKhrbnP+3f8hs+ltDYXLZ6Wdbs54IzkaPocasI4aBhqWLht5qXctE1MqpZU52wbH359E0u9nhxEFmyon+w==} + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee} + version: 2.4.0 peerDependencies: typescript: '*' - '@volar/language-core@2.4.0': - resolution: {integrity: sha512-FTla+khE+sYK0qJP+6hwPAAUwiNHVMph4RUXpxf/FIPKUP61NFrVZorml4mjFShnueR2y9/j8/vnh09YwVdH7A==} + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee} + version: 2.4.0 + + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee} + version: 2.4.0 - '@volar/language-server@2.4.0': - resolution: {integrity: sha512-rmGIjAxWekWQiGH97Mosb4juiD/hfFYNQKV5Py9r7vDOLSkbIwRhITbwHm88NJKs8P6TNc6w/PfBXN6yjKadJg==} + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee} + version: 2.4.0 - '@volar/language-service@2.4.0': - resolution: {integrity: sha512-4P3yeQXIL68mLfS3n6P3m02IRg3GnLHUU9k/1PCHEfm5FG9bySkDOc72dbBn2vAa2BxOqm18bmmZXrsWuQ5AOw==} + '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee} + version: 2.4.0 - '@volar/source-map@2.4.0': - resolution: {integrity: sha512-2ceY8/NEZvN6F44TXw2qRP6AQsvCYhV2bxaBPWxV9HqIfkbRydSksTFObCF1DBDNBfKiZTS8G/4vqV6cvjdOIQ==} + '@volar/test-utils@https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/test-utils@28cbdee} + version: 2.4.0 - '@volar/typescript@2.4.0': - resolution: {integrity: sha512-9zx3lQWgHmVd+JRRAHUSRiEhe4TlzL7U7e6ulWXOxHH/WNYxzKwCvZD7WYWEZFdw4dHfTD9vUR0yPQO6GilCaQ==} + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee} + version: 2.4.0 - '@volar/vscode@2.4.0': - resolution: {integrity: sha512-VOnUgtmu+xGOqVKouRM8ZSeVOFPqmcTDfi3wif5peXpkOPsCgNdS/zns0xunuh9J6Ck5SV+QffPfmNW9XARnxw==} + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee': + resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee} + version: 2.4.0 '@vscode/emmet-helper@2.9.3': resolution: {integrity: sha512-rB39LHWWPQYYlYfpv9qCoZOVioPCftKXXqrsyqN1mTWZM6dTnONT63Db+03vgrBbHzJN45IrgS/AGxw9iiqfEw==} @@ -3275,40 +3298,45 @@ packages: volar-service-css@0.0.61: resolution: {integrity: sha512-Ct9L/w+IB1JU8F4jofcNCGoHy6TF83aiapfZq9A0qYYpq+Kk5dH+ONS+rVZSsuhsunq8UvAuF8Gk6B8IFLfniw==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true volar-service-emmet@0.0.61: resolution: {integrity: sha512-iiYqBxjjcekqrRruw4COQHZME6EZYWVbkHjHDbULpml3g8HGJHzpAMkj9tXNCPxf36A+f1oUYjsvZt36qPg4cg==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true volar-service-html@0.0.61: resolution: {integrity: sha512-yFE+YmmgqIL5HI4ORqP++IYb1QaGcv+xBboI0WkCxJJ/M35HZj7f5rbT3eQ24ECLXFbFCFanckwyWJVz5KmN3Q==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true volar-service-json@0.0.61: resolution: {integrity: sha512-9PpEib6XE99gFjjjl8IkITktSvfPW39jFAGsHggT6SdlIb8zC7J0+rMjkyVUAUOpWvY5jPqkByX43LcxZvkrdQ==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true volar-service-pug-beautify@0.0.61: resolution: {integrity: sha512-FvZEZJdZ64pa3a0u1Urz08g4gHjuPcdMsEsJGiDLYqJnIZEGZRyhHUjSxfmAxihZCzp738W90tOMQDbgeQMGhA==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true @@ -3318,16 +3346,18 @@ packages: volar-service-typescript-twoslash-queries@0.0.61: resolution: {integrity: sha512-99FICGrEF0r1E2tV+SvprHPw9Knyg7BdW2fUch0tf59kG+KG+Tj4tL6tUg+cy8f23O/VXlmsWFMIE+bx1dXPnQ==} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true - volar-service-typescript@0.0.61: - resolution: {integrity: sha512-4kRHxVbW7wFBHZWRU6yWxTgiKETBDIJNwmJUAWeP0mHaKpnDGj/astdRFKqGFRYVeEYl45lcUPhdJyrzanjsdQ==} + volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed: + resolution: {tarball: https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed} + version: 0.0.61 peerDependencies: - '@volar/language-service': ~2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee peerDependenciesMeta: '@volar/language-service': optional: true @@ -4350,24 +4380,24 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/kit@2.4.0(typescript@5.5.3)': + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.5.3)': dependencies: - '@volar/language-service': 2.4.0 - '@volar/typescript': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee typesafe-path: 0.2.2 typescript: 5.5.3 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-core@2.4.0': + '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee': dependencies: - '@volar/source-map': 2.4.0 + '@volar/source-map': https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee - '@volar/language-server@2.4.0': + '@volar/language-server@https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee': dependencies: - '@volar/language-core': 2.4.0 - '@volar/language-service': 2.4.0 - '@volar/typescript': 2.4.0 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee + '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee path-browserify: 1.0.1 request-light: 0.7.0 vscode-languageserver: 9.0.1 @@ -4375,24 +4405,31 @@ snapshots: vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/language-service@2.4.0': + '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee': dependencies: - '@volar/language-core': 2.4.0 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee vscode-languageserver-protocol: 3.17.5 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 - '@volar/source-map@2.4.0': {} + '@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': + dependencies: + '@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 + vscode-languageserver-textdocument: 1.0.11 + vscode-uri: 3.0.8 - '@volar/typescript@2.4.0': + '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee': dependencies: - '@volar/language-core': 2.4.0 + '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee path-browserify: 1.0.1 vscode-uri: 3.0.8 - '@volar/vscode@2.4.0': + '@volar/vscode@https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee': dependencies: - '@volar/language-server': 2.4.0 + '@volar/language-server': https://pkg.pr.new/volarjs/volar.js/@volar/language-server@28cbdee path-browserify: 1.0.1 vscode-languageclient: 9.0.1 vscode-nls: 5.2.0 @@ -6754,61 +6791,61 @@ snapshots: - supports-color - terser - volar-service-css@0.0.61(@volar/language-service@2.4.0): + volar-service-css@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-css-languageservice: 6.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee - volar-service-emmet@0.0.61(@volar/language-service@2.4.0): + volar-service-emmet@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: '@emmetio/css-parser': 0.4.0 '@emmetio/html-matcher': 1.3.0 '@vscode/emmet-helper': 2.9.3 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee - volar-service-html@0.0.61(@volar/language-service@2.4.0): + volar-service-html@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee - volar-service-json@0.0.61(@volar/language-service@2.4.0): + volar-service-json@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-json-languageservice: 5.4.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee - volar-service-pug-beautify@0.0.61(@volar/language-service@2.4.0): + volar-service-pug-beautify@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: '@johnsoncodehk/pug-beautify': 0.2.2 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee volar-service-pug@0.0.61: dependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee muggle-string: 0.4.1 pug-lexer: 5.0.1 pug-parser: 6.0.0 - volar-service-html: 0.0.61(@volar/language-service@2.4.0) + volar-service-html: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) vscode-html-languageservice: 5.3.0 vscode-languageserver-textdocument: 1.0.11 - volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@2.4.0): + volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee - volar-service-typescript@0.0.61(@volar/language-service@2.4.0): + volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: path-browserify: 1.0.1 semver: 7.6.2 @@ -6817,7 +6854,7 @@ snapshots: vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: - '@volar/language-service': 2.4.0 + '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee vscode-css-languageservice@6.3.0: dependencies: diff --git a/test-workspace/language-service/complete/#2454/input/entry.vue b/test-workspace/language-service/complete/#2454/input/entry.vue deleted file mode 100644 index 5fd9768ec3..0000000000 --- a/test-workspace/language-service/complete/#2454/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/#2454/output/entry.vue b/test-workspace/language-service/complete/#2454/output/entry.vue deleted file mode 100644 index 0680fd0fe9..0000000000 --- a/test-workspace/language-service/complete/#2454/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/#2511/input/component-for-auto-import.vue b/test-workspace/language-service/complete/#2511/input/component-for-auto-import.vue deleted file mode 100644 index 6b4c19a058..0000000000 --- a/test-workspace/language-service/complete/#2511/input/component-for-auto-import.vue +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-workspace/language-service/complete/#2511/input/entry.vue b/test-workspace/language-service/complete/#2511/input/entry.vue deleted file mode 100644 index 8f093eed73..0000000000 --- a/test-workspace/language-service/complete/#2511/input/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/#2511/output/entry.vue b/test-workspace/language-service/complete/#2511/output/entry.vue deleted file mode 100644 index 223cf4517a..0000000000 --- a/test-workspace/language-service/complete/#2511/output/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/#3658/input/entry.vue b/test-workspace/language-service/complete/#3658/input/entry.vue deleted file mode 100644 index fc9eb31456..0000000000 --- a/test-workspace/language-service/complete/#3658/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/test-workspace/language-service/complete/#3658/output/entry.vue b/test-workspace/language-service/complete/#3658/output/entry.vue deleted file mode 100644 index b8aa2161b7..0000000000 --- a/test-workspace/language-service/complete/#3658/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/test-workspace/language-service/complete/#4639/input/entry.vue b/test-workspace/language-service/complete/#4639/input/entry.vue deleted file mode 100644 index 730350bee7..0000000000 --- a/test-workspace/language-service/complete/#4639/input/entry.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/#4639/output/entry.vue b/test-workspace/language-service/complete/#4639/output/entry.vue deleted file mode 100644 index f470a01d83..0000000000 --- a/test-workspace/language-service/complete/#4639/output/entry.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/$event/input/entry.vue b/test-workspace/language-service/complete/$event/input/entry.vue deleted file mode 100644 index c8ee6a19cc..0000000000 --- a/test-workspace/language-service/complete/$event/input/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/$event/output/entry.vue b/test-workspace/language-service/complete/$event/output/entry.vue deleted file mode 100644 index 0d0cfecd3f..0000000000 --- a/test-workspace/language-service/complete/$event/output/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/component-auto-import/input/component-for-auto-import.vue b/test-workspace/language-service/complete/component-auto-import/input/component-for-auto-import.vue deleted file mode 100644 index 6b4c19a058..0000000000 --- a/test-workspace/language-service/complete/component-auto-import/input/component-for-auto-import.vue +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-workspace/language-service/complete/component-auto-import/input/entry.vue b/test-workspace/language-service/complete/component-auto-import/input/entry.vue deleted file mode 100644 index dac432aed0..0000000000 --- a/test-workspace/language-service/complete/component-auto-import/input/entry.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/component-auto-import/output/entry.vue b/test-workspace/language-service/complete/component-auto-import/output/entry.vue deleted file mode 100644 index 1072e574b6..0000000000 --- a/test-workspace/language-service/complete/component-auto-import/output/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/core#8811/input/entry.vue b/test-workspace/language-service/complete/core#8811/input/entry.vue deleted file mode 100644 index 68b817417a..0000000000 --- a/test-workspace/language-service/complete/core#8811/input/entry.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/core#8811/output/entry.vue b/test-workspace/language-service/complete/core#8811/output/entry.vue deleted file mode 100644 index e6ed09a9ae..0000000000 --- a/test-workspace/language-service/complete/core#8811/output/entry.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/directives/input/entry.vue b/test-workspace/language-service/complete/directives/input/entry.vue deleted file mode 100644 index 7608ec9344..0000000000 --- a/test-workspace/language-service/complete/directives/input/entry.vue +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/test-workspace/language-service/complete/directives/output/entry.vue b/test-workspace/language-service/complete/directives/output/entry.vue deleted file mode 100644 index 4800a2ef2f..0000000000 --- a/test-workspace/language-service/complete/directives/output/entry.vue +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/test-workspace/language-service/complete/script-setup/input/entry.vue b/test-workspace/language-service/complete/script-setup/input/entry.vue deleted file mode 100644 index 6db91e021e..0000000000 --- a/test-workspace/language-service/complete/script-setup/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/complete/script-setup/output/entry.vue b/test-workspace/language-service/complete/script-setup/output/entry.vue deleted file mode 100644 index 279f132f53..0000000000 --- a/test-workspace/language-service/complete/script-setup/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/complete/slot-name/input/main.vue b/test-workspace/language-service/complete/slot-name/input/main.vue deleted file mode 100644 index 8d71f0755c..0000000000 --- a/test-workspace/language-service/complete/slot-name/input/main.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/slot-name/output/main.vue b/test-workspace/language-service/complete/slot-name/output/main.vue deleted file mode 100644 index 574449504f..0000000000 --- a/test-workspace/language-service/complete/slot-name/output/main.vue +++ /dev/null @@ -1,15 +0,0 @@ - - - diff --git a/test-workspace/language-service/complete/vue-file-path/input/alias-path.vue b/test-workspace/language-service/complete/vue-file-path/input/alias-path.vue deleted file mode 100644 index c3f2edbf7e..0000000000 --- a/test-workspace/language-service/complete/vue-file-path/input/alias-path.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/vue-file-path/input/component.vue b/test-workspace/language-service/complete/vue-file-path/input/component.vue deleted file mode 100644 index 6b4c19a058..0000000000 --- a/test-workspace/language-service/complete/vue-file-path/input/component.vue +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-workspace/language-service/complete/vue-file-path/input/relative-path.vue b/test-workspace/language-service/complete/vue-file-path/input/relative-path.vue deleted file mode 100644 index b568bfed5b..0000000000 --- a/test-workspace/language-service/complete/vue-file-path/input/relative-path.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/vue-file-path/output/alias-path.vue b/test-workspace/language-service/complete/vue-file-path/output/alias-path.vue deleted file mode 100644 index 5d293a39d1..0000000000 --- a/test-workspace/language-service/complete/vue-file-path/output/alias-path.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/complete/vue-file-path/output/relative-path.vue b/test-workspace/language-service/complete/vue-file-path/output/relative-path.vue deleted file mode 100644 index 5dcd613e80..0000000000 --- a/test-workspace/language-service/complete/vue-file-path/output/relative-path.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/find-definition/#2600/entry.vue b/test-workspace/language-service/find-definition/#2600/entry.vue deleted file mode 100644 index a39313dd73..0000000000 --- a/test-workspace/language-service/find-definition/#2600/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/find-definition/#2600/foo.vue b/test-workspace/language-service/find-definition/#2600/foo.vue deleted file mode 100644 index 35fd4030f5..0000000000 --- a/test-workspace/language-service/find-definition/#2600/foo.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-workspace/language-service/find-definition/alias-path/entry.vue b/test-workspace/language-service/find-definition/alias-path/entry.vue deleted file mode 100644 index 0df2ffefbb..0000000000 --- a/test-workspace/language-service/find-definition/alias-path/entry.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/test-workspace/language-service/find-definition/alias-path/foo.ts b/test-workspace/language-service/find-definition/alias-path/foo.ts deleted file mode 100644 index 3329a7d972..0000000000 --- a/test-workspace/language-service/find-definition/alias-path/foo.ts +++ /dev/null @@ -1 +0,0 @@ -export const foo = 'foo'; diff --git a/test-workspace/language-service/find-definition/ts-to-vue/component.vue b/test-workspace/language-service/find-definition/ts-to-vue/component.vue deleted file mode 100644 index 6b4c19a058..0000000000 --- a/test-workspace/language-service/find-definition/ts-to-vue/component.vue +++ /dev/null @@ -1 +0,0 @@ - diff --git a/test-workspace/language-service/find-definition/ts-to-vue/entry.ts b/test-workspace/language-service/find-definition/ts-to-vue/entry.ts deleted file mode 100644 index d3e3c899c0..0000000000 --- a/test-workspace/language-service/find-definition/ts-to-vue/entry.ts +++ /dev/null @@ -1,4 +0,0 @@ -import Component from './component.vue'; - // ^definition: ./component.vue, 0, 0 -import Component from './component.vue'; - // ^definition: ./component.vue, 0, 0 diff --git a/test-workspace/language-service/inlay-hint/destructured-props/entry.vue b/test-workspace/language-service/inlay-hint/destructured-props/entry.vue deleted file mode 100644 index abc2c07f58..0000000000 --- a/test-workspace/language-service/inlay-hint/destructured-props/entry.vue +++ /dev/null @@ -1,52 +0,0 @@ - \ No newline at end of file diff --git a/test-workspace/language-service/inlay-hint/inline-handler-leading/entry.vue b/test-workspace/language-service/inlay-hint/inline-handler-leading/entry.vue deleted file mode 100644 index 56026683aa..0000000000 --- a/test-workspace/language-service/inlay-hint/inline-handler-leading/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/inlay-hint/missing-props/Comp.vue b/test-workspace/language-service/inlay-hint/missing-props/Comp.vue deleted file mode 100644 index 2cf8ee629f..0000000000 --- a/test-workspace/language-service/inlay-hint/missing-props/Comp.vue +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/test-workspace/language-service/inlay-hint/missing-props/entry.vue b/test-workspace/language-service/inlay-hint/missing-props/entry.vue deleted file mode 100644 index 670696c726..0000000000 --- a/test-workspace/language-service/inlay-hint/missing-props/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/test-workspace/language-service/inlay-hint/option-wrapper/entry.vue b/test-workspace/language-service/inlay-hint/option-wrapper/entry.vue deleted file mode 100644 index ae02ba0771..0000000000 --- a/test-workspace/language-service/inlay-hint/option-wrapper/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - \ No newline at end of file diff --git a/test-workspace/language-service/reference/slot-default/entry.vue b/test-workspace/language-service/reference/slot-default/entry.vue deleted file mode 100644 index a09b7689aa..0000000000 --- a/test-workspace/language-service/reference/slot-default/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/reference/slot-default/foo.vue b/test-workspace/language-service/reference/slot-default/foo.vue deleted file mode 100644 index 91ed6dfe33..0000000000 --- a/test-workspace/language-service/reference/slot-default/foo.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/test-workspace/language-service/reference/slot-named/entry.vue b/test-workspace/language-service/reference/slot-named/entry.vue deleted file mode 100644 index b4f17d8bc7..0000000000 --- a/test-workspace/language-service/reference/slot-named/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/reference/slot-named/foo.vue b/test-workspace/language-service/reference/slot-named/foo.vue deleted file mode 100644 index 0add3c2b7a..0000000000 --- a/test-workspace/language-service/reference/slot-named/foo.vue +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/test-workspace/language-service/reference/v-bind-shorthand/child.vue b/test-workspace/language-service/reference/v-bind-shorthand/child.vue deleted file mode 100644 index 51b389e379..0000000000 --- a/test-workspace/language-service/reference/v-bind-shorthand/child.vue +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/test-workspace/language-service/reference/v-bind-shorthand/entry.vue b/test-workspace/language-service/reference/v-bind-shorthand/entry.vue deleted file mode 100644 index 5f9a43593c..0000000000 --- a/test-workspace/language-service/reference/v-bind-shorthand/entry.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - diff --git a/test-workspace/language-service/rename/#2410/input/entry.vue b/test-workspace/language-service/rename/#2410/input/entry.vue deleted file mode 100644 index 899d61b095..0000000000 --- a/test-workspace/language-service/rename/#2410/input/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/rename/#2410/output/entry.vue b/test-workspace/language-service/rename/#2410/output/entry.vue deleted file mode 100644 index 98c4da87c6..0000000000 --- a/test-workspace/language-service/rename/#2410/output/entry.vue +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/test-workspace/language-service/rename/component-prop/input/component.vue b/test-workspace/language-service/rename/component-prop/input/component.vue deleted file mode 100644 index 1927ea488c..0000000000 --- a/test-workspace/language-service/rename/component-prop/input/component.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-prop/input/entry.vue b/test-workspace/language-service/rename/component-prop/input/entry.vue deleted file mode 100644 index bbbb4de943..0000000000 --- a/test-workspace/language-service/rename/component-prop/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-prop/output/component.vue b/test-workspace/language-service/rename/component-prop/output/component.vue deleted file mode 100644 index c2c6ae66c4..0000000000 --- a/test-workspace/language-service/rename/component-prop/output/component.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-prop/output/entry.vue b/test-workspace/language-service/rename/component-prop/output/entry.vue deleted file mode 100644 index 6c8426c210..0000000000 --- a/test-workspace/language-service/rename/component-prop/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-tag/input/component.vue b/test-workspace/language-service/rename/component-tag/input/component.vue deleted file mode 100644 index bc692573ed..0000000000 --- a/test-workspace/language-service/rename/component-tag/input/component.vue +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/test-workspace/language-service/rename/component-tag/input/entry.vue b/test-workspace/language-service/rename/component-tag/input/entry.vue deleted file mode 100644 index fc092f4a40..0000000000 --- a/test-workspace/language-service/rename/component-tag/input/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-tag/output/component.vue b/test-workspace/language-service/rename/component-tag/output/component.vue deleted file mode 100644 index bc692573ed..0000000000 --- a/test-workspace/language-service/rename/component-tag/output/component.vue +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/test-workspace/language-service/rename/component-tag/output/entry.vue b/test-workspace/language-service/rename/component-tag/output/entry.vue deleted file mode 100644 index 1d104e4130..0000000000 --- a/test-workspace/language-service/rename/component-tag/output/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-type-prop/input/component.vue b/test-workspace/language-service/rename/component-type-prop/input/component.vue deleted file mode 100644 index 092840f2d0..0000000000 --- a/test-workspace/language-service/rename/component-type-prop/input/component.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-type-prop/input/entry.vue b/test-workspace/language-service/rename/component-type-prop/input/entry.vue deleted file mode 100644 index bbbb4de943..0000000000 --- a/test-workspace/language-service/rename/component-type-prop/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-type-prop/output/component.vue b/test-workspace/language-service/rename/component-type-prop/output/component.vue deleted file mode 100644 index 540e4f2c81..0000000000 --- a/test-workspace/language-service/rename/component-type-prop/output/component.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/component-type-prop/output/entry.vue b/test-workspace/language-service/rename/component-type-prop/output/entry.vue deleted file mode 100644 index 6c8426c210..0000000000 --- a/test-workspace/language-service/rename/component-type-prop/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-module/input/entry.vue b/test-workspace/language-service/rename/css-module/input/entry.vue deleted file mode 100644 index de45f0f390..0000000000 --- a/test-workspace/language-service/rename/css-module/input/entry.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-module/output/entry.vue b/test-workspace/language-service/rename/css-module/output/entry.vue deleted file mode 100644 index 86b15434ce..0000000000 --- a/test-workspace/language-service/rename/css-module/output/entry.vue +++ /dev/null @@ -1,13 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-scoped/input/entry.vue b/test-workspace/language-service/rename/css-scoped/input/entry.vue deleted file mode 100644 index a1cee689ed..0000000000 --- a/test-workspace/language-service/rename/css-scoped/input/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-scoped/output/entry.vue b/test-workspace/language-service/rename/css-scoped/output/entry.vue deleted file mode 100644 index 662a634665..0000000000 --- a/test-workspace/language-service/rename/css-scoped/output/entry.vue +++ /dev/null @@ -1,8 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-vars/input/entry.vue b/test-workspace/language-service/rename/css-vars/input/entry.vue deleted file mode 100644 index d5243c4f62..0000000000 --- a/test-workspace/language-service/rename/css-vars/input/entry.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/css-vars/output/entry.vue b/test-workspace/language-service/rename/css-vars/output/entry.vue deleted file mode 100644 index 356c312f92..0000000000 --- a/test-workspace/language-service/rename/css-vars/output/entry.vue +++ /dev/null @@ -1,20 +0,0 @@ - - - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/dynamic-prop/input/entry.vue b/test-workspace/language-service/rename/dynamic-prop/input/entry.vue deleted file mode 100644 index 27273ad7af..0000000000 --- a/test-workspace/language-service/rename/dynamic-prop/input/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/dynamic-prop/output/entry.vue b/test-workspace/language-service/rename/dynamic-prop/output/entry.vue deleted file mode 100644 index 6b7618d004..0000000000 --- a/test-workspace/language-service/rename/dynamic-prop/output/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/regular-component/input/entry.vue b/test-workspace/language-service/rename/regular-component/input/entry.vue deleted file mode 100644 index d48540a7f5..0000000000 --- a/test-workspace/language-service/rename/regular-component/input/entry.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/regular-component/output/entry.vue b/test-workspace/language-service/rename/regular-component/output/entry.vue deleted file mode 100644 index 9fb7b7f589..0000000000 --- a/test-workspace/language-service/rename/regular-component/output/entry.vue +++ /dev/null @@ -1,17 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/script-setup/input/entry.vue b/test-workspace/language-service/rename/script-setup/input/entry.vue deleted file mode 100644 index f61a482552..0000000000 --- a/test-workspace/language-service/rename/script-setup/input/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/rename/script-setup/output/entry.vue b/test-workspace/language-service/rename/script-setup/output/entry.vue deleted file mode 100644 index 5a819003ef..0000000000 --- a/test-workspace/language-service/rename/script-setup/output/entry.vue +++ /dev/null @@ -1,9 +0,0 @@ - - - \ No newline at end of file diff --git a/test-workspace/language-service/tsconfig.json b/test-workspace/language-service/tsconfig.json deleted file mode 100644 index 133cb386d9..0000000000 --- a/test-workspace/language-service/tsconfig.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "exclude": "../tsconfig.json", - "compilerOptions": { - "paths": { - "__COMPLETE_ROOT__/*": [ - "./complete/*" - ], - "__FIND_DEFINITION_ROOT__/*": [ - "./find-definition/*" - ] - }, - }, - "include": [ "**/*" ], -} \ No newline at end of file diff --git a/test-workspace/tsconfigProject/empty.vue b/test-workspace/tsconfigProject/empty.vue new file mode 100644 index 0000000000..e69de29bb2 diff --git a/test-workspace/tsconfigProject/tsconfig.json b/test-workspace/tsconfigProject/tsconfig.json new file mode 100644 index 0000000000..885d9a3f6e --- /dev/null +++ b/test-workspace/tsconfigProject/tsconfig.json @@ -0,0 +1,9 @@ +{ + "exclude": [ "../tsconfig.json" ], + "include": [ "**/*" ], + "compilerOptions": { + "paths": { + "@/*": [ "./*" ] + } + } +} \ No newline at end of file diff --git a/vitest.config.ts b/vitest.config.ts index 7f9fdf64dd..4ae993ab38 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -3,8 +3,8 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { poolOptions: { - threads: { - singleThread: true, + forks: { + singleFork: true, isolate: false, }, }, From 0b99c6082b53a4cf5bd912390b2f818382a23e99 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 25 Aug 2024 20:28:11 +0800 Subject: [PATCH 12/37] test(tsc): test all typecheck cases in one tsconfig (#4723) --- packages/component-meta/tests/index.spec.ts | 2 +- packages/tsc/index.ts | 4 +- packages/tsc/tests/index.spec.ts | 97 ------------------- packages/tsc/tests/typecheck.spec.ts | 35 +++++++ test-workspace/component-meta/tsconfig.json | 2 +- test-workspace/tsc/#1886/tsconfig.json | 4 - test-workspace/tsc/#2157/tsconfig.json | 4 - .../#4569}/main.vue | 0 .../#4569}/tsconfig.json | 2 +- .../tsc/failureFixtures/directives/main.vue | 18 ++++ .../failureFixtures/directives/tsconfig.json | 4 + .../tsc/{ => passedFixtures}/#1886/main.vue | 0 .../tsc/passedFixtures/#1886/tsconfig.json | 4 + .../tsc/{ => passedFixtures}/#2157/main.vue | 0 .../tsc/passedFixtures/#2157/tsconfig.json | 4 + .../tsc/{ => passedFixtures}/#2472/child.vue | 0 .../tsc/{ => passedFixtures}/#2472/env.d.ts | 0 .../{ => passedFixtures}/#2472/generic.vue | 0 .../tsc/{ => passedFixtures}/#2472/main.vue | 0 .../{ => passedFixtures}/#2472/tsconfig.json | 2 +- .../tsc/{ => passedFixtures}/#3373/NavBar.vue | 0 .../tsc/{ => passedFixtures}/#3373/main.vue | 0 .../{ => passedFixtures}/#3373/tsconfig.json | 2 +- .../tsc/{ => passedFixtures}/#3574/child.vue | 0 .../tsc/{ => passedFixtures}/#3574/main.vue | 0 .../{ => passedFixtures}/#3574/tsconfig.json | 2 +- .../tsc/{ => passedFixtures}/#3592/main.vue | 0 .../{ => passedFixtures}/#3592/tsconfig.json | 2 +- .../tsc/{ => passedFixtures}/#3688/main.vue | 0 .../{ => passedFixtures}/#3688/tsconfig.json | 2 +- .../{ => passedFixtures}/#3819/component.vue | 0 .../tsc/{ => passedFixtures}/#3819/main.vue | 0 .../{ => passedFixtures}/#3819/tsconfig.json | 2 +- .../{ => passedFixtures}/#4503/globalcomp.vue | 0 .../{ => passedFixtures}/#4503/globals.d.ts | 0 .../tsc/{ => passedFixtures}/#4503/main.vue | 0 .../{ => passedFixtures}/#4503/tsconfig.json | 2 +- .../{ => passedFixtures}/core#9923/comp.vue | 0 .../{ => passedFixtures}/core#9923/main.vue | 0 .../core#9923/tsconfig.json | 2 +- .../#2236/main.vue | 0 .../#3106/main.vue | 0 .../tsconfig.json | 2 +- .../{ => passedFixtures}/petite-vue/main.html | 0 .../tsc/{ => passedFixtures}/pug/main.vue | 0 .../tsc/passedFixtures/pug/tsconfig.json | 11 +++ .../tsc/{ => passedFixtures}/shared.d.ts | 0 .../tsc/{ => passedFixtures}/vue2/env.d.ts | 0 .../{ => passedFixtures}/vue2/tsconfig.json | 2 +- .../vue2_strictTemplate/#3881/main.vue | 0 .../vue2_strictTemplate/tsconfig.json | 0 .../tsc/{ => passedFixtures}/vue3.3/env.d.ts | 0 .../{ => passedFixtures}/vue3.3/tsconfig.json | 2 +- .../vue3.5/components/main.vue | 0 .../components/script-setup-default-props.vue | 0 .../vue3.5/components/script-setup-expose.vue | 0 .../components/script-setup-generic.vue | 0 .../components/script-setup-type-only.vue | 0 .../vue3.5/components/script-setup.vue | 0 .../vue3.5/defineModel/main.vue | 0 .../vue3.5/defineModel/script-setup.vue | 0 .../vue3.5/defineProp_B/main.vue | 0 .../defineProp_B/script-setup-generic.vue | 0 .../vue3.5/defineProp_B/script-setup.vue | 0 .../tsc/{ => passedFixtures}/vue3.5/env.d.ts | 0 .../{ => passedFixtures}/vue3.5/tsconfig.json | 2 +- .../{ => passedFixtures}/vue3/#1855/child.vue | 0 .../{ => passedFixtures}/vue3/#1855/main.vue | 0 .../vue3/#2048/components.ts | 0 .../{ => passedFixtures}/vue3/#2048/main.vue | 0 .../{ => passedFixtures}/vue3/#2166/main.vue | 0 .../{ => passedFixtures}/vue3/#2206/main.vue | 0 .../{ => passedFixtures}/vue3/#2225/main.vue | 0 .../{ => passedFixtures}/vue3/#2250/main.vue | 0 .../{ => passedFixtures}/vue3/#2308/main.vue | 0 .../{ => passedFixtures}/vue3/#2370/main.vue | 0 .../{ => passedFixtures}/vue3/#2399/main.vue | 0 .../{ => passedFixtures}/vue3/#2431/main.vue | 0 .../{ => passedFixtures}/vue3/#2468/main.vue | 0 .../{ => passedFixtures}/vue3/#2514/main.vue | 0 .../{ => passedFixtures}/vue3/#2554/main.vue | 0 .../{ => passedFixtures}/vue3/#2586/main.vue | 0 .../{ => passedFixtures}/vue3/#2588/main.vue | 0 .../{ => passedFixtures}/vue3/#2590/foo.vue | 0 .../{ => passedFixtures}/vue3/#2617/main.vue | 0 .../{ => passedFixtures}/vue3/#2629/main.vue | 0 .../{ => passedFixtures}/vue3/#2638/main.vue | 0 .../{ => passedFixtures}/vue3/#2639/child.vue | 0 .../{ => passedFixtures}/vue3/#2639/main.vue | 0 .../{ => passedFixtures}/vue3/#2640/main.vue | 0 .../{ => passedFixtures}/vue3/#2646/main.vue | 0 .../{ => passedFixtures}/vue3/#2647/main.vue | 0 .../{ => passedFixtures}/vue3/#2678/main.vue | 0 .../{ => passedFixtures}/vue3/#2683/main.vue | 0 .../{ => passedFixtures}/vue3/#2691/main.vue | 0 .../{ => passedFixtures}/vue3/#2700/main.vue | 0 .../{ => passedFixtures}/vue3/#2709/child.vue | 0 .../{ => passedFixtures}/vue3/#2709/main.vue | 0 .../{ => passedFixtures}/vue3/#2712/main.vue | 0 .../{ => passedFixtures}/vue3/#2720/main.vue | 0 .../{ => passedFixtures}/vue3/#2725/main.vue | 0 .../{ => passedFixtures}/vue3/#2730/main.vue | 0 .../{ => passedFixtures}/vue3/#2744/child.vue | 0 .../{ => passedFixtures}/vue3/#2744/main.vue | 0 .../{ => passedFixtures}/vue3/#2754/child.vue | 0 .../{ => passedFixtures}/vue3/#2754/main.vue | 0 .../{ => passedFixtures}/vue3/#2758/child.vue | 0 .../{ => passedFixtures}/vue3/#2758/main.vue | 0 .../{ => passedFixtures}/vue3/#3100/child.vue | 0 .../{ => passedFixtures}/vue3/#3100/main.vue | 0 .../{ => passedFixtures}/vue3/#3102/main.vue | 0 .../{ => passedFixtures}/vue3/#3109/main.vue | 0 .../{ => passedFixtures}/vue3/#3117/main.vue | 0 .../{ => passedFixtures}/vue3/#3121/main.vue | 0 .../{ => passedFixtures}/vue3/#3122/child.vue | 0 .../{ => passedFixtures}/vue3/#3122/main.vue | 0 .../{ => passedFixtures}/vue3/#3123/main.vue | 0 .../{ => passedFixtures}/vue3/#3129/main.vue | 0 .../{ => passedFixtures}/vue3/#3138/main.vue | 2 +- .../{ => passedFixtures}/vue3/#3164/main.vue | 0 .../{ => passedFixtures}/vue3/#3171/main.vue | 0 .../{ => passedFixtures}/vue3/#3204/main.vue | 0 .../{ => passedFixtures}/vue3/#3255/main.vue | 0 .../{ => passedFixtures}/vue3/#3257/child.vue | 0 .../{ => passedFixtures}/vue3/#3257/main.vue | 0 .../{ => passedFixtures}/vue3/#3258/main.vue | 0 .../{ => passedFixtures}/vue3/#3258/main2.vue | 0 .../{ => passedFixtures}/vue3/#3289/child.vue | 0 .../{ => passedFixtures}/vue3/#3289/main.vue | 0 .../{ => passedFixtures}/vue3/#329/main.vue | 0 .../{ => passedFixtures}/vue3/#3295/main.vue | 0 .../vue3/#3311/component.vue | 0 .../{ => passedFixtures}/vue3/#3311/main.vue | 0 .../{ => passedFixtures}/vue3/#3318/child.vue | 0 .../{ => passedFixtures}/vue3/#3318/main.vue | 0 .../{ => passedFixtures}/vue3/#3327/main.vue | 0 .../{ => passedFixtures}/vue3/#3327/main2.vue | 0 .../{ => passedFixtures}/vue3/#3340/FooBar.ts | 0 .../{ => passedFixtures}/vue3/#3340/main.vue | 0 .../{ => passedFixtures}/vue3/#3353/main.vue | 0 .../{ => passedFixtures}/vue3/#3371/main.vue | 0 .../vue3/#3374/component.vue | 0 .../{ => passedFixtures}/vue3/#3374/main.vue | 0 .../{ => passedFixtures}/vue3/#3379/child.vue | 0 .../{ => passedFixtures}/vue3/#3379/main.vue | 0 .../{ => passedFixtures}/vue3/#3405/main.vue | 0 .../{ => passedFixtures}/vue3/#3414/main.vue | 0 .../{ => passedFixtures}/vue3/#3433/main.vue | 0 .../{ => passedFixtures}/vue3/#3440/main.vue | 0 .../{ => passedFixtures}/vue3/#3476/child.vue | 0 .../{ => passedFixtures}/vue3/#3476/main.vue | 0 .../{ => passedFixtures}/vue3/#3488/main.vue | 0 .../{ => passedFixtures}/vue3/#3518/main.vue | 0 .../{ => passedFixtures}/vue3/#3548/main.vue | 0 .../{ => passedFixtures}/vue3/#3561/child.vue | 0 .../{ => passedFixtures}/vue3/#3561/main.vue | 0 .../{ => passedFixtures}/vue3/#3612/main.vue | 0 .../{ => passedFixtures}/vue3/#3615/child.vue | 0 .../{ => passedFixtures}/vue3/#3615/main.vue | 0 .../{ => passedFixtures}/vue3/#3629/main.vue | 0 .../{ => passedFixtures}/vue3/#3637/main.vue | 0 .../{ => passedFixtures}/vue3/#3643/main.vue | 0 .../{ => passedFixtures}/vue3/#3656/child.vue | 0 .../{ => passedFixtures}/vue3/#3656/main.vue | 0 .../{ => passedFixtures}/vue3/#3671/main.vue | 0 .../{ => passedFixtures}/vue3/#3672/child.vue | 0 .../{ => passedFixtures}/vue3/#3672/main.vue | 0 .../{ => passedFixtures}/vue3/#3718/main.vue | 0 .../{ => passedFixtures}/vue3/#3732/child.vue | 0 .../vue3/#3732/child2.vue | 0 .../{ => passedFixtures}/vue3/#3732/main.ts | 0 .../{ => passedFixtures}/vue3/#3756/main.vue | 0 .../{ => passedFixtures}/vue3/#3782/main.vue | 0 .../{ => passedFixtures}/vue3/#3845/main.vue | 0 .../{ => passedFixtures}/vue3/#3997/main.vue | 0 .../{ => passedFixtures}/vue3/#4050/main.vue | 0 .../{ => passedFixtures}/vue3/#4209/main.vue | 0 .../{ => passedFixtures}/vue3/#4263/main.vue | 0 .../{ => passedFixtures}/vue3/#4326/main.vue | 2 +- .../{ => passedFixtures}/vue3/#4327/main.vue | 0 .../{ => passedFixtures}/vue3/#4333/main.vue | 0 .../{ => passedFixtures}/vue3/#4353/main.vue | 0 .../{ => passedFixtures}/vue3/#4361/main.vue | 0 .../{ => passedFixtures}/vue3/#4369/main.vue | 0 .../vue3/#4386/component.vue | 0 .../{ => passedFixtures}/vue3/#4386/main.vue | 0 .../vue3/#4387/comment-2113645943.vue | 0 .../vue3/#4387/component.vue | 0 .../{ => passedFixtures}/vue3/#4387/main.vue | 0 .../{ => passedFixtures}/vue3/#4413/main.vue | 0 .../{ => passedFixtures}/vue3/#4512/main.vue | 0 .../{ => passedFixtures}/vue3/#4512/test1.vue | 0 .../{ => passedFixtures}/vue3/#4512/test2.vue | 0 .../{ => passedFixtures}/vue3/#4512/test3.vue | 0 .../{ => passedFixtures}/vue3/#4537/main.vue | 0 .../vue3/#4540/component.vue | 0 .../{ => passedFixtures}/vue3/#4540/main.vue | 0 .../{ => passedFixtures}/vue3/#4600/main.vue | 0 .../{ => passedFixtures}/vue3/#4604/main.vue | 2 +- .../{ => passedFixtures}/vue3/#4646/child.vue | 2 +- .../vue3/#4646/child2.vue | 0 .../vue3/#4646/parent.vue | 2 +- .../{ => passedFixtures}/vue3/#4668/child.vue | 0 .../{ => passedFixtures}/vue3/#4668/main.vue | 2 +- .../{ => passedFixtures}/vue3/#625/main.vue | 0 .../{ => passedFixtures}/vue3/#997/main.vue | 0 .../vue3/components/main.vue | 0 .../components/script-setup-default-props.vue | 0 .../vue3/components/script-setup-expose.vue | 0 .../vue3/components/script-setup-generic.vue | 0 .../components/script-setup-type-only.vue | 0 .../vue3/components/script-setup.vue | 0 .../vue3/defineEmits/child.vue | 0 .../vue3/defineEmits/main.vue | 0 .../vue3/defineExpose/child.vue | 0 .../vue3/defineExpose/main.vue | 0 .../vue3/defineModel/main.vue | 0 .../vue3/defineModel/script-setup.vue | 0 .../vue3/defineOptions/child.vue | 2 +- .../vue3/defineProp_A/script-setup.vue | 0 .../vue3/defineProp_B/main.vue | 0 .../defineProp_B/script-setup-generic.vue | 0 .../vue3/defineProp_B/script-setup.vue | 0 .../vue3/directiveComments/main.vue | 0 .../vue3/directives/main.vue | 0 .../vue3/dynamic-component/main.vue | 0 .../{ => passedFixtures}/vue3/events/main.vue | 0 .../vue3/events/union_type.vue | 0 .../vue3/generic-interface/main.vue | 0 .../vue3/input-radio/main.vue | 0 .../vue3/namespace-component/main.vue | 0 .../vue3/no-script-block/main.vue | 0 .../vue3/reference-type-in-template/main.vue | 0 .../vue3/script-setup-scope/export-order.vue | 0 .../vue3/script-setup-scope/main.vue | 0 .../{ => passedFixtures}/vue3/slots/main.vue | 0 .../tsc/passedFixtures/vue3/tsconfig.json | 6 ++ .../vue3/type-helpers/main.vue | 0 .../vue3/unknownProp/main.vue | 0 .../vue3/v-bind-require-object/main.vue | 0 .../vue3/v-bind-shorthand/child.vue | 0 .../vue3/v-bind-shorthand/entry.vue | 0 .../vue3/v-for/generic.vue | 0 .../{ => passedFixtures}/vue3/v-for/main.vue | 0 .../{ => passedFixtures}/vue3/v-if/main.vue | 0 .../vue3/withDefaults/main.vue | 2 +- .../vue3_strictTemplate/#2726/main.vue | 0 .../vue3_strictTemplate/#3140/Focus.ts | 0 .../vue3_strictTemplate/#3140/main.vue | 0 .../vue3_strictTemplate/#3152/MyInput.vue | 0 .../vue3_strictTemplate/#3152/main.vue | 0 .../vue3_strictTemplate/#3539/main.vue | 0 .../vue3_strictTemplate/#3718/main.vue | 0 .../dataAttributes/main.vue | 0 .../intrinsicProps/main.vue | 0 .../vue3_strictTemplate/tsconfig.json | 2 +- .../vue3_strictTemplate/unknownProp/main.vue | 0 test-workspace/tsc/pug/tsconfig.json | 11 --- test-workspace/tsc/should-error-2/main.vue | 6 -- .../tsc/should-error-2/tsconfig.json | 4 - test-workspace/tsc/should-error-3/main.vue | 6 -- .../tsc/should-error-3/tsconfig.json | 4 - test-workspace/tsc/should-error/main.vue | 8 -- test-workspace/tsc/should-error/tsconfig.json | 4 - test-workspace/tsc/tsconfig.json | 27 ++++++ test-workspace/tsc/vue3/tsconfig.json | 6 -- .../{tsconfig.json => tsconfig.base.json} | 0 test-workspace/tsconfigProject/tsconfig.json | 2 +- vitest.config.ts | 1 + 269 files changed, 137 insertions(+), 181 deletions(-) delete mode 100644 packages/tsc/tests/index.spec.ts create mode 100644 packages/tsc/tests/typecheck.spec.ts delete mode 100644 test-workspace/tsc/#1886/tsconfig.json delete mode 100644 test-workspace/tsc/#2157/tsconfig.json rename test-workspace/tsc/{should-error-#4569 => failureFixtures/#4569}/main.vue (100%) rename test-workspace/tsc/{should-error-#4569 => failureFixtures/#4569}/tsconfig.json (74%) create mode 100644 test-workspace/tsc/failureFixtures/directives/main.vue create mode 100644 test-workspace/tsc/failureFixtures/directives/tsconfig.json rename test-workspace/tsc/{ => passedFixtures}/#1886/main.vue (100%) create mode 100644 test-workspace/tsc/passedFixtures/#1886/tsconfig.json rename test-workspace/tsc/{ => passedFixtures}/#2157/main.vue (100%) create mode 100644 test-workspace/tsc/passedFixtures/#2157/tsconfig.json rename test-workspace/tsc/{ => passedFixtures}/#2472/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#2472/env.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/#2472/generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#2472/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#2472/tsconfig.json (63%) rename test-workspace/tsc/{ => passedFixtures}/#3373/NavBar.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3373/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3373/tsconfig.json (73%) rename test-workspace/tsc/{ => passedFixtures}/#3574/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3574/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3574/tsconfig.json (69%) rename test-workspace/tsc/{ => passedFixtures}/#3592/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3592/tsconfig.json (61%) rename test-workspace/tsc/{ => passedFixtures}/#3688/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3688/tsconfig.json (71%) rename test-workspace/tsc/{ => passedFixtures}/#3819/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3819/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#3819/tsconfig.json (67%) rename test-workspace/tsc/{ => passedFixtures}/#4503/globalcomp.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#4503/globals.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/#4503/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/#4503/tsconfig.json (67%) rename test-workspace/tsc/{ => passedFixtures}/core#9923/comp.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/core#9923/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/core#9923/tsconfig.json (65%) rename test-workspace/tsc/{ => passedFixtures}/noPropertyAccessFromIndexSignature/#2236/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/noPropertyAccessFromIndexSignature/#3106/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/noPropertyAccessFromIndexSignature/tsconfig.json (69%) rename test-workspace/tsc/{ => passedFixtures}/petite-vue/main.html (100%) rename test-workspace/tsc/{ => passedFixtures}/pug/main.vue (100%) create mode 100644 test-workspace/tsc/passedFixtures/pug/tsconfig.json rename test-workspace/tsc/{ => passedFixtures}/shared.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue2/env.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue2/tsconfig.json (92%) rename test-workspace/tsc/{ => passedFixtures}/vue2_strictTemplate/#3881/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue2_strictTemplate/tsconfig.json (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.3/env.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.3/tsconfig.json (75%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/script-setup-default-props.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/script-setup-expose.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/script-setup-generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/script-setup-type-only.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/components/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/defineModel/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/defineModel/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/defineProp_B/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/defineProp_B/script-setup-generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/defineProp_B/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/env.d.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3.5/tsconfig.json (64%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#1855/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#1855/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2048/components.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2048/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2166/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2206/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2225/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2250/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2308/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2370/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2399/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2431/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2468/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2514/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2554/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2586/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2588/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2590/foo.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2617/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2629/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2638/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2639/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2639/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2640/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2646/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2647/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2678/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2683/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2691/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2700/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2709/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2709/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2712/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2720/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2725/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2730/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2744/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2744/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2754/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2754/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2758/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#2758/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3100/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3100/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3102/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3109/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3117/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3121/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3122/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3122/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3123/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3129/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3138/main.vue (85%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3164/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3171/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3204/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3255/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3257/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3257/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3258/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3258/main2.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3289/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3289/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#329/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3295/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3311/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3311/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3318/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3318/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3327/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3327/main2.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3340/FooBar.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3340/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3353/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3371/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3374/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3374/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3379/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3379/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3405/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3414/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3433/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3440/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3476/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3476/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3488/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3518/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3548/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3561/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3561/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3612/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3615/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3615/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3629/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3637/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3643/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3656/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3656/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3671/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3672/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3672/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3718/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3732/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3732/child2.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3732/main.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3756/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3782/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3845/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#3997/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4050/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4209/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4263/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4326/main.vue (81%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4327/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4333/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4353/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4361/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4369/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4386/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4386/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4387/comment-2113645943.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4387/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4387/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4413/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4512/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4512/test1.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4512/test2.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4512/test3.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4537/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4540/component.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4540/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4600/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4604/main.vue (83%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4646/child.vue (84%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4646/child2.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4646/parent.vue (89%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4668/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#4668/main.vue (88%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#625/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/#997/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/script-setup-default-props.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/script-setup-expose.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/script-setup-generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/script-setup-type-only.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/components/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineEmits/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineEmits/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineExpose/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineExpose/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineModel/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineModel/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineOptions/child.vue (83%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineProp_A/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineProp_B/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineProp_B/script-setup-generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/defineProp_B/script-setup.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/directiveComments/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/directives/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/dynamic-component/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/events/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/events/union_type.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/generic-interface/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/input-radio/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/namespace-component/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/no-script-block/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/reference-type-in-template/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/script-setup-scope/export-order.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/script-setup-scope/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/slots/main.vue (100%) create mode 100644 test-workspace/tsc/passedFixtures/vue3/tsconfig.json rename test-workspace/tsc/{ => passedFixtures}/vue3/type-helpers/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/unknownProp/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-bind-require-object/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-bind-shorthand/child.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-bind-shorthand/entry.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-for/generic.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-for/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/v-if/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3/withDefaults/main.vue (87%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#2726/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3140/Focus.ts (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3140/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3152/MyInput.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3152/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3539/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/#3718/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/dataAttributes/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/intrinsicProps/main.vue (100%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/tsconfig.json (65%) rename test-workspace/tsc/{ => passedFixtures}/vue3_strictTemplate/unknownProp/main.vue (100%) delete mode 100644 test-workspace/tsc/pug/tsconfig.json delete mode 100644 test-workspace/tsc/should-error-2/main.vue delete mode 100644 test-workspace/tsc/should-error-2/tsconfig.json delete mode 100644 test-workspace/tsc/should-error-3/main.vue delete mode 100644 test-workspace/tsc/should-error-3/tsconfig.json delete mode 100644 test-workspace/tsc/should-error/main.vue delete mode 100644 test-workspace/tsc/should-error/tsconfig.json create mode 100644 test-workspace/tsc/tsconfig.json delete mode 100644 test-workspace/tsc/vue3/tsconfig.json rename test-workspace/{tsconfig.json => tsconfig.base.json} (100%) diff --git a/packages/component-meta/tests/index.spec.ts b/packages/component-meta/tests/index.spec.ts index dfe7f7dcd5..4c78583a0b 100644 --- a/packages/component-meta/tests/index.spec.ts +++ b/packages/component-meta/tests/index.spec.ts @@ -863,7 +863,7 @@ const tsconfigChecker = createChecker( const noTsConfigChecker = createCheckerByJson( path.resolve(__dirname, '../../../test-workspace/component-meta'), { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "include": [ "**/*", ], diff --git a/packages/tsc/index.ts b/packages/tsc/index.ts index c82cbc4ac5..36f0600e43 100644 --- a/packages/tsc/index.ts +++ b/packages/tsc/index.ts @@ -3,13 +3,13 @@ import * as vue from '@vue/language-core'; const windowsPathReg = /\\/g; -export function run() { +export function run(tscPath = require.resolve('typescript/lib/tsc')) { let runExtensions = ['.vue']; const extensionsChangedException = new Error('extensions changed'); const main = () => runTsc( - require.resolve('typescript/lib/tsc'), + tscPath, runExtensions, (ts, options) => { const { configFilePath } = options.options; diff --git a/packages/tsc/tests/index.spec.ts b/packages/tsc/tests/index.spec.ts deleted file mode 100644 index feff8b7560..0000000000 --- a/packages/tsc/tests/index.spec.ts +++ /dev/null @@ -1,97 +0,0 @@ -import * as path from 'path'; -import * as fs from 'fs'; -import { describe, it } from 'vitest'; -import { fork } from 'child_process'; - -const binPath = require.resolve('../bin/vue-tsc.js'); -const workspace = path.resolve(__dirname, '../../../test-workspace/tsc'); -const shouldErrorDirs = [ - 'should-error', - 'should-error-2', - 'should-error-3', - 'should-error-#4569', -]; - -function prettyPath(path: string, isRoot: boolean) { - const segments = path.split('/'); - const slicePath = (seg: number) => segments - .slice(segments.length - seg, segments.length) - .join('/') - .replace('test-workspace/tsc/', ''); - return !isRoot ? slicePath(4) : slicePath(3); -} - -function collectTests(dir: string, depth = 2, isRoot: boolean = true): [filePath: string, isRoot: boolean][] { - const tests: [filePath: string, isRoot: boolean][] = []; - - if (depth <= 0) { - return tests; - } - - const files = fs.readdirSync(dir); - for (const file of files) { - const filePath = path.join(dir, file); - const stat = fs.statSync(filePath); - if (stat.isDirectory() && !shouldErrorDirs.includes(file)) { - const tsconfigPath = path.join(filePath, 'tsconfig.json'); - if (fs.existsSync(tsconfigPath)) { - tests.push([ - filePath.replace(/\\/g, '/'), - isRoot, - ]); - } - tests.push(...collectTests(filePath, depth - 1, false)); - } - } - - return tests; -} - -const tests = collectTests(workspace); - -function runVueTsc(cwd: string) { - return new Promise((resolve, reject) => { - const cp = fork( - binPath, - [], - { - silent: true, - cwd - } - ); - - cp.stdout?.setEncoding('utf8'); - cp.stdout?.on('data', data => { - console.log(data); - }); - cp.stderr?.setEncoding('utf8'); - cp.stderr?.on('data', data => { - console.error(data); - }); - - cp.on('exit', code => { - if (code === 0) { - resolve(undefined); - } else { - reject(new Error(`Exited with code ${code}`)); - } - }); - }); -} - -describe(`vue-tsc`, () => { - for (const [path, isRoot] of tests) { - it(`vue-tsc no errors (${prettyPath(path, isRoot)})`, () => runVueTsc(path), 400_000); - } - - for (const dir of shouldErrorDirs) { - it(`should throw an error when no vue-expect-error is used but the there is no error (${dir})`, async () => { - try { - await runVueTsc(path.resolve(workspace, dir)); - } catch (e) { - return; - } - throw new Error('Expected an error but got none'); - }); - } -}); diff --git a/packages/tsc/tests/typecheck.spec.ts b/packages/tsc/tests/typecheck.spec.ts new file mode 100644 index 0000000000..a4b03d6bad --- /dev/null +++ b/packages/tsc/tests/typecheck.spec.ts @@ -0,0 +1,35 @@ +import * as path from 'path'; +import { describe, expect, it } from 'vitest'; +import { run } from '..'; + +describe(`vue-tsc`, () => { + + it(`typecheck`, async () => { + const consoleOutput: string[] = []; + const originalConsoleLog = process.stdout.write; + const originalArgv = process.argv; + process.stdout.write = output => { + consoleOutput.push(String(output).trim()); + return true; + }; + process.argv = [ + ...originalArgv, + '--build', + path.resolve(__dirname, '../../../test-workspace/tsc'), + '--pretty', + 'false', + ]; + try { + run(); + } catch (err) { } + process.stdout.write = originalConsoleLog; + process.argv = originalArgv; + expect(consoleOutput).toMatchInlineSnapshot(` + [ + "test-workspace/tsc/failureFixtures/directives/main.vue(4,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", + "test-workspace/tsc/failureFixtures/directives/main.vue(9,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", + "test-workspace/tsc/failureFixtures/directives/main.vue(12,2): error TS2578: Unused '@ts-expect-error' directive.", + ] + `);; + }); +}); diff --git a/test-workspace/component-meta/tsconfig.json b/test-workspace/component-meta/tsconfig.json index cb210e47a8..7e7c9dab5e 100644 --- a/test-workspace/component-meta/tsconfig.json +++ b/test-workspace/component-meta/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../tsconfig.base.json", "include": [ "**/*", ], diff --git a/test-workspace/tsc/#1886/tsconfig.json b/test-workspace/tsc/#1886/tsconfig.json deleted file mode 100644 index a1e651d6e8..0000000000 --- a/test-workspace/tsc/#1886/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": [ "**/*" ] -} diff --git a/test-workspace/tsc/#2157/tsconfig.json b/test-workspace/tsc/#2157/tsconfig.json deleted file mode 100644 index a1e651d6e8..0000000000 --- a/test-workspace/tsc/#2157/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": [ "**/*" ] -} diff --git a/test-workspace/tsc/should-error-#4569/main.vue b/test-workspace/tsc/failureFixtures/#4569/main.vue similarity index 100% rename from test-workspace/tsc/should-error-#4569/main.vue rename to test-workspace/tsc/failureFixtures/#4569/main.vue diff --git a/test-workspace/tsc/should-error-#4569/tsconfig.json b/test-workspace/tsc/failureFixtures/#4569/tsconfig.json similarity index 74% rename from test-workspace/tsc/should-error-#4569/tsconfig.json rename to test-workspace/tsc/failureFixtures/#4569/tsconfig.json index f2538ef6cf..9968581839 100644 --- a/test-workspace/tsc/should-error-#4569/tsconfig.json +++ b/test-workspace/tsc/failureFixtures/#4569/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": [ "**/*" ], "compilerOptions": { "noEmit": false, diff --git a/test-workspace/tsc/failureFixtures/directives/main.vue b/test-workspace/tsc/failureFixtures/directives/main.vue new file mode 100644 index 0000000000..2dcf19bfb7 --- /dev/null +++ b/test-workspace/tsc/failureFixtures/directives/main.vue @@ -0,0 +1,18 @@ + + + diff --git a/test-workspace/tsc/failureFixtures/directives/tsconfig.json b/test-workspace/tsc/failureFixtures/directives/tsconfig.json new file mode 100644 index 0000000000..52ecbeb3c3 --- /dev/null +++ b/test-workspace/tsc/failureFixtures/directives/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": [ "**/*" ] +} diff --git a/test-workspace/tsc/#1886/main.vue b/test-workspace/tsc/passedFixtures/#1886/main.vue similarity index 100% rename from test-workspace/tsc/#1886/main.vue rename to test-workspace/tsc/passedFixtures/#1886/main.vue diff --git a/test-workspace/tsc/passedFixtures/#1886/tsconfig.json b/test-workspace/tsc/passedFixtures/#1886/tsconfig.json new file mode 100644 index 0000000000..52ecbeb3c3 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/#1886/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": [ "**/*" ] +} diff --git a/test-workspace/tsc/#2157/main.vue b/test-workspace/tsc/passedFixtures/#2157/main.vue similarity index 100% rename from test-workspace/tsc/#2157/main.vue rename to test-workspace/tsc/passedFixtures/#2157/main.vue diff --git a/test-workspace/tsc/passedFixtures/#2157/tsconfig.json b/test-workspace/tsc/passedFixtures/#2157/tsconfig.json new file mode 100644 index 0000000000..52ecbeb3c3 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/#2157/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": [ "**/*" ] +} diff --git a/test-workspace/tsc/#2472/child.vue b/test-workspace/tsc/passedFixtures/#2472/child.vue similarity index 100% rename from test-workspace/tsc/#2472/child.vue rename to test-workspace/tsc/passedFixtures/#2472/child.vue diff --git a/test-workspace/tsc/#2472/env.d.ts b/test-workspace/tsc/passedFixtures/#2472/env.d.ts similarity index 100% rename from test-workspace/tsc/#2472/env.d.ts rename to test-workspace/tsc/passedFixtures/#2472/env.d.ts diff --git a/test-workspace/tsc/#2472/generic.vue b/test-workspace/tsc/passedFixtures/#2472/generic.vue similarity index 100% rename from test-workspace/tsc/#2472/generic.vue rename to test-workspace/tsc/passedFixtures/#2472/generic.vue diff --git a/test-workspace/tsc/#2472/main.vue b/test-workspace/tsc/passedFixtures/#2472/main.vue similarity index 100% rename from test-workspace/tsc/#2472/main.vue rename to test-workspace/tsc/passedFixtures/#2472/main.vue diff --git a/test-workspace/tsc/#2472/tsconfig.json b/test-workspace/tsc/passedFixtures/#2472/tsconfig.json similarity index 63% rename from test-workspace/tsc/#2472/tsconfig.json rename to test-workspace/tsc/passedFixtures/#2472/tsconfig.json index f84b02a271..48e1d2f922 100644 --- a/test-workspace/tsc/#2472/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#2472/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { "jsxSlots": true }, diff --git a/test-workspace/tsc/#3373/NavBar.vue b/test-workspace/tsc/passedFixtures/#3373/NavBar.vue similarity index 100% rename from test-workspace/tsc/#3373/NavBar.vue rename to test-workspace/tsc/passedFixtures/#3373/NavBar.vue diff --git a/test-workspace/tsc/#3373/main.vue b/test-workspace/tsc/passedFixtures/#3373/main.vue similarity index 100% rename from test-workspace/tsc/#3373/main.vue rename to test-workspace/tsc/passedFixtures/#3373/main.vue diff --git a/test-workspace/tsc/#3373/tsconfig.json b/test-workspace/tsc/passedFixtures/#3373/tsconfig.json similarity index 73% rename from test-workspace/tsc/#3373/tsconfig.json rename to test-workspace/tsc/passedFixtures/#3373/tsconfig.json index a573d7b38f..0995c7cf84 100644 --- a/test-workspace/tsc/#3373/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#3373/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "importsNotUsedAsValues": "error", "ignoreDeprecations": "5.0" diff --git a/test-workspace/tsc/#3574/child.vue b/test-workspace/tsc/passedFixtures/#3574/child.vue similarity index 100% rename from test-workspace/tsc/#3574/child.vue rename to test-workspace/tsc/passedFixtures/#3574/child.vue diff --git a/test-workspace/tsc/#3574/main.vue b/test-workspace/tsc/passedFixtures/#3574/main.vue similarity index 100% rename from test-workspace/tsc/#3574/main.vue rename to test-workspace/tsc/passedFixtures/#3574/main.vue diff --git a/test-workspace/tsc/#3574/tsconfig.json b/test-workspace/tsc/passedFixtures/#3574/tsconfig.json similarity index 69% rename from test-workspace/tsc/#3574/tsconfig.json rename to test-workspace/tsc/passedFixtures/#3574/tsconfig.json index 18854f8ff3..ca34e646f6 100644 --- a/test-workspace/tsc/#3574/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#3574/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": [ "**/*" ], "compilerOptions": { "noPropertyAccessFromIndexSignature": false diff --git a/test-workspace/tsc/#3592/main.vue b/test-workspace/tsc/passedFixtures/#3592/main.vue similarity index 100% rename from test-workspace/tsc/#3592/main.vue rename to test-workspace/tsc/passedFixtures/#3592/main.vue diff --git a/test-workspace/tsc/#3592/tsconfig.json b/test-workspace/tsc/passedFixtures/#3592/tsconfig.json similarity index 61% rename from test-workspace/tsc/#3592/tsconfig.json rename to test-workspace/tsc/passedFixtures/#3592/tsconfig.json index 221a643961..e26b1c498e 100644 --- a/test-workspace/tsc/#3592/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#3592/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": ["**/*"], "compilerOptions": { "checkJs": true diff --git a/test-workspace/tsc/#3688/main.vue b/test-workspace/tsc/passedFixtures/#3688/main.vue similarity index 100% rename from test-workspace/tsc/#3688/main.vue rename to test-workspace/tsc/passedFixtures/#3688/main.vue diff --git a/test-workspace/tsc/#3688/tsconfig.json b/test-workspace/tsc/passedFixtures/#3688/tsconfig.json similarity index 71% rename from test-workspace/tsc/#3688/tsconfig.json rename to test-workspace/tsc/passedFixtures/#3688/tsconfig.json index a9cdeecc50..b4f2b10941 100644 --- a/test-workspace/tsc/#3688/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#3688/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": [ "**/*" ], "vueCompilerOptions": { "experimentalResolveStyleCssClasses": "always", diff --git a/test-workspace/tsc/#3819/component.vue b/test-workspace/tsc/passedFixtures/#3819/component.vue similarity index 100% rename from test-workspace/tsc/#3819/component.vue rename to test-workspace/tsc/passedFixtures/#3819/component.vue diff --git a/test-workspace/tsc/#3819/main.vue b/test-workspace/tsc/passedFixtures/#3819/main.vue similarity index 100% rename from test-workspace/tsc/#3819/main.vue rename to test-workspace/tsc/passedFixtures/#3819/main.vue diff --git a/test-workspace/tsc/#3819/tsconfig.json b/test-workspace/tsc/passedFixtures/#3819/tsconfig.json similarity index 67% rename from test-workspace/tsc/#3819/tsconfig.json rename to test-workspace/tsc/passedFixtures/#3819/tsconfig.json index e3b88d8ef2..da4ef38da0 100644 --- a/test-workspace/tsc/#3819/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#3819/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": [ "**/*" ], "compilerOptions": { "strict": false, diff --git a/test-workspace/tsc/#4503/globalcomp.vue b/test-workspace/tsc/passedFixtures/#4503/globalcomp.vue similarity index 100% rename from test-workspace/tsc/#4503/globalcomp.vue rename to test-workspace/tsc/passedFixtures/#4503/globalcomp.vue diff --git a/test-workspace/tsc/#4503/globals.d.ts b/test-workspace/tsc/passedFixtures/#4503/globals.d.ts similarity index 100% rename from test-workspace/tsc/#4503/globals.d.ts rename to test-workspace/tsc/passedFixtures/#4503/globals.d.ts diff --git a/test-workspace/tsc/#4503/main.vue b/test-workspace/tsc/passedFixtures/#4503/main.vue similarity index 100% rename from test-workspace/tsc/#4503/main.vue rename to test-workspace/tsc/passedFixtures/#4503/main.vue diff --git a/test-workspace/tsc/#4503/tsconfig.json b/test-workspace/tsc/passedFixtures/#4503/tsconfig.json similarity index 67% rename from test-workspace/tsc/#4503/tsconfig.json rename to test-workspace/tsc/passedFixtures/#4503/tsconfig.json index a4a2260e2a..3379b14cf0 100644 --- a/test-workspace/tsc/#4503/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/#4503/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "include": [ "**/*" ], "compilerOptions": { "checkJs": true, diff --git a/test-workspace/tsc/core#9923/comp.vue b/test-workspace/tsc/passedFixtures/core#9923/comp.vue similarity index 100% rename from test-workspace/tsc/core#9923/comp.vue rename to test-workspace/tsc/passedFixtures/core#9923/comp.vue diff --git a/test-workspace/tsc/core#9923/main.vue b/test-workspace/tsc/passedFixtures/core#9923/main.vue similarity index 100% rename from test-workspace/tsc/core#9923/main.vue rename to test-workspace/tsc/passedFixtures/core#9923/main.vue diff --git a/test-workspace/tsc/core#9923/tsconfig.json b/test-workspace/tsc/passedFixtures/core#9923/tsconfig.json similarity index 65% rename from test-workspace/tsc/core#9923/tsconfig.json rename to test-workspace/tsc/passedFixtures/core#9923/tsconfig.json index 2cdd7fb54c..d7805245ef 100644 --- a/test-workspace/tsc/core#9923/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/core#9923/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "jsxImportSource": "none", }, diff --git a/test-workspace/tsc/noPropertyAccessFromIndexSignature/#2236/main.vue b/test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/#2236/main.vue similarity index 100% rename from test-workspace/tsc/noPropertyAccessFromIndexSignature/#2236/main.vue rename to test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/#2236/main.vue diff --git a/test-workspace/tsc/noPropertyAccessFromIndexSignature/#3106/main.vue b/test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/#3106/main.vue similarity index 100% rename from test-workspace/tsc/noPropertyAccessFromIndexSignature/#3106/main.vue rename to test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/#3106/main.vue diff --git a/test-workspace/tsc/noPropertyAccessFromIndexSignature/tsconfig.json b/test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/tsconfig.json similarity index 69% rename from test-workspace/tsc/noPropertyAccessFromIndexSignature/tsconfig.json rename to test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/tsconfig.json index 6da0a2ff2f..608c7b1fb2 100644 --- a/test-workspace/tsc/noPropertyAccessFromIndexSignature/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/noPropertyAccessFromIndexSignature/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "compilerOptions": { "noPropertyAccessFromIndexSignature": true, }, diff --git a/test-workspace/tsc/petite-vue/main.html b/test-workspace/tsc/passedFixtures/petite-vue/main.html similarity index 100% rename from test-workspace/tsc/petite-vue/main.html rename to test-workspace/tsc/passedFixtures/petite-vue/main.html diff --git a/test-workspace/tsc/pug/main.vue b/test-workspace/tsc/passedFixtures/pug/main.vue similarity index 100% rename from test-workspace/tsc/pug/main.vue rename to test-workspace/tsc/passedFixtures/pug/main.vue diff --git a/test-workspace/tsc/passedFixtures/pug/tsconfig.json b/test-workspace/tsc/passedFixtures/pug/tsconfig.json new file mode 100644 index 0000000000..1ae4ba0575 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/pug/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.base.json", + "include": [ + "**/*" + ], + "vueCompilerOptions": { + "plugins": [ + "../../../../packages/language-plugin-pug" + ] + }, +} \ No newline at end of file diff --git a/test-workspace/tsc/shared.d.ts b/test-workspace/tsc/passedFixtures/shared.d.ts similarity index 100% rename from test-workspace/tsc/shared.d.ts rename to test-workspace/tsc/passedFixtures/shared.d.ts diff --git a/test-workspace/tsc/vue2/env.d.ts b/test-workspace/tsc/passedFixtures/vue2/env.d.ts similarity index 100% rename from test-workspace/tsc/vue2/env.d.ts rename to test-workspace/tsc/passedFixtures/vue2/env.d.ts diff --git a/test-workspace/tsc/vue2/tsconfig.json b/test-workspace/tsc/passedFixtures/vue2/tsconfig.json similarity index 92% rename from test-workspace/tsc/vue2/tsconfig.json rename to test-workspace/tsc/passedFixtures/vue2/tsconfig.json index a425bb6dd7..61eb1dbaff 100644 --- a/test-workspace/tsc/vue2/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue2/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { "target": 2.7, }, diff --git a/test-workspace/tsc/vue2_strictTemplate/#3881/main.vue b/test-workspace/tsc/passedFixtures/vue2_strictTemplate/#3881/main.vue similarity index 100% rename from test-workspace/tsc/vue2_strictTemplate/#3881/main.vue rename to test-workspace/tsc/passedFixtures/vue2_strictTemplate/#3881/main.vue diff --git a/test-workspace/tsc/vue2_strictTemplate/tsconfig.json b/test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json similarity index 100% rename from test-workspace/tsc/vue2_strictTemplate/tsconfig.json rename to test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json diff --git a/test-workspace/tsc/vue3.3/env.d.ts b/test-workspace/tsc/passedFixtures/vue3.3/env.d.ts similarity index 100% rename from test-workspace/tsc/vue3.3/env.d.ts rename to test-workspace/tsc/passedFixtures/vue3.3/env.d.ts diff --git a/test-workspace/tsc/vue3.3/tsconfig.json b/test-workspace/tsc/passedFixtures/vue3.3/tsconfig.json similarity index 75% rename from test-workspace/tsc/vue3.3/tsconfig.json rename to test-workspace/tsc/passedFixtures/vue3.3/tsconfig.json index 432c386186..36b56469eb 100644 --- a/test-workspace/tsc/vue3.3/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue3.3/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { "target": 3.3, }, diff --git a/test-workspace/tsc/vue3.5/components/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/main.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/main.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/main.vue diff --git a/test-workspace/tsc/vue3.5/components/script-setup-default-props.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-default-props.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/script-setup-default-props.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-default-props.vue diff --git a/test-workspace/tsc/vue3.5/components/script-setup-expose.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-expose.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/script-setup-expose.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-expose.vue diff --git a/test-workspace/tsc/vue3.5/components/script-setup-generic.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-generic.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/script-setup-generic.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-generic.vue diff --git a/test-workspace/tsc/vue3.5/components/script-setup-type-only.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-type-only.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/script-setup-type-only.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/script-setup-type-only.vue diff --git a/test-workspace/tsc/vue3.5/components/script-setup.vue b/test-workspace/tsc/passedFixtures/vue3.5/components/script-setup.vue similarity index 100% rename from test-workspace/tsc/vue3.5/components/script-setup.vue rename to test-workspace/tsc/passedFixtures/vue3.5/components/script-setup.vue diff --git a/test-workspace/tsc/vue3.5/defineModel/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/defineModel/main.vue similarity index 100% rename from test-workspace/tsc/vue3.5/defineModel/main.vue rename to test-workspace/tsc/passedFixtures/vue3.5/defineModel/main.vue diff --git a/test-workspace/tsc/vue3.5/defineModel/script-setup.vue b/test-workspace/tsc/passedFixtures/vue3.5/defineModel/script-setup.vue similarity index 100% rename from test-workspace/tsc/vue3.5/defineModel/script-setup.vue rename to test-workspace/tsc/passedFixtures/vue3.5/defineModel/script-setup.vue diff --git a/test-workspace/tsc/vue3.5/defineProp_B/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/main.vue similarity index 100% rename from test-workspace/tsc/vue3.5/defineProp_B/main.vue rename to test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/main.vue diff --git a/test-workspace/tsc/vue3.5/defineProp_B/script-setup-generic.vue b/test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/script-setup-generic.vue similarity index 100% rename from test-workspace/tsc/vue3.5/defineProp_B/script-setup-generic.vue rename to test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/script-setup-generic.vue diff --git a/test-workspace/tsc/vue3.5/defineProp_B/script-setup.vue b/test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/script-setup.vue similarity index 100% rename from test-workspace/tsc/vue3.5/defineProp_B/script-setup.vue rename to test-workspace/tsc/passedFixtures/vue3.5/defineProp_B/script-setup.vue diff --git a/test-workspace/tsc/vue3.5/env.d.ts b/test-workspace/tsc/passedFixtures/vue3.5/env.d.ts similarity index 100% rename from test-workspace/tsc/vue3.5/env.d.ts rename to test-workspace/tsc/passedFixtures/vue3.5/env.d.ts diff --git a/test-workspace/tsc/vue3.5/tsconfig.json b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json similarity index 64% rename from test-workspace/tsc/vue3.5/tsconfig.json rename to test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json index 87f184a8cd..574d756717 100644 --- a/test-workspace/tsc/vue3.5/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { "target": 3.5, }, diff --git a/test-workspace/tsc/vue3/#1855/child.vue b/test-workspace/tsc/passedFixtures/vue3/#1855/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#1855/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#1855/child.vue diff --git a/test-workspace/tsc/vue3/#1855/main.vue b/test-workspace/tsc/passedFixtures/vue3/#1855/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#1855/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#1855/main.vue diff --git a/test-workspace/tsc/vue3/#2048/components.ts b/test-workspace/tsc/passedFixtures/vue3/#2048/components.ts similarity index 100% rename from test-workspace/tsc/vue3/#2048/components.ts rename to test-workspace/tsc/passedFixtures/vue3/#2048/components.ts diff --git a/test-workspace/tsc/vue3/#2048/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2048/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2048/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2048/main.vue diff --git a/test-workspace/tsc/vue3/#2166/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2166/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2166/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2166/main.vue diff --git a/test-workspace/tsc/vue3/#2206/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2206/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2206/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2206/main.vue diff --git a/test-workspace/tsc/vue3/#2225/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2225/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2225/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2225/main.vue diff --git a/test-workspace/tsc/vue3/#2250/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2250/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2250/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2250/main.vue diff --git a/test-workspace/tsc/vue3/#2308/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2308/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2308/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2308/main.vue diff --git a/test-workspace/tsc/vue3/#2370/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2370/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2370/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2370/main.vue diff --git a/test-workspace/tsc/vue3/#2399/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2399/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2399/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2399/main.vue diff --git a/test-workspace/tsc/vue3/#2431/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2431/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2431/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2431/main.vue diff --git a/test-workspace/tsc/vue3/#2468/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2468/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2468/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2468/main.vue diff --git a/test-workspace/tsc/vue3/#2514/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2514/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2514/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2514/main.vue diff --git a/test-workspace/tsc/vue3/#2554/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2554/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2554/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2554/main.vue diff --git a/test-workspace/tsc/vue3/#2586/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2586/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2586/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2586/main.vue diff --git a/test-workspace/tsc/vue3/#2588/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2588/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2588/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2588/main.vue diff --git a/test-workspace/tsc/vue3/#2590/foo.vue b/test-workspace/tsc/passedFixtures/vue3/#2590/foo.vue similarity index 100% rename from test-workspace/tsc/vue3/#2590/foo.vue rename to test-workspace/tsc/passedFixtures/vue3/#2590/foo.vue diff --git a/test-workspace/tsc/vue3/#2617/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2617/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2617/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2617/main.vue diff --git a/test-workspace/tsc/vue3/#2629/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2629/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2629/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2629/main.vue diff --git a/test-workspace/tsc/vue3/#2638/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2638/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2638/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2638/main.vue diff --git a/test-workspace/tsc/vue3/#2639/child.vue b/test-workspace/tsc/passedFixtures/vue3/#2639/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#2639/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#2639/child.vue diff --git a/test-workspace/tsc/vue3/#2639/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2639/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2639/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2639/main.vue diff --git a/test-workspace/tsc/vue3/#2640/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2640/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2640/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2640/main.vue diff --git a/test-workspace/tsc/vue3/#2646/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2646/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2646/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2646/main.vue diff --git a/test-workspace/tsc/vue3/#2647/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2647/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2647/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2647/main.vue diff --git a/test-workspace/tsc/vue3/#2678/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2678/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2678/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2678/main.vue diff --git a/test-workspace/tsc/vue3/#2683/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2683/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2683/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2683/main.vue diff --git a/test-workspace/tsc/vue3/#2691/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2691/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2691/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2691/main.vue diff --git a/test-workspace/tsc/vue3/#2700/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2700/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2700/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2700/main.vue diff --git a/test-workspace/tsc/vue3/#2709/child.vue b/test-workspace/tsc/passedFixtures/vue3/#2709/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#2709/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#2709/child.vue diff --git a/test-workspace/tsc/vue3/#2709/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2709/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2709/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2709/main.vue diff --git a/test-workspace/tsc/vue3/#2712/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2712/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2712/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2712/main.vue diff --git a/test-workspace/tsc/vue3/#2720/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2720/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2720/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2720/main.vue diff --git a/test-workspace/tsc/vue3/#2725/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2725/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2725/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2725/main.vue diff --git a/test-workspace/tsc/vue3/#2730/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2730/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2730/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2730/main.vue diff --git a/test-workspace/tsc/vue3/#2744/child.vue b/test-workspace/tsc/passedFixtures/vue3/#2744/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#2744/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#2744/child.vue diff --git a/test-workspace/tsc/vue3/#2744/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2744/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2744/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2744/main.vue diff --git a/test-workspace/tsc/vue3/#2754/child.vue b/test-workspace/tsc/passedFixtures/vue3/#2754/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#2754/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#2754/child.vue diff --git a/test-workspace/tsc/vue3/#2754/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2754/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2754/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2754/main.vue diff --git a/test-workspace/tsc/vue3/#2758/child.vue b/test-workspace/tsc/passedFixtures/vue3/#2758/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#2758/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#2758/child.vue diff --git a/test-workspace/tsc/vue3/#2758/main.vue b/test-workspace/tsc/passedFixtures/vue3/#2758/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#2758/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#2758/main.vue diff --git a/test-workspace/tsc/vue3/#3100/child.vue b/test-workspace/tsc/passedFixtures/vue3/#3100/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#3100/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#3100/child.vue diff --git a/test-workspace/tsc/vue3/#3100/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3100/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3100/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3100/main.vue diff --git a/test-workspace/tsc/vue3/#3102/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3102/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3102/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3102/main.vue diff --git a/test-workspace/tsc/vue3/#3109/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3109/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3109/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3109/main.vue diff --git a/test-workspace/tsc/vue3/#3117/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3117/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3117/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3117/main.vue diff --git a/test-workspace/tsc/vue3/#3121/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3121/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3121/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3121/main.vue diff --git a/test-workspace/tsc/vue3/#3122/child.vue b/test-workspace/tsc/passedFixtures/vue3/#3122/child.vue similarity index 100% rename from test-workspace/tsc/vue3/#3122/child.vue rename to test-workspace/tsc/passedFixtures/vue3/#3122/child.vue diff --git a/test-workspace/tsc/vue3/#3122/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3122/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3122/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3122/main.vue diff --git a/test-workspace/tsc/vue3/#3123/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3123/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3123/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3123/main.vue diff --git a/test-workspace/tsc/vue3/#3129/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3129/main.vue similarity index 100% rename from test-workspace/tsc/vue3/#3129/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3129/main.vue diff --git a/test-workspace/tsc/vue3/#3138/main.vue b/test-workspace/tsc/passedFixtures/vue3/#3138/main.vue similarity index 85% rename from test-workspace/tsc/vue3/#3138/main.vue rename to test-workspace/tsc/passedFixtures/vue3/#3138/main.vue index 02b4a75c0a..1286216a18 100644 --- a/test-workspace/tsc/vue3/#3138/main.vue +++ b/test-workspace/tsc/passedFixtures/vue3/#3138/main.vue @@ -1,5 +1,5 @@ - - diff --git a/test-workspace/tsc/should-error/tsconfig.json b/test-workspace/tsc/should-error/tsconfig.json deleted file mode 100644 index a1e651d6e8..0000000000 --- a/test-workspace/tsc/should-error/tsconfig.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": [ "**/*" ] -} diff --git a/test-workspace/tsc/tsconfig.json b/test-workspace/tsc/tsconfig.json new file mode 100644 index 0000000000..714f41f63f --- /dev/null +++ b/test-workspace/tsc/tsconfig.json @@ -0,0 +1,27 @@ +{ + "include": [ ], + "references": [ + // { "path": "./failureFixtures/#4569" }, // TODO: not working with --build flag + { "path": "./failureFixtures/directives" }, + + { "path": "./passedFixtures/#1886" }, + { "path": "./passedFixtures/#2157" }, + { "path": "./passedFixtures/#2472" }, + { "path": "./passedFixtures/#3373" }, + { "path": "./passedFixtures/#3574" }, + { "path": "./passedFixtures/#3592" }, + { "path": "./passedFixtures/#3688" }, + { "path": "./passedFixtures/#3819" }, + { "path": "./passedFixtures/#4503" }, + { "path": "./passedFixtures/core#9923" }, + { "path": "./passedFixtures/noPropertyAccessFromIndexSignature" }, + // { "path": "./passedFixtures/petite-vue" }, + { "path": "./passedFixtures/pug" }, + { "path": "./passedFixtures/vue2" }, + { "path": "./passedFixtures/vue2_strictTemplate" }, + { "path": "./passedFixtures/vue3" }, + { "path": "./passedFixtures/vue3_strictTemplate" }, + { "path": "./passedFixtures/vue3.3" }, + { "path": "./passedFixtures/vue3.5" }, + ] +} diff --git a/test-workspace/tsc/vue3/tsconfig.json b/test-workspace/tsc/vue3/tsconfig.json deleted file mode 100644 index 8042a1b1e8..0000000000 --- a/test-workspace/tsc/vue3/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": [ - "**/*", - ], -} diff --git a/test-workspace/tsconfig.json b/test-workspace/tsconfig.base.json similarity index 100% rename from test-workspace/tsconfig.json rename to test-workspace/tsconfig.base.json diff --git a/test-workspace/tsconfigProject/tsconfig.json b/test-workspace/tsconfigProject/tsconfig.json index 885d9a3f6e..96e0092fd7 100644 --- a/test-workspace/tsconfigProject/tsconfig.json +++ b/test-workspace/tsconfigProject/tsconfig.json @@ -1,5 +1,5 @@ { - "exclude": [ "../tsconfig.json" ], + "exclude": [ "../tsconfig.base.json" ], "include": [ "**/*" ], "compilerOptions": { "paths": { diff --git a/vitest.config.ts b/vitest.config.ts index 4ae993ab38..54b31ab673 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -2,6 +2,7 @@ import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { + testTimeout: 60_000, poolOptions: { forks: { singleFork: true, From 4618cdc10a76d52bed8e963108f09330ef676a61 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 12:28:40 +0000 Subject: [PATCH 13/37] ci(lint): auto-fix --- packages/tsc/tests/typecheck.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tsc/tests/typecheck.spec.ts b/packages/tsc/tests/typecheck.spec.ts index a4b03d6bad..a8c7441b42 100644 --- a/packages/tsc/tests/typecheck.spec.ts +++ b/packages/tsc/tests/typecheck.spec.ts @@ -4,7 +4,7 @@ import { run } from '..'; describe(`vue-tsc`, () => { - it(`typecheck`, async () => { + it(`typecheck`, () => { const consoleOutput: string[] = []; const originalConsoleLog = process.stdout.write; const originalArgv = process.argv; From a243f94e184c5d2de468fe4d09e47d05f3d22632 Mon Sep 17 00:00:00 2001 From: Ray Date: Sun, 25 Aug 2024 20:47:18 +0800 Subject: [PATCH 14/37] test(vscode): add grammar test (#3861) --- extensions/vscode/package.json | 3 +- .../tests/__snapshots__/grammar.spec.ts.snap | 433 ++++++++++++++++++ extensions/vscode/tests/grammar.spec.ts | 20 + .../vscode/tests/grammarFixtures/basic.vue | 1 + .../tests/grammarFixtures}/directives.vue | 0 .../vscode/tests/grammarFixtures}/generic.vue | 0 .../tests/grammarFixtures}/inline-style.vue | 0 .../vscode/tests/grammarFixtures}/jsx.vue | 0 .../tests/grammarFixtures}/namespaced.vue | 0 .../grammarFixtures}/script-tag-in-script.vue | 0 .../tests/grammarFixtures}/snippet-import.md | 0 .../grammarFixtures}/template-expression.vue | 0 .../grammarFixtures}/template-in-template.vue | 0 pnpm-lock.yaml | 21 + 14 files changed, 477 insertions(+), 1 deletion(-) create mode 100644 extensions/vscode/tests/__snapshots__/grammar.spec.ts.snap create mode 100644 extensions/vscode/tests/grammar.spec.ts create mode 100644 extensions/vscode/tests/grammarFixtures/basic.vue rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/directives.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/generic.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/inline-style.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/jsx.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/namespaced.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/script-tag-in-script.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/snippet-import.md (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/template-expression.vue (100%) rename {test-workspace/language-service/syntax => extensions/vscode/tests/grammarFixtures}/template-in-template.vue (100%) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index f8bf2c5aa7..3aefe48ef3 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -556,6 +556,7 @@ "esbuild": "~0.21.0", "esbuild-plugin-copy": "latest", "esbuild-visualizer": "latest", - "semver": "^7.5.4" + "semver": "^7.5.4", + "vscode-tmlanguage-snapshot": "latest" } } diff --git a/extensions/vscode/tests/__snapshots__/grammar.spec.ts.snap b/extensions/vscode/tests/__snapshots__/grammar.spec.ts.snap new file mode 100644 index 0000000000..00f1dbdb3e --- /dev/null +++ b/extensions/vscode/tests/__snapshots__/grammar.spec.ts.snap @@ -0,0 +1,433 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`grammar > basic.vue 1`] = ` +">
+#^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^ source.vue entity.name.tag.div.html.vue +# ^ source.vue meta.tag-stuff punctuation.definition.tag.end.html.vue +# ^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^ source.vue entity.name.tag.div.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue" +`; + +exports[`grammar > directives.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^ source.vue punctuation.definition.tag.begin.html.vue +# ^ source.vue +# ^^ source.vue entity.name.tag.--.html.vue +# ^^^^^^^^ source.vue meta.tag-stuff +# ^ source.vue meta.tag-stuff punctuation.definition.tag.end.html.vue +> +#^^^^^^^^^^^ source.vue +> +#^ source.vue text" +`; + +exports[`grammar > generic.vue 1`] = ` +"> +#^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^^^^^^^ source.vue meta.tag-stuff +# ^^^^^^^ source.vue meta.tag-stuff meta.attribute.generic.vue entity.other.attribute-name.html.vue +# ^ source.vue meta.tag-stuff meta.attribute.generic.vue punctuation.separator.key-value.html.vue +# ^ source.vue meta.tag-stuff meta.attribute.generic.vue meta.type.parameters.vue punctuation.definition.string.begin.html.vue +# ^ source.vue meta.tag-stuff meta.attribute.generic.vue meta.type.parameters.vue +# ^ source.vue meta.tag-stuff meta.attribute.generic.vue meta.type.parameters.vue punctuation.definition.string.end.html.vue +# ^ source.vue meta.tag-stuff punctuation.definition.tag.end.html.vue +# ^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > inline-style.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > jsx.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > namespaced.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > script-tag-in-script.vue 1`] = ` +">' +#^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue meta.tag-stuff punctuation.definition.tag.end.html.vue +# ^^^^^^^^^ source.vue +# ^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +# ^ source.vue +# ^ source.vue punctuation.definition.tag.begin.html.vue +# ^ source.vue +# ^^^^^^ source.vue entity.name.tag.script.html.vue +# ^ source.vue meta.tag-stuff punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > template-expression.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; + +exports[`grammar > template-in-template.vue 1`] = ` +"> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue +> +#^^ source.vue punctuation.definition.tag.begin.html.vue +# ^^^^^^^^ source.vue entity.name.tag.template.html.vue +# ^ source.vue punctuation.definition.tag.end.html.vue +> +#^ source.vue" +`; diff --git a/extensions/vscode/tests/grammar.spec.ts b/extensions/vscode/tests/grammar.spec.ts new file mode 100644 index 0000000000..4790ba6431 --- /dev/null +++ b/extensions/vscode/tests/grammar.spec.ts @@ -0,0 +1,20 @@ +import * as path from 'path'; +import * as fs from 'fs'; +import { describe, expect, it } from 'vitest'; +import { createGrammarSnapshot } from 'vscode-tmlanguage-snapshot'; + +const fixturesDir = path.resolve(__dirname, './grammarFixtures'); +const packageJsonPath = path.resolve(__dirname, '../package.json'); + +describe('grammar', async () => { + const snapshot = await createGrammarSnapshot(packageJsonPath); + const fixtures = fs.readdirSync(fixturesDir); + + for (const fixture of fixtures) { + it.skipIf(fixture === 'snippet-import.md')(fixture, async () => { + const result = await snapshot(`tests/grammarFixtures/${fixture}`); + + expect(result).toMatchSnapshot(); + }); + } +}); diff --git a/extensions/vscode/tests/grammarFixtures/basic.vue b/extensions/vscode/tests/grammarFixtures/basic.vue new file mode 100644 index 0000000000..281c6866c3 --- /dev/null +++ b/extensions/vscode/tests/grammarFixtures/basic.vue @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/test-workspace/language-service/syntax/directives.vue b/extensions/vscode/tests/grammarFixtures/directives.vue similarity index 100% rename from test-workspace/language-service/syntax/directives.vue rename to extensions/vscode/tests/grammarFixtures/directives.vue diff --git a/test-workspace/language-service/syntax/generic.vue b/extensions/vscode/tests/grammarFixtures/generic.vue similarity index 100% rename from test-workspace/language-service/syntax/generic.vue rename to extensions/vscode/tests/grammarFixtures/generic.vue diff --git a/test-workspace/language-service/syntax/inline-style.vue b/extensions/vscode/tests/grammarFixtures/inline-style.vue similarity index 100% rename from test-workspace/language-service/syntax/inline-style.vue rename to extensions/vscode/tests/grammarFixtures/inline-style.vue diff --git a/test-workspace/language-service/syntax/jsx.vue b/extensions/vscode/tests/grammarFixtures/jsx.vue similarity index 100% rename from test-workspace/language-service/syntax/jsx.vue rename to extensions/vscode/tests/grammarFixtures/jsx.vue diff --git a/test-workspace/language-service/syntax/namespaced.vue b/extensions/vscode/tests/grammarFixtures/namespaced.vue similarity index 100% rename from test-workspace/language-service/syntax/namespaced.vue rename to extensions/vscode/tests/grammarFixtures/namespaced.vue diff --git a/test-workspace/language-service/syntax/script-tag-in-script.vue b/extensions/vscode/tests/grammarFixtures/script-tag-in-script.vue similarity index 100% rename from test-workspace/language-service/syntax/script-tag-in-script.vue rename to extensions/vscode/tests/grammarFixtures/script-tag-in-script.vue diff --git a/test-workspace/language-service/syntax/snippet-import.md b/extensions/vscode/tests/grammarFixtures/snippet-import.md similarity index 100% rename from test-workspace/language-service/syntax/snippet-import.md rename to extensions/vscode/tests/grammarFixtures/snippet-import.md diff --git a/test-workspace/language-service/syntax/template-expression.vue b/extensions/vscode/tests/grammarFixtures/template-expression.vue similarity index 100% rename from test-workspace/language-service/syntax/template-expression.vue rename to extensions/vscode/tests/grammarFixtures/template-expression.vue diff --git a/test-workspace/language-service/syntax/template-in-template.vue b/extensions/vscode/tests/grammarFixtures/template-in-template.vue similarity index 100% rename from test-workspace/language-service/syntax/template-in-template.vue rename to extensions/vscode/tests/grammarFixtures/template-in-template.vue diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index df1fd94061..866131ace8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -80,6 +80,9 @@ importers: semver: specifier: ^7.5.4 version: 7.6.2 + vscode-tmlanguage-snapshot: + specifier: latest + version: 0.1.3 packages/component-meta: dependencies: @@ -3395,6 +3398,15 @@ packages: vscode-nls@5.2.0: resolution: {integrity: sha512-RAaHx7B14ZU04EU31pT+rKz2/zSl7xMsfIZuo8pd+KZO6PXtQmpevpq3vxvWNcrGbdmhM/rr5Uw5Mz+NBfhVng==} + vscode-oniguruma@2.0.1: + resolution: {integrity: sha512-poJU8iHIWnC3vgphJnrLZyI3YdqRlR27xzqDmpPXYzA93R4Gk8z7T6oqDzDoHjoikA2aS82crdXFkjELCdJsjQ==} + + vscode-textmate@9.1.0: + resolution: {integrity: sha512-lxKSVp2DkFOx9RDAvpiYUrB9/KT1fAfi1aE8CBGstP8N7rLF+Seifj8kDA198X0mYj1CjQUC+81+nQf8CO0nVA==} + + vscode-tmlanguage-snapshot@0.1.3: + resolution: {integrity: sha512-UqBD+5nJgAWNUQZAwBLCgMYn1CNfjoJJm7L1KF04mcpEIf0F7h7x+CTPT6zLAT1CcHV/p4MqosaNVscyi9roSw==} + vscode-uri@2.1.2: resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} @@ -6901,6 +6913,15 @@ snapshots: vscode-nls@5.2.0: {} + vscode-oniguruma@2.0.1: {} + + vscode-textmate@9.1.0: {} + + vscode-tmlanguage-snapshot@0.1.3: + dependencies: + vscode-oniguruma: 2.0.1 + vscode-textmate: 9.1.0 + vscode-uri@2.1.2: {} vscode-uri@3.0.8: {} From e4d368363e7e9759ae5242e586369750c4300973 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Sun, 25 Aug 2024 21:22:19 +0800 Subject: [PATCH 15/37] test(tsc): add test for TS-next (#4724) --- packages/tsc/tests/typecheck.spec.ts | 70 +- pnpm-lock.yaml | 1669 +++++++++++++------------- test-workspace/package.json | 2 + 3 files changed, 860 insertions(+), 881 deletions(-) diff --git a/packages/tsc/tests/typecheck.spec.ts b/packages/tsc/tests/typecheck.spec.ts index a8c7441b42..bd8d302817 100644 --- a/packages/tsc/tests/typecheck.spec.ts +++ b/packages/tsc/tests/typecheck.spec.ts @@ -1,35 +1,59 @@ import * as path from 'path'; -import { describe, expect, it } from 'vitest'; +import { describe, expect, test } from 'vitest'; import { run } from '..'; describe(`vue-tsc`, () => { - it(`typecheck`, () => { - const consoleOutput: string[] = []; - const originalConsoleLog = process.stdout.write; - const originalArgv = process.argv; - process.stdout.write = output => { - consoleOutput.push(String(output).trim()); - return true; - }; - process.argv = [ - ...originalArgv, - '--build', - path.resolve(__dirname, '../../../test-workspace/tsc'), - '--pretty', - 'false', - ]; - try { - run(); - } catch (err) { } - process.stdout.write = originalConsoleLog; - process.argv = originalArgv; - expect(consoleOutput).toMatchInlineSnapshot(` + test(`TypeScript - Stable`, () => { + expect( + getTscOutput('stable') + ).toMatchInlineSnapshot(` [ "test-workspace/tsc/failureFixtures/directives/main.vue(4,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", "test-workspace/tsc/failureFixtures/directives/main.vue(9,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", "test-workspace/tsc/failureFixtures/directives/main.vue(12,2): error TS2578: Unused '@ts-expect-error' directive.", ] - `);; + `); + }); + + test(`TypeScript - next`, () => { + expect( + getTscOutput('next') + ).toMatchInlineSnapshot(` + [ + "test-workspace/tsc/failureFixtures/directives/main.vue(4,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", + "test-workspace/tsc/failureFixtures/directives/main.vue(9,6): error TS2339: Property 'notExist' does not exist on type 'CreateComponentPublicInstance>, { exist: typeof exist; }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 12 more ..., {}>'.", + "test-workspace/tsc/failureFixtures/directives/main.vue(12,2): error TS2578: Unused '@ts-expect-error' directive.", + "test-workspace/tsc/passedFixtures/#3373/tsconfig.json(4,3): error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration. + Use 'verbatimModuleSyntax' instead.", + ] + `); }); }); + +function getTscOutput(tsVersion: 'stable' | 'next') { + const consoleOutput: string[] = []; + const originalConsoleLog = process.stdout.write; + const originalArgv = process.argv; + process.stdout.write = output => { + consoleOutput.push(String(output).trim()); + return true; + }; + process.argv = [ + ...originalArgv, + '--build', + path.resolve(__dirname, '../../../test-workspace/tsc'), + '--pretty', + 'false', + ]; + try { + const tscPath = require.resolve( + `typescript-${tsVersion}/lib/tsc`, + { paths: [path.resolve(__dirname, '../../../test-workspace')] } + ); + run(tscPath); + } catch (err) { } + process.stdout.write = originalConsoleLog; + process.argv = originalArgv; + return consoleOutput; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 866131ace8..d4cdf7b7c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,28 +22,28 @@ importers: devDependencies: '@lerna-lite/cli': specifier: latest - version: 3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(@lerna-lite/version@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3))(typescript@5.5.3) + version: 3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(@lerna-lite/version@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4))(typescript@5.5.4) '@lerna-lite/publish': specifier: latest - version: 3.7.1(typescript@5.5.3) + version: 3.8.0(typescript@5.5.4) '@tsslint/cli': specifier: latest - version: 1.0.14(typescript@5.5.3) + version: 1.0.17(typescript@5.5.4) '@tsslint/config': specifier: latest - version: 1.0.14 + version: 1.0.17 '@volar/language-service': specifier: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee version: https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee typescript: specifier: latest - version: 5.5.3 + version: 5.5.4 vite: specifier: latest - version: 5.3.4(@types/node@20.14.11) + version: 5.4.2(@types/node@22.5.0) vitest: specifier: latest - version: 2.0.3(@types/node@20.14.11) + version: 2.0.5(@types/node@22.5.0) extensions/vscode: devDependencies: @@ -52,7 +52,7 @@ importers: version: 7.5.8 '@types/vscode': specifier: ^1.82.0 - version: 1.91.0 + version: 1.92.0 '@volar/vscode': specifier: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee version: https://pkg.pr.new/volarjs/volar.js/@volar/vscode@28cbdee @@ -79,7 +79,7 @@ importers: version: 0.6.0 semver: specifier: ^7.5.4 - version: 7.6.2 + version: 7.6.3 vscode-tmlanguage-snapshot: specifier: latest version: 0.1.3 @@ -97,17 +97,17 @@ importers: version: 1.0.1 typescript: specifier: '*' - version: 5.5.3 + version: 5.5.4 vue-component-type-helpers: specifier: 2.0.28 version: link:../component-type-helpers devDependencies: '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 '@types/path-browserify': specifier: latest - version: 1.0.2 + version: 1.0.3 packages/component-type-helpers: {} @@ -118,13 +118,13 @@ importers: version: https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee '@vue/compiler-dom': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 '@vue/compiler-vue2': specifier: ^2.7.16 version: 2.7.16 '@vue/shared': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 computeds: specifier: ^0.0.1 version: 0.0.1 @@ -139,23 +139,23 @@ importers: version: 1.0.1 typescript: specifier: '*' - version: 5.5.3 + version: 5.5.4 devDependencies: '@types/minimatch': specifier: ^5.1.2 version: 5.1.2 '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 '@types/path-browserify': specifier: ^1.0.1 - version: 1.0.2 + version: 1.0.3 '@volar/typescript': specifier: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/compiler-sfc': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 packages/language-plugin-pug: dependencies: @@ -168,7 +168,7 @@ importers: devDependencies: '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 '@vue/language-core': specifier: 2.0.28 version: link:../language-core @@ -213,13 +213,13 @@ importers: version: https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee '@vue/compiler-dom': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 '@vue/language-core': specifier: 2.0.28 version: link:../language-core '@vue/shared': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 '@vue/typescript-plugin': specifier: 2.0.28 version: link:../typescript-plugin @@ -258,20 +258,20 @@ importers: version: 5.3.0 vscode-languageserver-textdocument: specifier: ^1.0.11 - version: 1.0.11 + version: 1.0.12 vscode-uri: specifier: ^3.0.8 version: 3.0.8 devDependencies: '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 '@types/path-browserify': specifier: latest - version: 1.0.2 + version: 1.0.3 '@volar/kit': specifier: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee - version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.5.3) + version: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.7.0-dev.20240825) vscode-languageserver-protocol: specifier: ^3.17.5 version: 3.17.5 @@ -286,14 +286,14 @@ importers: version: link:../language-core semver: specifier: ^7.5.4 - version: 7.6.2 + version: 7.6.3 typescript: specifier: '>=5.0.0' - version: 5.5.3 + version: 5.5.4 devDependencies: '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 packages/typescript-plugin: dependencies: @@ -305,17 +305,23 @@ importers: version: link:../language-core '@vue/shared': specifier: ^3.4.0 - version: 3.4.31 + version: 3.4.38 devDependencies: '@types/node': specifier: latest - version: 20.14.11 + version: 22.5.0 test-workspace: devDependencies: + typescript-next: + specifier: npm:typescript@next + version: typescript@5.7.0-dev.20240825 + typescript-stable: + specifier: npm:typescript@latest + version: typescript@5.5.4 vue: specifier: ^3.4.0 - version: 3.4.31(typescript@5.5.3) + version: 3.4.38(typescript@5.5.4) vue-component-type-helpers: specifier: 2.0.28 version: link:../packages/component-type-helpers @@ -324,10 +330,10 @@ importers: version: vue@2.7.16 vue3.3: specifier: npm:vue@3.3.13 - version: vue@3.3.13(typescript@5.5.3) + version: vue@3.3.13(typescript@5.5.4) vue3.5: specifier: npm:vue@3.5.0-alpha.3 - version: vue@3.5.0-alpha.3(typescript@5.5.3) + version: vue@3.5.0-alpha.3(typescript@5.5.4) packages: @@ -387,8 +393,8 @@ packages: resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.7': - resolution: {integrity: sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==} + '@babel/helper-string-parser@7.24.8': + resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} engines: {node: '>=6.9.0'} '@babel/helper-validator-identifier@7.24.7': @@ -399,13 +405,13 @@ packages: resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.24.7': - resolution: {integrity: sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==} + '@babel/parser@7.25.4': + resolution: {integrity: sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/types@7.24.7': - resolution: {integrity: sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==} + '@babel/types@7.25.4': + resolution: {integrity: sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==} engines: {node: '>=6.9.0'} '@clack/core@0.3.4': @@ -443,8 +449,8 @@ packages: cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.23.0': - resolution: {integrity: sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==} + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] @@ -455,8 +461,8 @@ packages: cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.23.0': - resolution: {integrity: sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==} + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} engines: {node: '>=18'} cpu: [arm64] os: [android] @@ -467,8 +473,8 @@ packages: cpu: [arm] os: [android] - '@esbuild/android-arm@0.23.0': - resolution: {integrity: sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==} + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} engines: {node: '>=18'} cpu: [arm] os: [android] @@ -479,8 +485,8 @@ packages: cpu: [x64] os: [android] - '@esbuild/android-x64@0.23.0': - resolution: {integrity: sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==} + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} engines: {node: '>=18'} cpu: [x64] os: [android] @@ -491,8 +497,8 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.23.0': - resolution: {integrity: sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==} + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] @@ -503,8 +509,8 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.23.0': - resolution: {integrity: sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==} + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} engines: {node: '>=18'} cpu: [x64] os: [darwin] @@ -515,8 +521,8 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.23.0': - resolution: {integrity: sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==} + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] @@ -527,8 +533,8 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.23.0': - resolution: {integrity: sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==} + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] @@ -539,8 +545,8 @@ packages: cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.23.0': - resolution: {integrity: sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==} + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} engines: {node: '>=18'} cpu: [arm64] os: [linux] @@ -551,8 +557,8 @@ packages: cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.23.0': - resolution: {integrity: sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==} + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} engines: {node: '>=18'} cpu: [arm] os: [linux] @@ -563,8 +569,8 @@ packages: cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.23.0': - resolution: {integrity: sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==} + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} engines: {node: '>=18'} cpu: [ia32] os: [linux] @@ -575,8 +581,8 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.23.0': - resolution: {integrity: sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==} + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} engines: {node: '>=18'} cpu: [loong64] os: [linux] @@ -587,8 +593,8 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.23.0': - resolution: {integrity: sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==} + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] @@ -599,8 +605,8 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.23.0': - resolution: {integrity: sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==} + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] @@ -611,8 +617,8 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.23.0': - resolution: {integrity: sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==} + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] @@ -623,8 +629,8 @@ packages: cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.23.0': - resolution: {integrity: sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==} + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] @@ -635,8 +641,8 @@ packages: cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.23.0': - resolution: {integrity: sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==} + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] @@ -647,14 +653,14 @@ packages: cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.23.0': - resolution: {integrity: sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==} + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.23.0': - resolution: {integrity: sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==} + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] @@ -665,8 +671,8 @@ packages: cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.23.0': - resolution: {integrity: sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==} + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] @@ -677,8 +683,8 @@ packages: cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.23.0': - resolution: {integrity: sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==} + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] @@ -689,8 +695,8 @@ packages: cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.23.0': - resolution: {integrity: sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==} + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} engines: {node: '>=18'} cpu: [arm64] os: [win32] @@ -701,8 +707,8 @@ packages: cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.23.0': - resolution: {integrity: sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==} + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} engines: {node: '>=18'} cpu: [ia32] os: [win32] @@ -713,8 +719,8 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.23.0': - resolution: {integrity: sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==} + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -723,8 +729,28 @@ packages: resolution: {integrity: sha512-e5+YUKENATs1JgYHMzTr2MW/NDcXGfYFAuOQU8gJgF/kEh4EqKgfGrfLI67bMD4tbhZVlkigz/9YYwWcbOFthg==} engines: {node: '>=10.13.0'} - '@inquirer/figures@1.0.3': - resolution: {integrity: sha512-ErXXzENMH5pJt5/ssXV0DfWUZqly8nGzf0UcBV9xTnP+KyffE2mqyxIMBrZ8ijQck2nU0TQm40EQB53YreyWHw==} + '@inquirer/core@9.0.10': + resolution: {integrity: sha512-TdESOKSVwf6+YWDz8GhS6nKscwzkIyakEzCLJ5Vh6O3Co2ClhCJ0A4MG909MUWfaWdpJm7DE45ii51/2Kat9tA==} + engines: {node: '>=18'} + + '@inquirer/expand@2.1.22': + resolution: {integrity: sha512-wTZOBkzH+ItPuZ3ZPa9lynBsdMp6kQ9zbjVPYEtSBG7UulGjg2kQiAnUjgyG4SlntpTce5bOmXAPvE4sguXjpA==} + engines: {node: '>=18'} + + '@inquirer/figures@1.0.5': + resolution: {integrity: sha512-79hP/VWdZ2UVc9bFGJnoQ/lQMpL74mGgzSYX1xUqCVk7/v73vJCMw1VuyWN1jGkZ9B3z7THAbySqGbCNefcjfA==} + engines: {node: '>=18'} + + '@inquirer/input@2.2.9': + resolution: {integrity: sha512-7Z6N+uzkWM7+xsE+3rJdhdG/+mQgejOVqspoW+w0AbSZnL6nq5tGMEVASaYVWbkoSzecABWwmludO2evU3d31g==} + engines: {node: '>=18'} + + '@inquirer/select@2.4.7': + resolution: {integrity: sha512-JH7XqPEkBpNWp3gPCqWqY8ECbyMoFcCZANlL6pV9hf59qK6dGmkOlx1ydyhY+KZ0c5X74+W6Mtp+nm2QX0/MAQ==} + engines: {node: '>=18'} + + '@inquirer/type@1.5.2': + resolution: {integrity: sha512-w9qFkumYDCNyDZmNQjf/n6qQuvQ4dMC3BJesY4oF+yr0CxR5vxujflAVeIcS6U336uzi9GM0kAfZlLrZ9UTkpA==} engines: {node: '>=18'} '@isaacs/cliui@8.0.2': @@ -749,14 +775,14 @@ packages: resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} engines: {node: '>=6.0.0'} - '@jridgewell/sourcemap-codec@1.4.15': - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} - '@lerna-lite/cli@3.7.1': - resolution: {integrity: sha512-aaOjRJv/DWyBXw9gFdt0M7k1oSBPnMo3Vt4adg7MMgJkWjGOwKY3Q83d286beN9+wn1YBEmrf/4W4oThsojnSQ==} + '@lerna-lite/cli@3.8.0': + resolution: {integrity: sha512-Flv2ITNfS4dTXG8I44P3R2kuY8x6i5rN9uGxkLY0lnNzjlMy0FU0CXchUrGlzfmP+e7bzhDRmvV7dQMeYoZ1mg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -780,30 +806,26 @@ packages: '@lerna-lite/watch': optional: true - '@lerna-lite/core@3.7.1': - resolution: {integrity: sha512-GvGc6W7hq4GU6JbqLSHusFIMnvJ4l51BVefGwMiKmXerX4B2JLQVnzeB18N4v0N+T04S+rxktU6yMnmmqsWZhQ==} + '@lerna-lite/core@3.8.0': + resolution: {integrity: sha512-0ObizEznKsABbEFGKnt6wyfB1+IGFShMF4nmUfLsYHFw9OXZ0J3HZPPScS/kLBCzti3QfP79OWh+X0FrxacAGA==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/init@3.7.1': - resolution: {integrity: sha512-bcQwhz2muCerlKyECui19a6Z0oAQ9g5jfgza3X/ctnIh3C9SXZcpKmgQzOmbDYqFLcGhHE283LZTAVWqG0sNFg==} + '@lerna-lite/init@3.8.0': + resolution: {integrity: sha512-TPOitzDHXlrzfKLo4ZdvMdCHsupb4DsqgniVioq+09mduGW1lIh+BYp9C2TyXEWBqnaMQkf4uIZ3oFwye/rDiA==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/npmlog@3.7.0': - resolution: {integrity: sha512-zISrLUGPeS1LFpjiuats4t8lrpbcVrNSSpGGG/yUdXtR28vKZKw/UATT+lIKUNsnGAyWpNrDgUW8p/syP7CkVg==} + '@lerna-lite/npmlog@3.8.0': + resolution: {integrity: sha512-ny8vueqyhWZtNRsoOVUybdOK6KcGDpLzFD01Ae4k/NjEw1ap3v6sUS0k7h/U2/HmZgiR0bU+XRJShuoUZf6E/g==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/publish@3.7.1': - resolution: {integrity: sha512-/1MGMm4snqCzq5k/wRUiTL8NbMS41uqqRSPdFes/3yNUu3HUSNA1RuLFje0jZXMrfVg1Hh1x5SzhDrpYzhNh6Q==} + '@lerna-lite/publish@3.8.0': + resolution: {integrity: sha512-JyC65BfVa0dtGBJeCcIIDLCJT8nWP1vh/FEeXmSmAjrYLuja2FWoFuemVW301bk3JZiejMD+nW8nauXUJbal6w==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/version@3.7.1': - resolution: {integrity: sha512-C4CycUp4rgdTGtWYGoa+Ci8EZUsO7b0sAl8Vsdwzjk3g2FRD8d62tpD5Q6drthUQrWRKWpg62rY3q+H+7CGSPg==} + '@lerna-lite/version@3.8.0': + resolution: {integrity: sha512-G395hZQQdzUHeIeGrYet8FuvZofahmukbhrKadlMal1Xz25kpzYG0yNPSXu2VKKjwip2KZixfmIDB35vRyFcHQ==} engines: {node: ^18.0.0 || >=20.0.0} - '@ljharb/through@2.3.13': - resolution: {integrity: sha512-/gKJun8NNiWGZJkGzI/Ragc53cOdcLNdzjLaIa+GEjguQs0ulsurx8WN0jijdK9yPqDvziX995sMRLyLt1uZMQ==} - engines: {node: '>= 0.4'} - '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -829,8 +851,8 @@ packages: resolution: {integrity: sha512-q9CRWjpHCMIh5sVyefoD1cA7PkvILqCZsnSOEUUivORLjxCO/Irmue2DprETiNgEqktDBZaM1Bi+jrarx1XdCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - '@npmcli/git@5.0.7': - resolution: {integrity: sha512-WaOVvto604d5IpdCRV2KjQu8PzkfE96d50CQGKgywXh2GxXmDeUO5EWcBC4V57uFyrNqx83+MewuJh3WTR3xPA==} + '@npmcli/git@5.0.8': + resolution: {integrity: sha512-liASfw5cqhjNW9UFd+ruwwdEf/lbOAQjLL2XY2dFW/bkJheXDYZgOyul/4gVvEV4BWkTXjYGmDqMw9uegdbJNQ==} engines: {node: ^16.14.0 || >=18.0.0} '@npmcli/installed-package-contents@2.1.0': @@ -902,8 +924,8 @@ packages: peerDependencies: '@octokit/core': '>=6' - '@octokit/plugin-request-log@5.3.0': - resolution: {integrity: sha512-FiGcyjdtYPlr03ExBk/0ysIlEFIFGJQAVoPPMxL19B24bVSEiZQnVGBunNtaAF1YnvE/EFoDpXmITtRnyCiypQ==} + '@octokit/plugin-request-log@5.3.1': + resolution: {integrity: sha512-n/lNeCtq+9ofhC15xzmJCNKP2BWTv8Ih2TTy+jatNCCq/gQP/V7rK3fjIfuz0pDWDALO/o/4QY4hyOF6TQQFUw==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=6' @@ -914,16 +936,16 @@ packages: peerDependencies: '@octokit/core': '>=6' - '@octokit/request-error@6.1.1': - resolution: {integrity: sha512-1mw1gqT3fR/WFvnoVpY/zUM2o/XkMs/2AszUUG9I69xn0JFLv6PGkPhNk5lbfvROs79wiS0bqiJNxfCZcRJJdg==} + '@octokit/request-error@6.1.4': + resolution: {integrity: sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==} engines: {node: '>= 18'} - '@octokit/request@9.1.1': - resolution: {integrity: sha512-pyAguc0p+f+GbQho0uNetNQMmLG1e80WjkIaqqgUkihqUp0boRU6nKItXO4VWnr+nbZiLGEyy4TeKRwqaLvYgw==} + '@octokit/request@9.1.3': + resolution: {integrity: sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==} engines: {node: '>= 18'} - '@octokit/rest@21.0.0': - resolution: {integrity: sha512-XudXXOmiIjivdjNZ+fN71NLrnDM00sxSZlhqmPR3v0dVoJwyP628tSlc12xqn8nX3N0965583RBw5GPo6r8u4Q==} + '@octokit/rest@21.0.2': + resolution: {integrity: sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==} engines: {node: '>= 18'} '@octokit/types@13.5.0': @@ -933,83 +955,83 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@rollup/rollup-android-arm-eabi@4.18.0': - resolution: {integrity: sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==} + '@rollup/rollup-android-arm-eabi@4.21.0': + resolution: {integrity: sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.18.0': - resolution: {integrity: sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==} + '@rollup/rollup-android-arm64@4.21.0': + resolution: {integrity: sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.18.0': - resolution: {integrity: sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==} + '@rollup/rollup-darwin-arm64@4.21.0': + resolution: {integrity: sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.18.0': - resolution: {integrity: sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==} + '@rollup/rollup-darwin-x64@4.21.0': + resolution: {integrity: sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.18.0': - resolution: {integrity: sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==} + '@rollup/rollup-linux-arm-gnueabihf@4.21.0': + resolution: {integrity: sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.18.0': - resolution: {integrity: sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==} + '@rollup/rollup-linux-arm-musleabihf@4.21.0': + resolution: {integrity: sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.18.0': - resolution: {integrity: sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==} + '@rollup/rollup-linux-arm64-gnu@4.21.0': + resolution: {integrity: sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.18.0': - resolution: {integrity: sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==} + '@rollup/rollup-linux-arm64-musl@4.21.0': + resolution: {integrity: sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': - resolution: {integrity: sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==} + '@rollup/rollup-linux-powerpc64le-gnu@4.21.0': + resolution: {integrity: sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.18.0': - resolution: {integrity: sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==} + '@rollup/rollup-linux-riscv64-gnu@4.21.0': + resolution: {integrity: sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.18.0': - resolution: {integrity: sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==} + '@rollup/rollup-linux-s390x-gnu@4.21.0': + resolution: {integrity: sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.18.0': - resolution: {integrity: sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==} + '@rollup/rollup-linux-x64-gnu@4.21.0': + resolution: {integrity: sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.18.0': - resolution: {integrity: sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==} + '@rollup/rollup-linux-x64-musl@4.21.0': + resolution: {integrity: sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.18.0': - resolution: {integrity: sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==} + '@rollup/rollup-win32-arm64-msvc@4.21.0': + resolution: {integrity: sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.18.0': - resolution: {integrity: sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==} + '@rollup/rollup-win32-ia32-msvc@4.21.0': + resolution: {integrity: sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.18.0': - resolution: {integrity: sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==} + '@rollup/rollup-win32-x64-msvc@4.21.0': + resolution: {integrity: sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==} cpu: [x64] os: [win32] @@ -1044,20 +1066,20 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} - '@tsslint/cli@1.0.14': - resolution: {integrity: sha512-2f/nKBbr5v1hY5bBhNPNK0auymaf7KQFdF4ehjy9KeZ9AVhYD5yiwzKkO1MllseQO3ZChBI/bLTrr3F8QuZWNQ==} + '@tsslint/cli@1.0.17': + resolution: {integrity: sha512-ZzvKWJTALS64/QxTN9W9717FebePhHQfZA2FD0mm8sRhnQsEEFn1w5IUeq3czNp6MvApzXhHe9etOmafTQYTDg==} hasBin: true peerDependencies: typescript: '*' - '@tsslint/config@1.0.14': - resolution: {integrity: sha512-tcIVQ0kom6CtWo2S1R4bfYby3kPllPjybRDs7EWdQ9fnxWrBmNc3i9sZl7O4Vp5VkLLzUDCuoC4IQXtkJynB9Q==} + '@tsslint/config@1.0.17': + resolution: {integrity: sha512-KOBWOWSyw9GWqtgew5QOtO4Q1VV3gsIYo5PF3LOnIwVYIODdzaMZLTIG79h46/4autuT0GzQgFkpNxdqoXX81w==} - '@tsslint/core@1.0.14': - resolution: {integrity: sha512-IywX5iAfze3PwAlllvQY9TDpXPhEPfseTL/pfZZiOY9TNsRAZaXcsdIHXbNWky6FSmQNrvX/GW1ACZzTiR/Baw==} + '@tsslint/core@1.0.17': + resolution: {integrity: sha512-TzGetK1tIRfYHU1y1PC8bt6VyJMhm22DBRxzY2dzipmL4f/4ZLfJbcbkeVY2Z4USARgJY2gADFMyyzZ9Bc50ng==} - '@tsslint/types@1.0.14': - resolution: {integrity: sha512-5/A/R0IAoi8/b3afYGBRlIZdhpxwDwiJflt93byReQc3fwMZGUSUVlL2TeFA7d8G3fya7Ftdq9CiBCuHEHW05g==} + '@tsslint/types@1.0.17': + resolution: {integrity: sha512-2zHVkbra7AalBdvDOBddd+Du8tYMVQBkgSJKP3WWTU9p8zKj/RRRQt9Iqp0E3H0mJMS+khGBt6vcBoFlckFs/Q==} '@tufjs/canonical-json@2.0.0': resolution: {integrity: sha512-yVtV8zsdo8qFHe+/3kw81dSLyF7D576A5cCFCi4X7B39tWT7SekaEFUnvnWJHz+9qO7qJTah1JbrDjWKqFtdWA==} @@ -1073,38 +1095,44 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/node@20.14.11': - resolution: {integrity: sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==} + '@types/mute-stream@0.0.4': + resolution: {integrity: sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==} + + '@types/node@22.5.0': + resolution: {integrity: sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/path-browserify@1.0.2': - resolution: {integrity: sha512-ZkC5IUqqIFPXx3ASTTybTzmQdwHwe2C0u3eL75ldQ6T9E9IWFJodn6hIfbZGab73DfyiHN4Xw15gNxUq2FbvBA==} + '@types/path-browserify@1.0.3': + resolution: {integrity: sha512-ZmHivEbNCBtAfcrFeBCiTjdIc2dey0l7oCGNGpSuRTy8jP6UVND7oUowlvDujBy8r2Hoa8bfFUOCiPWfmtkfxw==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} - '@types/vscode@1.91.0': - resolution: {integrity: sha512-PgPr+bUODjG3y+ozWUCyzttqR9EHny9sPAfJagddQjDwdtf66y2sDKJMnFZRuzBA2YtBGASqJGPil8VDUPvO6A==} + '@types/vscode@1.92.0': + resolution: {integrity: sha512-DcZoCj17RXlzB4XJ7IfKdPTcTGDLYvTOcTNkvtjXWF+K2TlKzHHkBEXNWQRpBIXixNEUgx39cQeTFunY0E2msw==} + + '@types/wrap-ansi@3.0.0': + resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@vitest/expect@2.0.3': - resolution: {integrity: sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg==} + '@vitest/expect@2.0.5': + resolution: {integrity: sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==} - '@vitest/pretty-format@2.0.3': - resolution: {integrity: sha512-URM4GLsB2xD37nnTyvf6kfObFafxmycCL8un3OC9gaCs5cti2u+5rJdIflZ2fUJUen4NbvF6jCufwViAFLvz1g==} + '@vitest/pretty-format@2.0.5': + resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/runner@2.0.3': - resolution: {integrity: sha512-EmSP4mcjYhAcuBWwqgpjR3FYVeiA4ROzRunqKltWjBfLNs1tnMLtF+qtgd5ClTwkDP6/DGlKJTNa6WxNK0bNYQ==} + '@vitest/runner@2.0.5': + resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} - '@vitest/snapshot@2.0.3': - resolution: {integrity: sha512-6OyA6v65Oe3tTzoSuRPcU6kh9m+mPL1vQ2jDlPdn9IQoUxl8rXhBnfICNOC+vwxWY684Vt5UPgtcA2aPFBb6wg==} + '@vitest/snapshot@2.0.5': + resolution: {integrity: sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==} - '@vitest/spy@2.0.3': - resolution: {integrity: sha512-sfqyAw/ypOXlaj4S+w8689qKM1OyPOqnonqOc9T91DsoHbfN5mU7FdifWWv3MtQFf0lEUstEwR9L/q/M390C+A==} + '@vitest/spy@2.0.5': + resolution: {integrity: sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==} - '@vitest/utils@2.0.3': - resolution: {integrity: sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==} + '@vitest/utils@2.0.5': + resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee': resolution: {tarball: https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee} @@ -1202,8 +1230,8 @@ packages: '@vue/compiler-core@3.3.13': resolution: {integrity: sha512-bwi9HShGu7uaZLOErZgsH2+ojsEdsjerbf2cMXPwmvcgZfVPZ2BVZzCVnwZBxTAYd6Mzbmf6izcUNDkWnBBQ6A==} - '@vue/compiler-core@3.4.31': - resolution: {integrity: sha512-skOiodXWTV3DxfDhB4rOf3OGalpITLlgCeOwb+Y9GJpfQ8ErigdBUHomBzvG78JoVE8MJoQsb+qhZiHfKeNeEg==} + '@vue/compiler-core@3.4.38': + resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} '@vue/compiler-core@3.5.0-alpha.3': resolution: {integrity: sha512-du7iRe9SE5HJ8XGaVtN4OnVsBuslCOINZUiRYykJjDvJERdjDcJglJ4YTfi0gmG80p6TmzQSXxPuBVT/JlqpuQ==} @@ -1211,8 +1239,8 @@ packages: '@vue/compiler-dom@3.3.13': resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==} - '@vue/compiler-dom@3.4.31': - resolution: {integrity: sha512-wK424WMXsG1IGMyDGyLqB+TbmEBFM78hIsOJ9QwUVLGrcSk0ak6zYty7Pj8ftm7nEtdU/DGQxAXp0/lM/2cEpQ==} + '@vue/compiler-dom@3.4.38': + resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} '@vue/compiler-dom@3.5.0-alpha.3': resolution: {integrity: sha512-SL/lSqZ/LgiFEyix1Z3SqvRvd1hfZqQ0RfaH0wRDLv/2lkqswl4qxnqFBEChoWS0BpMBIMkAmrAha7xIhELKug==} @@ -1223,8 +1251,8 @@ packages: '@vue/compiler-sfc@3.3.13': resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==} - '@vue/compiler-sfc@3.4.31': - resolution: {integrity: sha512-einJxqEw8IIJxzmnxmJBuK2usI+lJonl53foq+9etB2HAzlPjAS/wa7r0uUpXw5ByX3/0uswVSrjNb17vJm1kQ==} + '@vue/compiler-sfc@3.4.38': + resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} '@vue/compiler-sfc@3.5.0-alpha.3': resolution: {integrity: sha512-UVs18nFL365hea2P9iOHvQDBB8eZxymhGmEol6YMbwB3DjhOcGyzscVixRin/kNHyPr5dEKjRUKcfxwZ03a+9A==} @@ -1232,8 +1260,8 @@ packages: '@vue/compiler-ssr@3.3.13': resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==} - '@vue/compiler-ssr@3.4.31': - resolution: {integrity: sha512-RtefmITAje3fJ8FSg1gwgDhdKhZVntIVbwupdyZDSifZTRMiWxWehAOTCc8/KZDnBOcYQ4/9VWxsTbd3wT0hAA==} + '@vue/compiler-ssr@3.4.38': + resolution: {integrity: sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==} '@vue/compiler-ssr@3.5.0-alpha.3': resolution: {integrity: sha512-cATOOLUjg9W86ZMT87DPsi3W4BZUZIIrIGZEUrRcC91lWs00PTtXiWxhQF4QGpxKpGLPr9GK3E2z5SeQWlk5Zw==} @@ -1247,8 +1275,8 @@ packages: '@vue/reactivity@3.3.13': resolution: {integrity: sha512-fjzCxceMahHhi4AxUBzQqqVhuA21RJ0COaWTbIBl1PruGW1CeY97louZzLi4smpYx+CHfFPPU/CS8NybbGvPKQ==} - '@vue/reactivity@3.4.31': - resolution: {integrity: sha512-VGkTani8SOoVkZNds1PfJ/T1SlAIOf8E58PGAhIOUDYPC4GAmFA2u/E14TDAFcf3vVDKunc4QqCe/SHr8xC65Q==} + '@vue/reactivity@3.4.38': + resolution: {integrity: sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==} '@vue/reactivity@3.5.0-alpha.3': resolution: {integrity: sha512-Ju0okU4JHdBsxxu7RR3qOMssg4G11KX5vhmlyOwpH3bssp1fYZWQ9qyz+iadtOVsomc+b3WG0Jdx1KFgrGMHcg==} @@ -1256,8 +1284,8 @@ packages: '@vue/runtime-core@3.3.13': resolution: {integrity: sha512-1TzA5TvGuh2zUwMJgdfvrBABWZ7y8kBwBhm7BXk8rvdx2SsgcGfz2ruv2GzuGZNvL1aKnK8CQMV/jFOrxNQUMA==} - '@vue/runtime-core@3.4.31': - resolution: {integrity: sha512-LDkztxeUPazxG/p8c5JDDKPfkCDBkkiNLVNf7XZIUnJ+66GVGkP+TIh34+8LtPisZ+HMWl2zqhIw0xN5MwU1cw==} + '@vue/runtime-core@3.4.38': + resolution: {integrity: sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==} '@vue/runtime-core@3.5.0-alpha.3': resolution: {integrity: sha512-RWo7KGycr0IIj1hjJ6xe5gsTeEMkhsW9wWc+lU4r8t7Tbg90F/wjBOcIXzFKhqI5+o9dExgozRhTYwrchbx/6g==} @@ -1265,8 +1293,8 @@ packages: '@vue/runtime-dom@3.3.13': resolution: {integrity: sha512-JJkpE8R/hJKXqVTgUoODwS5wqKtOsmJPEqmp90PDVGygtJ4C0PtOkcEYXwhiVEmef6xeXcIlrT3Yo5aQ4qkHhQ==} - '@vue/runtime-dom@3.4.31': - resolution: {integrity: sha512-2Auws3mB7+lHhTFCg8E9ZWopA6Q6L455EcU7bzcQ4x6Dn4cCPuqj6S2oBZgN2a8vJRS/LSYYxwFFq2Hlx3Fsaw==} + '@vue/runtime-dom@3.4.38': + resolution: {integrity: sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==} '@vue/runtime-dom@3.5.0-alpha.3': resolution: {integrity: sha512-IOM5wRRnEPYU2USpLtG1VbTyMkyj9Dk2xGnHKnqtjy/4Wdnp1pXifCTfa37rnFPZFAbKeXRJT74dLMdRIyH9Kw==} @@ -1276,10 +1304,10 @@ packages: peerDependencies: vue: 3.3.13 - '@vue/server-renderer@3.4.31': - resolution: {integrity: sha512-D5BLbdvrlR9PE3by9GaUp1gQXlCNadIZytMIb8H2h3FMWJd4oUfkUTEH2wAr3qxoRz25uxbTcbqd3WKlm9EHQA==} + '@vue/server-renderer@3.4.38': + resolution: {integrity: sha512-NggOTr82FbPEkkUvBm4fTGcwUY8UuTsnWC/L2YZBmvaQ4C4Jl/Ao4HHTB+l7WnFCt5M/dN3l0XLuyjzswGYVCA==} peerDependencies: - vue: 3.4.31 + vue: 3.4.38 '@vue/server-renderer@3.5.0-alpha.3': resolution: {integrity: sha512-w2ZOu7Q64BSotuyKReFEq5p/G0U1txTVgOsKq6+bTo3kPcUBYZV9yVCaePVf9kcU5tqjZoje5UBzNExe5DzZ3A==} @@ -1289,8 +1317,8 @@ packages: '@vue/shared@3.3.13': resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==} - '@vue/shared@3.4.31': - resolution: {integrity: sha512-Yp3wtJk//8cO4NItOPpi3QkLExAr/aLBGZMmTtW9WpdwBCJpRM6zj9WgWktXAl8IDIozwNMByT45JP3tO3ACWA==} + '@vue/shared@3.4.38': + resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} '@vue/shared@3.5.0-alpha.3': resolution: {integrity: sha512-TOd0zMchrmWoSWNddkx30wHTVRBkzemhgmbXMBUURv6HuyuddlVyqCMLDmYiklEurers3ILRp+e3b5QN838+kg==} @@ -1415,16 +1443,16 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - byte-size@8.1.1: - resolution: {integrity: sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg==} + byte-size@9.0.0: + resolution: {integrity: sha512-xrJ8Hki7eQ6xew55mM6TG9zHI852OoAHcPfduWWtR6yxk2upTuIZy13VioRBDyHReHDdbeDPifUboeNkK/sXXA==} engines: {node: '>=12.17'} cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} - cacache@18.0.3: - resolution: {integrity: sha512-qXCd4rh6I07cnDqh8V48/94Tc/WSfj+o3Gn6NZ0aZovS255bUx8O13uKxRFd2eWG0xgsco7+YItQNPaa5E85hg==} + cacache@18.0.4: + resolution: {integrity: sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==} engines: {node: ^16.14.0 || >=18.0.0} call-bind@1.0.7: @@ -1454,9 +1482,6 @@ packages: character-parser@2.2.0: resolution: {integrity: sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==} - chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - check-error@2.1.1: resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} engines: {node: '>= 16'} @@ -1464,9 +1489,9 @@ packages: cheerio-select@2.1.0: resolution: {integrity: sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==} - cheerio@1.0.0-rc.12: - resolution: {integrity: sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==} - engines: {node: '>= 6'} + cheerio@1.0.0: + resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} + engines: {node: '>=18.17'} chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} @@ -1491,10 +1516,6 @@ packages: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} - cli-cursor@3.1.0: - resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} - engines: {node: '>=8'} - cli-spinners@2.9.2: resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} engines: {node: '>=6'} @@ -1640,8 +1661,8 @@ packages: de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} - debug@4.3.5: - resolution: {integrity: sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==} + debug@4.3.6: + resolution: {integrity: sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -1669,8 +1690,8 @@ packages: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} - deepmerge-ts@5.1.0: - resolution: {integrity: sha512-eS8dRJOckyo9maw9Tu5O5RUi/4inFLrnoLkBe3cPfDMx3WZioXtmOew4TXQaxq7Rhl4xjDtR7c6x8nNTxOvbFw==} + deepmerge-ts@7.1.0: + resolution: {integrity: sha512-q6bNsfNBtgr8ZOQqmZbl94MmYWm+QcDNIkqCxVWiw1vKvf+y/N2dZQKdnDXn4c5Ygt/y63tDof6OCN+2YwWVEg==} engines: {node: '>=16.0.0'} defaults@1.0.4: @@ -1742,6 +1763,9 @@ packages: emoji-regex@9.2.2: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + encoding-sniffer@0.2.0: + resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==} + encoding@0.1.13: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} @@ -1791,8 +1815,8 @@ packages: engines: {node: '>=12'} hasBin: true - esbuild@0.23.0: - resolution: {integrity: sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} engines: {node: '>=18'} hasBin: true @@ -1828,10 +1852,6 @@ packages: exponential-backoff@3.1.1: resolution: {integrity: sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==} - external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} - fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -1858,8 +1878,8 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - foreground-child@3.2.1: - resolution: {integrity: sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} form-data@4.0.0: @@ -1933,8 +1953,8 @@ packages: git-up@7.0.0: resolution: {integrity: sha512-ONdIrbBCFusq1Oy0sC71F5azx8bVkvtZtMJAsv+a6lz5YAmbNnLD6HAB4gptHZVLPR8S2/kVN6Gab7lryq5+lQ==} - git-url-parse@14.0.0: - resolution: {integrity: sha512-NnLweV+2A4nCvn4U/m2AoYu0pPKlsmhK9cknG7IMwsjFY1S2jxM+mAhsDxyxfCIGfGaD+dozsyX4b6vkYc83yQ==} + git-url-parse@14.1.0: + resolution: {integrity: sha512-8xg65dTxGHST3+zGpycMMFZcoTzAdZ2dOtu4vmgIfkTFnVHBxHMzBC2L1k8To7EmrSiHesT8JgPLT91VKw1B5g==} github-from-package@0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} @@ -1947,11 +1967,6 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@10.4.2: - resolution: {integrity: sha512-GwMlUF6PkPo3Gk21UxkCohOv0PLcIXVtKyLlpEI28R/cO/4eNOdmLk3CMW1wROV/WR/EsZOWAfBbBOqYvs88/w==} - engines: {node: '>=16 || 14 >=14.18'} - hasBin: true - glob@10.4.5: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true @@ -2022,8 +2037,8 @@ packages: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} - htmlparser2@8.0.2: - resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} @@ -2040,10 +2055,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} @@ -2055,16 +2066,16 @@ packages: resolution: {integrity: sha512-VuuG0wCnjhnylG1ABXT3dAuIpTNDs/G8jlpmwXY03fXoXy/8ZK8/T+hMzt8L4WnrLCJgdybqgPagnF/f97cg3A==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - ignore@5.3.1: - resolution: {integrity: sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} import-fresh@3.3.0: resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} engines: {node: '>=6'} - import-local@3.1.0: - resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} + import-local@3.2.0: + resolution: {integrity: sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==} engines: {node: '>=8'} hasBin: true @@ -2086,9 +2097,9 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} - inquirer@9.2.23: - resolution: {integrity: sha512-kod5s+FBPIDM2xiy9fu+6wdU/SkK5le5GS9lh4FEBjBHqiMgD9lLFbCbuqFNAjNL2ZOy9Wd9F694IOzN9pZHBA==} - engines: {node: '>=18'} + ini@4.1.3: + resolution: {integrity: sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} ip-address@9.0.5: resolution: {integrity: sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==} @@ -2125,10 +2136,6 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - is-interactive@1.0.0: - resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} - engines: {node: '>=8'} - is-lambda@1.0.1: resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} @@ -2167,13 +2174,6 @@ packages: resolution: {integrity: sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==} engines: {node: '>=8'} - is-typedarray@1.0.0: - resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} - - is-unicode-supported@0.1.0: - resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} - engines: {node: '>=10'} - is-wsl@2.2.0: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} @@ -2189,9 +2189,8 @@ packages: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} - jackspeak@3.4.0: - resolution: {integrity: sha512-JVYhQnN59LVPFCEcVa2C3CrEKYacvjRfqIQl+h8oi91aLYQVWRYbxjPcv1bUiUy/kLmQaANrYfNMCO3kuEDHfw==} - engines: {node: '>=14'} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} jackspeak@4.0.1: resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} @@ -2322,19 +2321,11 @@ packages: lodash.once@4.1.1: resolution: {integrity: sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==} - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - log-symbols@4.1.0: - resolution: {integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==} - engines: {node: '>=10'} - loupe@3.1.1: resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} - lru-cache@10.3.0: - resolution: {integrity: sha512-CQl19J/g+Hbjbv4Y3mFNNXFEL/5t/KCg8POCuUqd4rMKjGG+j1ybER83hxV58zL+dFI1PTkt3GNFSHRt+d8qEQ==} - engines: {node: 14 || >=16.14} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} lru-cache@11.0.0: resolution: {integrity: sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==} @@ -2344,8 +2335,8 @@ packages: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} - magic-string@0.30.10: - resolution: {integrity: sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} make-dir@5.0.0: resolution: {integrity: sha512-G0yBotnlWVonPClw+tq+xi4K7DZC9n96HjGTBDdHkstAVsDkfZhi1sTvZypXLpyQTbISBkDtK0E5XlUqDsShQg==} @@ -2373,8 +2364,8 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micromatch@4.0.7: - resolution: {integrity: sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} mime-db@1.52.0: @@ -2390,10 +2381,6 @@ packages: engines: {node: '>=4'} hasBin: true - mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - mimic-fn@4.0.0: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} @@ -2467,6 +2454,9 @@ packages: ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} @@ -2496,8 +2486,8 @@ packages: resolution: {integrity: sha512-NHDDGYudnvRutt/VhKFlX26IotXe1w0cmkDm6JGquh5bz/bDTw0LufSmH/GxTjEdpHEO+bVKFTwdrcGa/9XlKQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-abi@3.65.0: - resolution: {integrity: sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==} + node-abi@3.67.0: + resolution: {integrity: sha512-bLn/fU/ALVBE9wj+p4Y21ZJWYFjUXLXPi/IewyLZkx3ApxKDNBWCKdReeKOtD8dWpOdDCeMyLh6ZewzcLsG2Nw==} engines: {node: '>=10'} node-addon-api@4.3.0: @@ -2511,8 +2501,8 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp@10.1.0: - resolution: {integrity: sha512-B4J5M1cABxPc5PwfjhbV5hoy2DP9p8lFXASnEN6hugXOa61416tnTZ29x9sSwAd0o99XNIcpvDDy1swAExsVKA==} + node-gyp@10.2.0: + resolution: {integrity: sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==} engines: {node: ^16.14.0 || >=18.0.0} hasBin: true @@ -2541,16 +2531,16 @@ packages: resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-package-arg@11.0.2: - resolution: {integrity: sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==} + npm-package-arg@11.0.3: + resolution: {integrity: sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==} engines: {node: ^16.14.0 || >=18.0.0} npm-packlist@8.0.2: resolution: {integrity: sha512-shYrPFIS/JLP4oQmAwDyk5HcyysKW8/JLTEA32S0Z5TzvpaeeX2yMFfoK1fjEBnCBvVyIB/Jj/GBFdm0wsgzbA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - npm-pick-manifest@9.0.1: - resolution: {integrity: sha512-Udm1f0l2nXb3wxDpKjfohwgdFUSV50UVwzEIpDXVsbDMXVIEF81a/i0UhuQbhrPMMmdiq3+YMFLFIRVLs3hxQw==} + npm-pick-manifest@9.1.0: + resolution: {integrity: sha512-nkc+3pIIhqHVQr085X9d2JzPzLyjzQS96zbruppqC9aZRm/x8xx6xhI98gHtsfELP2bE+loHq8ZaHFHhe+NauA==} engines: {node: ^16.14.0 || >=18.0.0} npm-registry-fetch@17.1.0: @@ -2575,10 +2565,6 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - onetime@6.0.0: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} @@ -2587,14 +2573,6 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - ora@5.4.1: - resolution: {integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==} - engines: {node: '>=10'} - - os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -2683,6 +2661,9 @@ packages: parse5-htmlparser2-tree-adapter@7.0.0: resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} + parse5-parser-stream@7.1.2: + resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} + parse5@7.1.2: resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} @@ -2746,12 +2727,12 @@ packages: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} - postcss-selector-parser@6.1.1: - resolution: {integrity: sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==} + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} engines: {node: '>=4'} - postcss@8.4.39: - resolution: {integrity: sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==} + postcss@8.4.41: + resolution: {integrity: sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==} engines: {node: ^10 || ^12 || >=14} prebuild-install@7.1.2: @@ -2764,10 +2745,6 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - proc-log@3.0.0: - resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - proc-log@4.2.0: resolution: {integrity: sha512-g8+OnU/L2v+wyiVK+D5fA34J7EH8jZ8DDlvwhRCMxmMj7UCBvxiO1mGeN+36JXIKF4zevU4kRBd8lVgG9vLelA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2812,8 +2789,8 @@ packages: pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - qs@6.12.2: - resolution: {integrity: sha512-x+NLUpx9SYrcwXtX7ob1gnkSems4i/mGZX5SlYxwIau6RrUSODO89TR/XDGGpn5RPWSYIB+aSfuSlV5+CmbTBg==} + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} queue-microtask@1.2.3: @@ -2874,10 +2851,6 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - restore-cursor@3.1.0: - resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} - engines: {node: '>=8'} - retry@0.12.0: resolution: {integrity: sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==} engines: {node: '>= 4'} @@ -2886,21 +2859,14 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.18.0: - resolution: {integrity: sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==} + rollup@4.21.0: + resolution: {integrity: sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true - run-async@3.0.0: - resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==} - engines: {node: '>=0.12.0'} - run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -2914,8 +2880,8 @@ packages: resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true - semver@7.6.2: - resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} hasBin: true @@ -2945,9 +2911,6 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -3009,8 +2972,8 @@ packages: spdx-expression-parse@3.0.1: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - spdx-license-ids@3.0.18: - resolution: {integrity: sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==} + spdx-license-ids@3.0.20: + resolution: {integrity: sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==} split2@4.2.0: resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} @@ -3102,11 +3065,11 @@ packages: through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - tinybench@2.8.0: - resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinypool@1.0.0: - resolution: {integrity: sha512-KIKExllK7jp3uvrNtvRBYBWBOAXSX8ZvoaD8T+7KB/QHIuoJW3Pmr60zucywjAlMb5TeXUkcs/MWeWLu0qvuAQ==} + tinypool@1.0.1: + resolution: {integrity: sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@1.2.0: @@ -3117,10 +3080,6 @@ packages: resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} - tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - tmp@0.2.3: resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} engines: {node: '>=14.14'} @@ -3140,8 +3099,8 @@ packages: resolution: {integrity: sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - tslib@2.6.3: - resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} tuf-js@2.2.1: resolution: {integrity: sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==} @@ -3166,40 +3125,46 @@ packages: resolution: {integrity: sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==} engines: {node: '>=14.16'} - type-fest@4.21.0: - resolution: {integrity: sha512-ADn2w7hVPcK6w1I0uWnM//y1rLXZhzB9mr0a3OirzclKF1Wp6VzevUmzz/NRAWunOT6E8HrnpGY7xOfc6K57fA==} + type-fest@4.25.0: + resolution: {integrity: sha512-bRkIGlXsnGBRBQRAY56UXBm//9qH4bmJfFvq83gSz41N282df+fjy8ofcEgc1sM8geNt5cl6mC2g9Fht1cs8Aw==} engines: {node: '>=16'} typed-rest-client@1.8.11: resolution: {integrity: sha512-5UvfMpd1oelmUPRbbaVnq+rHP7ng2cE4qoQkQeAqxRL6PklkxsM0g32/HL0yfvruK6ojQ5x8EE+HF4YV6DtuCA==} - typedarray-to-buffer@3.1.5: - resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typesafe-path@0.2.2: resolution: {integrity: sha512-OJabfkAg1WLZSqJAJ0Z6Sdt3utnbzr/jh+NAHoyWHJe8CMSy79Gm085094M9nvTPy22KzTVn5Zq5mbapCI/hPA==} typescript-auto-import-cache@0.3.3: resolution: {integrity: sha512-ojEC7+Ci1ij9eE6hp8Jl9VUNnsEKzztktP5gtYNRMrTmfXVwA1PITYYAkpxCvvupdSYa/Re51B6KMcv1CTZEUA==} - typescript@5.5.3: - resolution: {integrity: sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==} + typescript@5.5.4: + resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@5.7.0-dev.20240825: + resolution: {integrity: sha512-Jvp8aTJ4RVnO3WFg89Cc1TN6MHGGWifrVoOyQD3OwKfIYqXqvhD+8iUNHJAOJCgp3FtVY+qtxwuLiH6MQ3XpqQ==} engines: {node: '>=14.17'} hasBin: true uc.micro@1.0.6: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} - uglify-js@3.18.0: - resolution: {integrity: sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==} + uglify-js@3.19.2: + resolution: {integrity: sha512-S8KA6DDI47nQXJSi2ctQ629YzwOVs+bQML6DAtvy0wgNdpi+0ySpQK0g2pxBq2xfF2z3YCscu7NNA8nXT9PlIQ==} engines: {node: '>=0.8.0'} hasBin: true - underscore@1.13.6: - resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} + underscore@1.13.7: + resolution: {integrity: sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + + undici@6.19.8: + resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} + engines: {node: '>=18.17'} unicorn-magic@0.1.0: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} @@ -3241,13 +3206,13 @@ packages: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - vite-node@2.0.3: - resolution: {integrity: sha512-14jzwMx7XTcMB+9BhGQyoEAmSl0eOr3nrnn+Z12WNERtOvLN+d2scbRUvyni05rT3997Bg+rZb47NyP4IQPKXg==} + vite-node@2.0.5: + resolution: {integrity: sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@5.3.4: - resolution: {integrity: sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==} + vite@5.4.2: + resolution: {integrity: sha512-dDrQTRHp5C1fTFzcSaMxjk6vdpKvT+2/mIdE07Gw2ykehT49O0z/VHS3zZ8iV/Gh8BJJKHWOe5RjaNrW5xf/GA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3255,6 +3220,7 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -3267,6 +3233,8 @@ packages: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -3274,15 +3242,15 @@ packages: terser: optional: true - vitest@2.0.3: - resolution: {integrity: sha512-o3HRvU93q6qZK4rI2JrhKyZMMuxg/JRt30E6qeQs6ueaiz5hr1cPj+Sk2kATgQzMMqsa2DiNI0TIK++1ULx8Jw==} + vitest@2.0.5: + resolution: {integrity: sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 2.0.3 - '@vitest/ui': 2.0.3 + '@vitest/browser': 2.0.5 + '@vitest/ui': 2.0.5 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -3385,8 +3353,8 @@ packages: vscode-languageserver-protocol@3.17.5: resolution: {integrity: sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==} - vscode-languageserver-textdocument@1.0.11: - resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} + vscode-languageserver-textdocument@1.0.12: + resolution: {integrity: sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==} vscode-languageserver-types@3.17.5: resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} @@ -3425,8 +3393,8 @@ packages: typescript: optional: true - vue@3.4.31: - resolution: {integrity: sha512-njqRrOy7W3YLAlVqSKpBebtZpDVg21FPoaq1I7f/+qqBThK9ChAIjkRWgeP6Eat+8C+iia4P3OYqpATP21BCoQ==} + vue@3.4.38: + resolution: {integrity: sha512-f0ZgN+mZ5KFgVv9wz0f4OgVKukoXtS3nwET4c2vLBGQR50aI8G0cqbFtLlX9Yiyg3LFGBitruPHt2PxwTduJEw==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -3451,6 +3419,14 @@ packages: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} + whatwg-encoding@3.1.1: + resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} + engines: {node: '>=18'} + + whatwg-mimetype@4.0.0: + resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} + engines: {node: '>=18'} + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -3461,8 +3437,8 @@ packages: engines: {node: ^16.13.0 || >=18.0.0} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true @@ -3487,19 +3463,16 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - write-file-atomic@3.0.3: - resolution: {integrity: sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==} - write-file-atomic@5.0.1: resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - write-json-file@5.0.0: - resolution: {integrity: sha512-ddSsCLa4aQ3kI21BthINo4q905/wfhvQ3JL3774AcRjBaiQmfn5v4rw77jQ7T6CmAit9VOQO+FsLyPkwxoB1fw==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + write-json-file@6.0.0: + resolution: {integrity: sha512-MNHcU3f9WxnNyR6MxsYSj64Jz0+dwIpisWKWq9gqLj/GwmA9INg3BZ3vt70/HB3GEwrnDQWr4RPrywnhNzmUFA==} + engines: {node: '>=18'} - write-package@7.0.1: - resolution: {integrity: sha512-S7c5F2mpb5o+9pS1UfO3jcQb0OR25L7ZJT64cv3K0TkGh1VxJb+PNnL8b46KSJ6tmxIbA0xgHnrtBdVGeHmJ0A==} + write-package@7.1.0: + resolution: {integrity: sha512-DqUx8GI3r9BFWwU2DPKddL1E7xWfbFED82mLVhGXKlFEPe8IkBftzO7WfNwHtk7oGDHDeuH/o8VMpzzfMwmLUA==} engines: {node: '>=18'} xml2js@0.5.0: @@ -3535,6 +3508,10 @@ packages: resolution: {integrity: sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==} engines: {node: '>=12.20'} + yoctocolors-cjs@2.1.2: + resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} + engines: {node: '>=18'} + snapshots: '@ampproject/remapping@2.3.0': @@ -3544,17 +3521,17 @@ snapshots: '@azure/abort-controller@1.1.0': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@azure/abort-controller@2.1.2': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@azure/core-auth@1.7.2': dependencies: '@azure/abort-controller': 2.1.2 '@azure/core-util': 1.9.2 - tslib: 2.6.3 + tslib: 2.7.0 '@azure/core-client@1.9.2': dependencies: @@ -3564,7 +3541,7 @@ snapshots: '@azure/core-tracing': 1.1.2 '@azure/core-util': 1.9.2 '@azure/logger': 1.1.4 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - supports-color @@ -3577,18 +3554,18 @@ snapshots: '@azure/logger': 1.1.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - supports-color '@azure/core-tracing@1.1.2': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@azure/core-util@1.9.2': dependencies: '@azure/abort-controller': 2.1.2 - tslib: 2.6.3 + tslib: 2.7.0 '@azure/identity@4.4.1': dependencies: @@ -3605,13 +3582,13 @@ snapshots: jws: 4.0.0 open: 8.4.2 stoppable: 1.1.0 - tslib: 2.6.3 + tslib: 2.7.0 transitivePeerDependencies: - supports-color '@azure/logger@1.1.4': dependencies: - tslib: 2.6.3 + tslib: 2.7.0 '@azure/msal-browser@3.21.0': dependencies: @@ -3630,7 +3607,7 @@ snapshots: '@babel/highlight': 7.24.7 picocolors: 1.0.1 - '@babel/helper-string-parser@7.24.7': {} + '@babel/helper-string-parser@7.24.8': {} '@babel/helper-validator-identifier@7.24.7': {} @@ -3641,13 +3618,13 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.0.1 - '@babel/parser@7.24.7': + '@babel/parser@7.25.4': dependencies: - '@babel/types': 7.24.7 + '@babel/types': 7.25.4 - '@babel/types@7.24.7': + '@babel/types@7.25.4': dependencies: - '@babel/helper-string-parser': 7.24.7 + '@babel/helper-string-parser': 7.24.8 '@babel/helper-validator-identifier': 7.24.7 to-fast-properties: 2.0.0 @@ -3688,147 +3665,186 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true - '@esbuild/aix-ppc64@0.23.0': + '@esbuild/aix-ppc64@0.23.1': optional: true '@esbuild/android-arm64@0.21.5': optional: true - '@esbuild/android-arm64@0.23.0': + '@esbuild/android-arm64@0.23.1': optional: true '@esbuild/android-arm@0.21.5': optional: true - '@esbuild/android-arm@0.23.0': + '@esbuild/android-arm@0.23.1': optional: true '@esbuild/android-x64@0.21.5': optional: true - '@esbuild/android-x64@0.23.0': + '@esbuild/android-x64@0.23.1': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true - '@esbuild/darwin-arm64@0.23.0': + '@esbuild/darwin-arm64@0.23.1': optional: true '@esbuild/darwin-x64@0.21.5': optional: true - '@esbuild/darwin-x64@0.23.0': + '@esbuild/darwin-x64@0.23.1': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true - '@esbuild/freebsd-arm64@0.23.0': + '@esbuild/freebsd-arm64@0.23.1': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true - '@esbuild/freebsd-x64@0.23.0': + '@esbuild/freebsd-x64@0.23.1': optional: true '@esbuild/linux-arm64@0.21.5': optional: true - '@esbuild/linux-arm64@0.23.0': + '@esbuild/linux-arm64@0.23.1': optional: true '@esbuild/linux-arm@0.21.5': optional: true - '@esbuild/linux-arm@0.23.0': + '@esbuild/linux-arm@0.23.1': optional: true '@esbuild/linux-ia32@0.21.5': optional: true - '@esbuild/linux-ia32@0.23.0': + '@esbuild/linux-ia32@0.23.1': optional: true '@esbuild/linux-loong64@0.21.5': optional: true - '@esbuild/linux-loong64@0.23.0': + '@esbuild/linux-loong64@0.23.1': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true - '@esbuild/linux-mips64el@0.23.0': + '@esbuild/linux-mips64el@0.23.1': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/linux-ppc64@0.23.0': + '@esbuild/linux-ppc64@0.23.1': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/linux-riscv64@0.23.0': + '@esbuild/linux-riscv64@0.23.1': optional: true '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/linux-s390x@0.23.0': + '@esbuild/linux-s390x@0.23.1': optional: true '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-x64@0.23.0': + '@esbuild/linux-x64@0.23.1': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/netbsd-x64@0.23.0': + '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/openbsd-arm64@0.23.0': + '@esbuild/openbsd-arm64@0.23.1': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.23.0': + '@esbuild/openbsd-x64@0.23.1': optional: true '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/sunos-x64@0.23.0': + '@esbuild/sunos-x64@0.23.1': optional: true '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.23.0': + '@esbuild/win32-arm64@0.23.1': optional: true '@esbuild/win32-ia32@0.21.5': optional: true - '@esbuild/win32-ia32@0.23.0': + '@esbuild/win32-ia32@0.23.1': optional: true '@esbuild/win32-x64@0.21.5': optional: true - '@esbuild/win32-x64@0.23.0': + '@esbuild/win32-x64@0.23.1': optional: true '@hutson/parse-repository-url@5.0.0': {} - '@inquirer/figures@1.0.3': {} + '@inquirer/core@9.0.10': + dependencies: + '@inquirer/figures': 1.0.5 + '@inquirer/type': 1.5.2 + '@types/mute-stream': 0.0.4 + '@types/node': 22.5.0 + '@types/wrap-ansi': 3.0.0 + ansi-escapes: 4.3.2 + cli-spinners: 2.9.2 + cli-width: 4.1.0 + mute-stream: 1.0.0 + signal-exit: 4.1.0 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + yoctocolors-cjs: 2.1.2 + + '@inquirer/expand@2.1.22': + dependencies: + '@inquirer/core': 9.0.10 + '@inquirer/type': 1.5.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/figures@1.0.5': {} + + '@inquirer/input@2.2.9': + dependencies: + '@inquirer/core': 9.0.10 + '@inquirer/type': 1.5.2 + + '@inquirer/select@2.4.7': + dependencies: + '@inquirer/core': 9.0.10 + '@inquirer/figures': 1.0.5 + '@inquirer/type': 1.5.2 + ansi-escapes: 4.3.2 + yoctocolors-cjs: 2.1.2 + + '@inquirer/type@1.5.2': + dependencies: + mute-stream: 1.0.0 '@isaacs/cliui@8.0.2': dependencies: @@ -3846,86 +3862,88 @@ snapshots: '@jridgewell/gen-mapping@0.3.5': dependencies: '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/set-array@1.2.1': {} - '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} '@jridgewell/trace-mapping@0.3.25': dependencies: '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 - '@lerna-lite/cli@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(@lerna-lite/version@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3))(typescript@5.5.3)': + '@lerna-lite/cli@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(@lerna-lite/version@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4))(typescript@5.5.4)': dependencies: - '@lerna-lite/core': 3.7.1(typescript@5.5.3) - '@lerna-lite/init': 3.7.1(typescript@5.5.3) - '@lerna-lite/npmlog': 3.7.0 + '@lerna-lite/core': 3.8.0(typescript@5.5.4) + '@lerna-lite/init': 3.8.0(typescript@5.5.4) + '@lerna-lite/npmlog': 3.8.0 dedent: 1.5.3 dotenv: 16.4.5 - import-local: 3.1.0 + import-local: 3.2.0 load-json-file: 7.0.1 yargs: 17.7.2 optionalDependencies: - '@lerna-lite/publish': 3.7.1(typescript@5.5.3) - '@lerna-lite/version': 3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3) + '@lerna-lite/publish': 3.8.0(typescript@5.5.4) + '@lerna-lite/version': 3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4) transitivePeerDependencies: - babel-plugin-macros - bluebird - supports-color - typescript - '@lerna-lite/core@3.7.1(typescript@5.5.3)': + '@lerna-lite/core@3.8.0(typescript@5.5.4)': dependencies: - '@lerna-lite/npmlog': 3.7.0 + '@inquirer/expand': 2.1.22 + '@inquirer/input': 2.2.9 + '@inquirer/select': 2.4.7 + '@lerna-lite/npmlog': 3.8.0 '@npmcli/run-script': 8.1.0 chalk: 5.3.0 clone-deep: 4.0.1 config-chain: 1.1.13 - cosmiconfig: 9.0.0(typescript@5.5.3) + cosmiconfig: 9.0.0(typescript@5.5.4) dedent: 1.5.3 execa: 8.0.1 fs-extra: 11.2.0 glob-parent: 6.0.2 globby: 14.0.2 - inquirer: 9.2.23 is-ci: 3.0.1 json5: 2.2.3 load-json-file: 7.0.1 minimatch: 9.0.5 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 p-map: 7.0.2 p-queue: 8.0.1 resolve-from: 5.0.0 - semver: 7.6.2 + semver: 7.6.3 slash: 5.1.0 strong-log-transformer: 2.1.0 write-file-atomic: 5.0.1 - write-json-file: 5.0.0 - write-package: 7.0.1 + write-json-file: 6.0.0 + write-package: 7.1.0 transitivePeerDependencies: - babel-plugin-macros - bluebird - supports-color - typescript - '@lerna-lite/init@3.7.1(typescript@5.5.3)': + '@lerna-lite/init@3.8.0(typescript@5.5.4)': dependencies: - '@lerna-lite/core': 3.7.1(typescript@5.5.3) + '@lerna-lite/core': 3.8.0(typescript@5.5.4) fs-extra: 11.2.0 p-map: 7.0.2 - write-json-file: 5.0.0 + write-json-file: 6.0.0 transitivePeerDependencies: - babel-plugin-macros - bluebird - supports-color - typescript - '@lerna-lite/npmlog@3.7.0': + '@lerna-lite/npmlog@3.8.0': dependencies: aproba: 2.0.0 color-support: 1.1.3 @@ -3937,15 +3955,15 @@ snapshots: strip-ansi: 7.1.0 wide-align: 1.1.5 - '@lerna-lite/publish@3.7.1(typescript@5.5.3)': + '@lerna-lite/publish@3.8.0(typescript@5.5.4)': dependencies: - '@lerna-lite/cli': 3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(@lerna-lite/version@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3))(typescript@5.5.3) - '@lerna-lite/core': 3.7.1(typescript@5.5.3) - '@lerna-lite/npmlog': 3.7.0 - '@lerna-lite/version': 3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3) + '@lerna-lite/cli': 3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(@lerna-lite/version@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4))(typescript@5.5.4) + '@lerna-lite/core': 3.8.0(typescript@5.5.4) + '@lerna-lite/npmlog': 3.8.0 + '@lerna-lite/version': 3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4) '@npmcli/arborist': 7.5.4 '@npmcli/package-json': 5.2.0 - byte-size: 8.1.1 + byte-size: 9.0.0 chalk: 5.3.0 columnify: 1.6.0 fs-extra: 11.2.0 @@ -3954,13 +3972,13 @@ snapshots: libnpmaccess: 8.0.6 libnpmpublish: 9.0.9 normalize-path: 3.0.0 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 npm-packlist: 8.0.2 npm-registry-fetch: 17.1.0 p-map: 7.0.2 p-pipe: 4.0.0 pacote: 18.0.6 - semver: 7.6.2 + semver: 7.6.3 ssri: 10.0.6 tar: 6.2.1 temp-dir: 3.0.0 @@ -3974,13 +3992,13 @@ snapshots: - supports-color - typescript - '@lerna-lite/version@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3)': + '@lerna-lite/version@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4)': dependencies: - '@lerna-lite/cli': 3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(@lerna-lite/version@3.7.1(@lerna-lite/publish@3.7.1(typescript@5.5.3))(typescript@5.5.3))(typescript@5.5.3) - '@lerna-lite/core': 3.7.1(typescript@5.5.3) - '@lerna-lite/npmlog': 3.7.0 + '@lerna-lite/cli': 3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(@lerna-lite/version@3.8.0(@lerna-lite/publish@3.8.0(typescript@5.5.4))(typescript@5.5.4))(typescript@5.5.4) + '@lerna-lite/core': 3.8.0(typescript@5.5.4) + '@lerna-lite/npmlog': 3.8.0 '@octokit/plugin-enterprise-rest': 6.0.1 - '@octokit/rest': 21.0.0 + '@octokit/rest': 21.0.2 chalk: 5.3.0 conventional-changelog-angular: 7.0.0 conventional-changelog-core: 7.0.0 @@ -3990,7 +4008,7 @@ snapshots: dedent: 1.5.3 fs-extra: 11.2.0 get-stream: 9.0.1 - git-url-parse: 14.0.0 + git-url-parse: 14.1.0 graceful-fs: 4.2.11 is-stream: 4.0.1 load-json-file: 7.0.1 @@ -3998,17 +4016,17 @@ snapshots: minimatch: 9.0.5 new-github-release-url: 2.0.0 node-fetch: 3.3.2 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 p-limit: 6.1.0 p-map: 7.0.2 p-pipe: 4.0.0 p-reduce: 3.0.0 pify: 6.1.0 - semver: 7.6.2 + semver: 7.6.3 slash: 5.1.0 temp-dir: 3.0.0 uuid: 10.0.0 - write-json-file: 5.0.0 + write-json-file: 6.0.0 transitivePeerDependencies: - '@lerna-lite/exec' - '@lerna-lite/list' @@ -4020,10 +4038,6 @@ snapshots: - supports-color - typescript - '@ljharb/through@2.3.13': - dependencies: - call-bind: 1.0.7 - '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -4041,7 +4055,7 @@ snapshots: agent-base: 7.1.1 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 - lru-cache: 10.3.0 + lru-cache: 10.4.3 socks-proxy-agent: 8.0.4 transitivePeerDependencies: - supports-color @@ -4060,17 +4074,17 @@ snapshots: '@npmcli/redact': 2.0.1 '@npmcli/run-script': 8.1.0 bin-links: 4.0.4 - cacache: 18.0.3 + cacache: 18.0.4 common-ancestor-path: 1.0.1 hosted-git-info: 7.0.2 json-parse-even-better-errors: 3.0.2 json-stringify-nice: 1.1.4 - lru-cache: 10.3.0 + lru-cache: 10.4.3 minimatch: 9.0.5 nopt: 7.2.1 npm-install-checks: 6.3.0 - npm-package-arg: 11.0.2 - npm-pick-manifest: 9.0.1 + npm-package-arg: 11.0.3 + npm-pick-manifest: 9.1.0 npm-registry-fetch: 17.1.0 pacote: 18.0.6 parse-conflict-json: 3.0.1 @@ -4079,7 +4093,7 @@ snapshots: promise-all-reject-late: 1.0.1 promise-call-limit: 3.0.1 read-package-json-fast: 3.0.2 - semver: 7.6.2 + semver: 7.6.3 ssri: 10.0.6 treeverse: 3.0.0 walk-up-path: 3.0.1 @@ -4089,17 +4103,18 @@ snapshots: '@npmcli/fs@3.1.1': dependencies: - semver: 7.6.2 + semver: 7.6.3 - '@npmcli/git@5.0.7': + '@npmcli/git@5.0.8': dependencies: '@npmcli/promise-spawn': 7.0.2 - lru-cache: 10.3.0 - npm-pick-manifest: 9.0.1 + ini: 4.1.3 + lru-cache: 10.4.3 + npm-pick-manifest: 9.1.0 proc-log: 4.2.0 promise-inflight: 1.0.1 promise-retry: 2.0.1 - semver: 7.6.2 + semver: 7.6.3 which: 4.0.0 transitivePeerDependencies: - bluebird @@ -4118,11 +4133,11 @@ snapshots: '@npmcli/metavuln-calculator@7.1.1': dependencies: - cacache: 18.0.3 + cacache: 18.0.4 json-parse-even-better-errors: 3.0.2 pacote: 18.0.6 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - bluebird - supports-color @@ -4133,13 +4148,13 @@ snapshots: '@npmcli/package-json@5.2.0': dependencies: - '@npmcli/git': 5.0.7 + '@npmcli/git': 5.0.8 glob: 10.4.5 hosted-git-info: 7.0.2 json-parse-even-better-errors: 3.0.2 normalize-package-data: 6.0.2 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 transitivePeerDependencies: - bluebird @@ -4149,7 +4164,7 @@ snapshots: '@npmcli/query@3.1.0': dependencies: - postcss-selector-parser: 6.1.1 + postcss-selector-parser: 6.1.2 '@npmcli/redact@2.0.1': {} @@ -4158,7 +4173,7 @@ snapshots: '@npmcli/node-gyp': 3.0.0 '@npmcli/package-json': 5.2.0 '@npmcli/promise-spawn': 7.0.2 - node-gyp: 10.1.0 + node-gyp: 10.2.0 proc-log: 4.2.0 which: 4.0.0 transitivePeerDependencies: @@ -4171,8 +4186,8 @@ snapshots: dependencies: '@octokit/auth-token': 5.1.1 '@octokit/graphql': 8.1.1 - '@octokit/request': 9.1.1 - '@octokit/request-error': 6.1.1 + '@octokit/request': 9.1.3 + '@octokit/request-error': 6.1.4 '@octokit/types': 13.5.0 before-after-hook: 3.0.2 universal-user-agent: 7.0.2 @@ -4184,7 +4199,7 @@ snapshots: '@octokit/graphql@8.1.1': dependencies: - '@octokit/request': 9.1.1 + '@octokit/request': 9.1.3 '@octokit/types': 13.5.0 universal-user-agent: 7.0.2 @@ -4197,7 +4212,7 @@ snapshots: '@octokit/core': 6.1.2 '@octokit/types': 13.5.0 - '@octokit/plugin-request-log@5.3.0(@octokit/core@6.1.2)': + '@octokit/plugin-request-log@5.3.1(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 @@ -4206,22 +4221,22 @@ snapshots: '@octokit/core': 6.1.2 '@octokit/types': 13.5.0 - '@octokit/request-error@6.1.1': + '@octokit/request-error@6.1.4': dependencies: '@octokit/types': 13.5.0 - '@octokit/request@9.1.1': + '@octokit/request@9.1.3': dependencies: '@octokit/endpoint': 10.1.1 - '@octokit/request-error': 6.1.1 + '@octokit/request-error': 6.1.4 '@octokit/types': 13.5.0 universal-user-agent: 7.0.2 - '@octokit/rest@21.0.0': + '@octokit/rest@21.0.2': dependencies: '@octokit/core': 6.1.2 '@octokit/plugin-paginate-rest': 11.3.3(@octokit/core@6.1.2) - '@octokit/plugin-request-log': 5.3.0(@octokit/core@6.1.2) + '@octokit/plugin-request-log': 5.3.1(@octokit/core@6.1.2) '@octokit/plugin-rest-endpoint-methods': 13.2.4(@octokit/core@6.1.2) '@octokit/types@13.5.0': @@ -4231,52 +4246,52 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/rollup-android-arm-eabi@4.18.0': + '@rollup/rollup-android-arm-eabi@4.21.0': optional: true - '@rollup/rollup-android-arm64@4.18.0': + '@rollup/rollup-android-arm64@4.21.0': optional: true - '@rollup/rollup-darwin-arm64@4.18.0': + '@rollup/rollup-darwin-arm64@4.21.0': optional: true - '@rollup/rollup-darwin-x64@4.18.0': + '@rollup/rollup-darwin-x64@4.21.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.18.0': + '@rollup/rollup-linux-arm-gnueabihf@4.21.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.18.0': + '@rollup/rollup-linux-arm-musleabihf@4.21.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.18.0': + '@rollup/rollup-linux-arm64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.18.0': + '@rollup/rollup-linux-arm64-musl@4.21.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.18.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.21.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.18.0': + '@rollup/rollup-linux-riscv64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.18.0': + '@rollup/rollup-linux-s390x-gnu@4.21.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.18.0': + '@rollup/rollup-linux-x64-gnu@4.21.0': optional: true - '@rollup/rollup-linux-x64-musl@4.18.0': + '@rollup/rollup-linux-x64-musl@4.21.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.18.0': + '@rollup/rollup-win32-arm64-msvc@4.21.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.18.0': + '@rollup/rollup-win32-ia32-msvc@4.21.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.18.0': + '@rollup/rollup-win32-x64-msvc@4.21.0': optional: true '@sec-ant/readable-stream@0.4.1': {} @@ -4315,26 +4330,27 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} - '@tsslint/cli@1.0.14(typescript@5.5.3)': + '@tsslint/cli@1.0.17(typescript@5.5.4)': dependencies: '@clack/prompts': 0.7.0 - '@tsslint/config': 1.0.14 - '@tsslint/core': 1.0.14 - glob: 10.4.2 - typescript: 5.5.3 + '@tsslint/config': 1.0.17 + '@tsslint/core': 1.0.17 + glob: 10.4.5 + typescript: 5.5.4 - '@tsslint/config@1.0.14': + '@tsslint/config@1.0.17': dependencies: - '@tsslint/types': 1.0.14 - esbuild: 0.23.0 + '@tsslint/types': 1.0.17 - '@tsslint/core@1.0.14': + '@tsslint/core@1.0.17': dependencies: + '@tsslint/types': 1.0.17 error-stack-parser: 2.1.4 + esbuild: 0.23.1 minimatch: 10.0.1 source-map-support: 0.5.21 - '@tsslint/types@1.0.14': {} + '@tsslint/types@1.0.17': {} '@tufjs/canonical-json@2.0.0': {} @@ -4347,58 +4363,64 @@ snapshots: '@types/minimatch@5.1.2': {} - '@types/node@20.14.11': + '@types/mute-stream@0.0.4': + dependencies: + '@types/node': 22.5.0 + + '@types/node@22.5.0': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.8 '@types/normalize-package-data@2.4.4': {} - '@types/path-browserify@1.0.2': {} + '@types/path-browserify@1.0.3': {} '@types/semver@7.5.8': {} - '@types/vscode@1.91.0': {} + '@types/vscode@1.92.0': {} - '@vitest/expect@2.0.3': + '@types/wrap-ansi@3.0.0': {} + + '@vitest/expect@2.0.5': dependencies: - '@vitest/spy': 2.0.3 - '@vitest/utils': 2.0.3 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.0.3': + '@vitest/pretty-format@2.0.5': dependencies: tinyrainbow: 1.2.0 - '@vitest/runner@2.0.3': + '@vitest/runner@2.0.5': dependencies: - '@vitest/utils': 2.0.3 + '@vitest/utils': 2.0.5 pathe: 1.1.2 - '@vitest/snapshot@2.0.3': + '@vitest/snapshot@2.0.5': dependencies: - '@vitest/pretty-format': 2.0.3 - magic-string: 0.30.10 + '@vitest/pretty-format': 2.0.5 + magic-string: 0.30.11 pathe: 1.1.2 - '@vitest/spy@2.0.3': + '@vitest/spy@2.0.5': dependencies: tinyspy: 3.0.0 - '@vitest/utils@2.0.3': + '@vitest/utils@2.0.5': dependencies: - '@vitest/pretty-format': 2.0.3 + '@vitest/pretty-format': 2.0.5 estree-walker: 3.0.3 loupe: 3.1.1 tinyrainbow: 1.2.0 - '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.5.3)': + '@volar/kit@https://pkg.pr.new/volarjs/volar.js/@volar/kit@28cbdee(typescript@5.7.0-dev.20240825)': dependencies: '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee '@volar/typescript': https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee typesafe-path: 0.2.2 - typescript: 5.5.3 - vscode-languageserver-textdocument: 1.0.11 + typescript: 5.7.0-dev.20240825 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 '@volar/language-core@https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee': @@ -4414,14 +4436,14 @@ snapshots: request-light: 0.7.0 vscode-languageserver: 9.0.1 vscode-languageserver-protocol: 3.17.5 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 '@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee': dependencies: '@volar/language-core': https://pkg.pr.new/volarjs/volar.js/@volar/language-core@28cbdee vscode-languageserver-protocol: 3.17.5 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 '@volar/source-map@https://pkg.pr.new/volarjs/volar.js/@volar/source-map@28cbdee': {} @@ -4430,7 +4452,7 @@ snapshots: dependencies: '@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 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 '@volar/typescript@https://pkg.pr.new/volarjs/volar.js/@volar/typescript@28cbdee': @@ -4450,7 +4472,7 @@ snapshots: dependencies: emmet: 2.4.7 jsonc-parser: 2.3.1 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 vscode-uri: 2.1.2 @@ -4501,7 +4523,7 @@ snapshots: '@vscode/vsce-sign': 2.0.4 azure-devops-node-api: 12.5.0 chalk: 2.4.2 - cheerio: 1.0.0-rc.12 + cheerio: 1.0.0 cockatiel: 3.2.1 commander: 6.2.1 form-data: 4.0.0 @@ -4514,7 +4536,7 @@ snapshots: minimatch: 3.1.2 parse-semver: 1.1.1 read: 1.0.7 - semver: 7.6.2 + semver: 7.6.3 tmp: 0.2.3 typed-rest-client: 1.8.11 url-join: 4.0.1 @@ -4528,22 +4550,22 @@ snapshots: '@vue/compiler-core@3.3.13': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.4 '@vue/shared': 3.3.13 estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-core@3.4.31': + '@vue/compiler-core@3.4.38': dependencies: - '@babel/parser': 7.24.7 - '@vue/shared': 3.4.31 + '@babel/parser': 7.25.4 + '@vue/shared': 3.4.38 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 '@vue/compiler-core@3.5.0-alpha.3': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.4 '@vue/shared': 3.5.0-alpha.3 entities: 4.5.0 estree-walker: 2.0.2 @@ -4554,10 +4576,10 @@ snapshots: '@vue/compiler-core': 3.3.13 '@vue/shared': 3.3.13 - '@vue/compiler-dom@3.4.31': + '@vue/compiler-dom@3.4.38': dependencies: - '@vue/compiler-core': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/compiler-core': 3.4.38 + '@vue/shared': 3.4.38 '@vue/compiler-dom@3.5.0-alpha.3': dependencies: @@ -4566,47 +4588,47 @@ snapshots: '@vue/compiler-sfc@2.7.16': dependencies: - '@babel/parser': 7.24.7 - postcss: 8.4.39 + '@babel/parser': 7.25.4 + postcss: 8.4.41 source-map: 0.6.1 optionalDependencies: prettier: 2.8.8 '@vue/compiler-sfc@3.3.13': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.4 '@vue/compiler-core': 3.3.13 '@vue/compiler-dom': 3.3.13 '@vue/compiler-ssr': 3.3.13 '@vue/reactivity-transform': 3.3.13 '@vue/shared': 3.3.13 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.39 + magic-string: 0.30.11 + postcss: 8.4.41 source-map-js: 1.2.0 - '@vue/compiler-sfc@3.4.31': + '@vue/compiler-sfc@3.4.38': dependencies: - '@babel/parser': 7.24.7 - '@vue/compiler-core': 3.4.31 - '@vue/compiler-dom': 3.4.31 - '@vue/compiler-ssr': 3.4.31 - '@vue/shared': 3.4.31 + '@babel/parser': 7.25.4 + '@vue/compiler-core': 3.4.38 + '@vue/compiler-dom': 3.4.38 + '@vue/compiler-ssr': 3.4.38 + '@vue/shared': 3.4.38 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.39 + magic-string: 0.30.11 + postcss: 8.4.41 source-map-js: 1.2.0 '@vue/compiler-sfc@3.5.0-alpha.3': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.4 '@vue/compiler-core': 3.5.0-alpha.3 '@vue/compiler-dom': 3.5.0-alpha.3 '@vue/compiler-ssr': 3.5.0-alpha.3 '@vue/shared': 3.5.0-alpha.3 estree-walker: 2.0.2 - magic-string: 0.30.10 - postcss: 8.4.39 + magic-string: 0.30.11 + postcss: 8.4.41 source-map-js: 1.2.0 '@vue/compiler-ssr@3.3.13': @@ -4614,10 +4636,10 @@ snapshots: '@vue/compiler-dom': 3.3.13 '@vue/shared': 3.3.13 - '@vue/compiler-ssr@3.4.31': + '@vue/compiler-ssr@3.4.38': dependencies: - '@vue/compiler-dom': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/compiler-dom': 3.4.38 + '@vue/shared': 3.4.38 '@vue/compiler-ssr@3.5.0-alpha.3': dependencies: @@ -4631,19 +4653,19 @@ snapshots: '@vue/reactivity-transform@3.3.13': dependencies: - '@babel/parser': 7.24.7 + '@babel/parser': 7.25.4 '@vue/compiler-core': 3.3.13 '@vue/shared': 3.3.13 estree-walker: 2.0.2 - magic-string: 0.30.10 + magic-string: 0.30.11 '@vue/reactivity@3.3.13': dependencies: '@vue/shared': 3.3.13 - '@vue/reactivity@3.4.31': + '@vue/reactivity@3.4.38': dependencies: - '@vue/shared': 3.4.31 + '@vue/shared': 3.4.38 '@vue/reactivity@3.5.0-alpha.3': dependencies: @@ -4654,10 +4676,10 @@ snapshots: '@vue/reactivity': 3.3.13 '@vue/shared': 3.3.13 - '@vue/runtime-core@3.4.31': + '@vue/runtime-core@3.4.38': dependencies: - '@vue/reactivity': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/reactivity': 3.4.38 + '@vue/shared': 3.4.38 '@vue/runtime-core@3.5.0-alpha.3': dependencies: @@ -4670,11 +4692,11 @@ snapshots: '@vue/shared': 3.3.13 csstype: 3.1.3 - '@vue/runtime-dom@3.4.31': + '@vue/runtime-dom@3.4.38': dependencies: - '@vue/reactivity': 3.4.31 - '@vue/runtime-core': 3.4.31 - '@vue/shared': 3.4.31 + '@vue/reactivity': 3.4.38 + '@vue/runtime-core': 3.4.38 + '@vue/shared': 3.4.38 csstype: 3.1.3 '@vue/runtime-dom@3.5.0-alpha.3': @@ -4684,27 +4706,27 @@ snapshots: '@vue/shared': 3.5.0-alpha.3 csstype: 3.1.3 - '@vue/server-renderer@3.3.13(vue@3.4.31(typescript@5.5.3))': + '@vue/server-renderer@3.3.13(vue@3.4.38(typescript@5.5.4))': dependencies: '@vue/compiler-ssr': 3.3.13 '@vue/shared': 3.3.13 - vue: 3.4.31(typescript@5.5.3) + vue: 3.4.38(typescript@5.5.4) - '@vue/server-renderer@3.4.31(vue@3.4.31(typescript@5.5.3))': + '@vue/server-renderer@3.4.38(vue@3.4.38(typescript@5.5.4))': dependencies: - '@vue/compiler-ssr': 3.4.31 - '@vue/shared': 3.4.31 - vue: 3.4.31(typescript@5.5.3) + '@vue/compiler-ssr': 3.4.38 + '@vue/shared': 3.4.38 + vue: 3.4.38(typescript@5.5.4) - '@vue/server-renderer@3.5.0-alpha.3(vue@3.4.31(typescript@5.5.3))': + '@vue/server-renderer@3.5.0-alpha.3(vue@3.4.38(typescript@5.5.4))': dependencies: '@vue/compiler-ssr': 3.5.0-alpha.3 '@vue/shared': 3.5.0-alpha.3 - vue: 3.4.31(typescript@5.5.3) + vue: 3.4.38(typescript@5.5.4) '@vue/shared@3.3.13': {} - '@vue/shared@3.4.31': {} + '@vue/shared@3.4.38': {} '@vue/shared@3.5.0-alpha.3': {} @@ -4721,7 +4743,7 @@ snapshots: agent-base@7.1.1: dependencies: - debug: 4.3.5 + debug: 4.3.6 transitivePeerDependencies: - supports-color @@ -4772,7 +4794,8 @@ snapshots: balanced-match@1.0.2: {} - base64-js@1.5.1: {} + base64-js@1.5.1: + optional: true before-after-hook@3.0.2: {} @@ -4790,6 +4813,7 @@ snapshots: buffer: 5.7.1 inherits: 2.0.4 readable-stream: 3.6.2 + optional: true boolbase@1.0.0: {} @@ -4816,17 +4840,18 @@ snapshots: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + optional: true - byte-size@8.1.1: {} + byte-size@9.0.0: {} cac@6.7.14: {} - cacache@18.0.3: + cacache@18.0.4: dependencies: '@npmcli/fs': 3.1.1 fs-minipass: 3.0.3 glob: 10.4.5 - lru-cache: 10.3.0 + lru-cache: 10.4.3 minipass: 7.1.2 minipass-collect: 2.0.1 minipass-flush: 1.0.5 @@ -4871,8 +4896,6 @@ snapshots: dependencies: is-regex: 1.1.4 - chardet@0.7.0: {} - check-error@2.1.1: {} cheerio-select@2.1.0: @@ -4884,15 +4907,19 @@ snapshots: domhandler: 5.0.3 domutils: 3.1.0 - cheerio@1.0.0-rc.12: + cheerio@1.0.0: dependencies: cheerio-select: 2.1.0 dom-serializer: 2.0.0 domhandler: 5.0.3 domutils: 3.1.0 - htmlparser2: 8.0.2 + encoding-sniffer: 0.2.0 + htmlparser2: 9.1.0 parse5: 7.1.2 parse5-htmlparser2-tree-adapter: 7.0.0 + parse5-parser-stream: 7.1.2 + undici: 6.19.8 + whatwg-mimetype: 4.0.0 chokidar@3.6.0: dependencies: @@ -4917,10 +4944,6 @@ snapshots: clean-stack@2.2.0: {} - cli-cursor@3.1.0: - dependencies: - restore-cursor: 3.1.0 - cli-spinners@2.9.2: {} cli-width@4.1.0: {} @@ -5011,7 +5034,7 @@ snapshots: handlebars: 4.7.8 json-stringify-safe: 5.0.1 meow: 12.1.1 - semver: 7.6.2 + semver: 7.6.3 split2: 4.2.0 conventional-commits-filter@4.0.0: {} @@ -5032,14 +5055,14 @@ snapshots: git-semver-tags: 7.0.1 meow: 12.1.1 - cosmiconfig@9.0.0(typescript@5.5.3): + cosmiconfig@9.0.0(typescript@5.5.4): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 cross-spawn@7.0.3: dependencies: @@ -5067,7 +5090,7 @@ snapshots: de-indent@1.0.2: {} - debug@4.3.5: + debug@4.3.6: dependencies: ms: 2.1.2 @@ -5083,7 +5106,7 @@ snapshots: deep-extend@0.6.0: optional: true - deepmerge-ts@5.1.0: {} + deepmerge-ts@7.1.0: {} defaults@1.0.4: dependencies: @@ -5151,6 +5174,11 @@ snapshots: emoji-regex@9.2.2: {} + encoding-sniffer@0.2.0: + dependencies: + iconv-lite: 0.6.3 + whatwg-encoding: 3.1.1 + encoding@0.1.13: dependencies: iconv-lite: 0.6.3 @@ -5223,32 +5251,32 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 - esbuild@0.23.0: + esbuild@0.23.1: optionalDependencies: - '@esbuild/aix-ppc64': 0.23.0 - '@esbuild/android-arm': 0.23.0 - '@esbuild/android-arm64': 0.23.0 - '@esbuild/android-x64': 0.23.0 - '@esbuild/darwin-arm64': 0.23.0 - '@esbuild/darwin-x64': 0.23.0 - '@esbuild/freebsd-arm64': 0.23.0 - '@esbuild/freebsd-x64': 0.23.0 - '@esbuild/linux-arm': 0.23.0 - '@esbuild/linux-arm64': 0.23.0 - '@esbuild/linux-ia32': 0.23.0 - '@esbuild/linux-loong64': 0.23.0 - '@esbuild/linux-mips64el': 0.23.0 - '@esbuild/linux-ppc64': 0.23.0 - '@esbuild/linux-riscv64': 0.23.0 - '@esbuild/linux-s390x': 0.23.0 - '@esbuild/linux-x64': 0.23.0 - '@esbuild/netbsd-x64': 0.23.0 - '@esbuild/openbsd-arm64': 0.23.0 - '@esbuild/openbsd-x64': 0.23.0 - '@esbuild/sunos-x64': 0.23.0 - '@esbuild/win32-arm64': 0.23.0 - '@esbuild/win32-ia32': 0.23.0 - '@esbuild/win32-x64': 0.23.0 + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 escalade@3.1.2: {} @@ -5281,19 +5309,13 @@ snapshots: exponential-backoff@3.1.1: {} - external-editor@3.1.0: - dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 '@nodelib/fs.walk': 1.2.8 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.7 + micromatch: 4.0.8 fastq@1.17.1: dependencies: @@ -5322,7 +5344,7 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - foreground-child@3.2.1: + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 @@ -5395,14 +5417,14 @@ snapshots: git-semver-tags@7.0.1: dependencies: meow: 12.1.1 - semver: 7.6.2 + semver: 7.6.3 git-up@7.0.0: dependencies: is-ssh: 1.4.0 parse-url: 8.1.0 - git-url-parse@14.0.0: + git-url-parse@14.1.0: dependencies: git-up: 7.0.0 @@ -5417,19 +5439,10 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@10.4.2: - dependencies: - foreground-child: 3.2.1 - jackspeak: 3.4.0 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.0 - path-scurry: 1.11.1 - glob@10.4.5: dependencies: - foreground-child: 3.2.1 - jackspeak: 3.4.0 + foreground-child: 3.3.0 + jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 package-json-from-dist: 1.0.0 @@ -5437,7 +5450,7 @@ snapshots: glob@11.0.0: dependencies: - foreground-child: 3.2.1 + foreground-child: 3.3.0 jackspeak: 4.0.1 minimatch: 10.0.1 minipass: 7.1.2 @@ -5449,7 +5462,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -5457,7 +5470,7 @@ snapshots: dependencies: '@sindresorhus/merge-streams': 2.3.0 fast-glob: 3.3.2 - ignore: 5.3.1 + ignore: 5.3.2 path-type: 5.0.0 slash: 5.1.0 unicorn-magic: 0.1.0 @@ -5475,7 +5488,7 @@ snapshots: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.18.0 + uglify-js: 3.19.2 has-flag@3.0.0: {} @@ -5507,9 +5520,9 @@ snapshots: hosted-git-info@7.0.2: dependencies: - lru-cache: 10.3.0 + lru-cache: 10.4.3 - htmlparser2@8.0.2: + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 @@ -5521,42 +5534,38 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.1 - debug: 4.3.5 + debug: 4.3.6 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.5: dependencies: agent-base: 7.1.1 - debug: 4.3.5 + debug: 4.3.6 transitivePeerDependencies: - supports-color human-signals@5.0.0: {} - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 - optional: true - ieee754@1.2.1: {} + ieee754@1.2.1: + optional: true ignore-walk@6.0.5: dependencies: minimatch: 9.0.5 - ignore@5.3.1: {} + ignore@5.3.2: {} import-fresh@3.3.0: dependencies: parent-module: 1.0.1 resolve-from: 4.0.0 - import-local@3.1.0: + import-local@3.2.0: dependencies: pkg-dir: 4.2.0 resolve-cwd: 3.0.0 @@ -5567,27 +5576,12 @@ snapshots: index-to-position@0.1.2: {} - inherits@2.0.4: {} + inherits@2.0.4: + optional: true ini@1.3.8: {} - inquirer@9.2.23: - dependencies: - '@inquirer/figures': 1.0.3 - '@ljharb/through': 2.3.13 - ansi-escapes: 4.3.2 - chalk: 5.3.0 - cli-cursor: 3.1.0 - cli-width: 4.1.0 - external-editor: 3.1.0 - lodash: 4.17.21 - mute-stream: 1.0.0 - ora: 5.4.1 - run-async: 3.0.0 - rxjs: 7.8.1 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 + ini@4.1.3: {} ip-address@9.0.5: dependencies: @@ -5619,8 +5613,6 @@ snapshots: dependencies: is-extglob: 2.1.1 - is-interactive@1.0.0: {} - is-lambda@1.0.1: {} is-number@7.0.0: {} @@ -5650,10 +5642,6 @@ snapshots: dependencies: text-extensions: 2.4.0 - is-typedarray@1.0.0: {} - - is-unicode-supported@0.1.0: {} - is-wsl@2.2.0: dependencies: is-docker: 2.2.1 @@ -5664,7 +5652,7 @@ snapshots: isobject@3.0.1: {} - jackspeak@3.4.0: + jackspeak@3.4.3: dependencies: '@isaacs/cliui': 8.0.2 optionalDependencies: @@ -5716,8 +5704,8 @@ snapshots: lodash.isplainobject: 4.0.6 lodash.isstring: 4.0.1 lodash.once: 4.1.1 - ms: 2.1.2 - semver: 7.6.2 + ms: 2.1.3 + semver: 7.6.3 just-diff-apply@5.5.0: {} @@ -5757,7 +5745,7 @@ snapshots: libnpmaccess@8.0.6: dependencies: - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 npm-registry-fetch: 17.1.0 transitivePeerDependencies: - supports-color @@ -5766,10 +5754,10 @@ snapshots: dependencies: ci-info: 4.0.0 normalize-package-data: 6.0.2 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 npm-registry-fetch: 17.1.0 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 sigstore: 2.3.1 ssri: 10.0.6 transitivePeerDependencies: @@ -5807,18 +5795,11 @@ snapshots: lodash.once@4.1.1: {} - lodash@4.17.21: {} - - log-symbols@4.1.0: - dependencies: - chalk: 4.1.2 - is-unicode-supported: 0.1.0 - loupe@3.1.1: dependencies: get-func-name: 2.0.2 - lru-cache@10.3.0: {} + lru-cache@10.4.3: {} lru-cache@11.0.0: {} @@ -5826,16 +5807,16 @@ snapshots: dependencies: yallist: 4.0.0 - magic-string@0.30.10: + magic-string@0.30.11: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 make-dir@5.0.0: {} make-fetch-happen@13.0.1: dependencies: '@npmcli/agent': 2.2.2 - cacache: 18.0.3 + cacache: 18.0.4 http-cache-semantics: 4.1.1 is-lambda: 1.0.1 minipass: 7.1.2 @@ -5865,7 +5846,7 @@ snapshots: merge2@1.4.1: {} - micromatch@4.0.7: + micromatch@4.0.8: dependencies: braces: 3.0.3 picomatch: 2.3.1 @@ -5878,8 +5859,6 @@ snapshots: mime@1.6.0: {} - mimic-fn@2.1.0: {} - mimic-fn@4.0.0: {} mimic-response@3.1.0: @@ -5947,6 +5926,8 @@ snapshots: ms@2.1.2: {} + ms@2.1.3: {} + muggle-string@0.4.1: {} mute-stream@0.0.8: {} @@ -5966,9 +5947,9 @@ snapshots: dependencies: type-fest: 2.19.0 - node-abi@3.65.0: + node-abi@3.67.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 optional: true node-addon-api@4.3.0: @@ -5982,16 +5963,16 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp@10.1.0: + node-gyp@10.2.0: dependencies: env-paths: 2.2.1 exponential-backoff: 3.1.1 - glob: 10.4.2 + glob: 10.4.5 graceful-fs: 4.2.11 make-fetch-happen: 13.0.1 nopt: 7.2.1 - proc-log: 3.0.0 - semver: 7.6.2 + proc-log: 4.2.0 + semver: 7.6.3 tar: 6.2.1 which: 4.0.0 transitivePeerDependencies: @@ -6004,7 +5985,7 @@ snapshots: normalize-package-data@6.0.2: dependencies: hosted-git-info: 7.0.2 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-license: 3.0.4 normalize-path@3.0.0: {} @@ -6015,27 +5996,27 @@ snapshots: npm-install-checks@6.3.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 npm-normalize-package-bin@3.0.1: {} - npm-package-arg@11.0.2: + npm-package-arg@11.0.3: dependencies: hosted-git-info: 7.0.2 proc-log: 4.2.0 - semver: 7.6.2 + semver: 7.6.3 validate-npm-package-name: 5.0.1 npm-packlist@8.0.2: dependencies: ignore-walk: 6.0.5 - npm-pick-manifest@9.0.1: + npm-pick-manifest@9.1.0: dependencies: npm-install-checks: 6.3.0 npm-normalize-package-bin: 3.0.1 - npm-package-arg: 11.0.2 - semver: 7.6.2 + npm-package-arg: 11.0.3 + semver: 7.6.3 npm-registry-fetch@17.1.0: dependencies: @@ -6045,7 +6026,7 @@ snapshots: minipass: 7.1.2 minipass-fetch: 3.0.5 minizlib: 2.1.2 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 proc-log: 4.2.0 transitivePeerDependencies: - supports-color @@ -6067,10 +6048,6 @@ snapshots: wrappy: 1.0.2 optional: true - onetime@5.1.2: - dependencies: - mimic-fn: 2.1.0 - onetime@6.0.0: dependencies: mimic-fn: 4.0.0 @@ -6081,20 +6058,6 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - ora@5.4.1: - dependencies: - bl: 4.1.0 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-spinners: 2.9.2 - is-interactive: 1.0.0 - is-unicode-supported: 0.1.0 - log-symbols: 4.1.0 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - - os-tmpdir@1.0.2: {} - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -6138,17 +6101,17 @@ snapshots: pacote@18.0.6: dependencies: - '@npmcli/git': 5.0.7 + '@npmcli/git': 5.0.8 '@npmcli/installed-package-contents': 2.1.0 '@npmcli/package-json': 5.2.0 '@npmcli/promise-spawn': 7.0.2 '@npmcli/run-script': 8.1.0 - cacache: 18.0.3 + cacache: 18.0.4 fs-minipass: 3.0.3 minipass: 7.1.2 - npm-package-arg: 11.0.2 + npm-package-arg: 11.0.3 npm-packlist: 8.0.2 - npm-pick-manifest: 9.0.1 + npm-pick-manifest: 9.1.0 npm-registry-fetch: 17.1.0 proc-log: 4.2.0 promise-retry: 2.0.1 @@ -6188,7 +6151,7 @@ snapshots: dependencies: '@babel/code-frame': 7.24.7 index-to-position: 0.1.2 - type-fest: 4.21.0 + type-fest: 4.25.0 parse-path@7.0.0: dependencies: @@ -6207,6 +6170,10 @@ snapshots: domhandler: 5.0.3 parse5: 7.1.2 + parse5-parser-stream@7.1.2: + dependencies: + parse5: 7.1.2 + parse5@7.1.2: dependencies: entities: 4.5.0 @@ -6223,7 +6190,7 @@ snapshots: path-scurry@1.11.1: dependencies: - lru-cache: 10.3.0 + lru-cache: 10.4.3 minipass: 7.1.2 path-scurry@2.0.0: @@ -6251,12 +6218,12 @@ snapshots: dependencies: find-up: 4.1.0 - postcss-selector-parser@6.1.1: + postcss-selector-parser@6.1.2: dependencies: cssesc: 3.0.0 util-deprecate: 1.0.2 - postcss@8.4.39: + postcss@8.4.41: dependencies: nanoid: 3.3.7 picocolors: 1.0.1 @@ -6270,7 +6237,7 @@ snapshots: minimist: 1.2.8 mkdirp-classic: 0.5.3 napi-build-utils: 1.0.2 - node-abi: 3.65.0 + node-abi: 3.67.0 pump: 3.0.0 rc: 1.2.8 simple-get: 4.0.1 @@ -6281,8 +6248,6 @@ snapshots: prettier@2.8.8: optional: true - proc-log@3.0.0: {} - proc-log@4.2.0: {} proggy@2.0.0: {} @@ -6321,7 +6286,7 @@ snapshots: once: 1.4.0 optional: true - qs@6.12.2: + qs@6.13.0: dependencies: side-channel: 1.0.6 @@ -6346,21 +6311,21 @@ snapshots: dependencies: find-up: 6.3.0 read-pkg: 8.1.0 - type-fest: 4.21.0 + type-fest: 4.25.0 read-pkg@8.1.0: dependencies: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.2 parse-json: 7.1.1 - type-fest: 4.21.0 + type-fest: 4.25.0 read-pkg@9.0.1: dependencies: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.2 parse-json: 8.1.0 - type-fest: 4.21.0 + type-fest: 4.25.0 unicorn-magic: 0.1.0 read@1.0.7: @@ -6372,6 +6337,7 @@ snapshots: inherits: 2.0.4 string_decoder: 1.3.0 util-deprecate: 1.0.2 + optional: true readdirp@3.6.0: dependencies: @@ -6389,47 +6355,36 @@ snapshots: resolve-from@5.0.0: {} - restore-cursor@3.1.0: - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - retry@0.12.0: {} reusify@1.0.4: {} - rollup@4.18.0: + rollup@4.21.0: dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.18.0 - '@rollup/rollup-android-arm64': 4.18.0 - '@rollup/rollup-darwin-arm64': 4.18.0 - '@rollup/rollup-darwin-x64': 4.18.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.18.0 - '@rollup/rollup-linux-arm-musleabihf': 4.18.0 - '@rollup/rollup-linux-arm64-gnu': 4.18.0 - '@rollup/rollup-linux-arm64-musl': 4.18.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.18.0 - '@rollup/rollup-linux-riscv64-gnu': 4.18.0 - '@rollup/rollup-linux-s390x-gnu': 4.18.0 - '@rollup/rollup-linux-x64-gnu': 4.18.0 - '@rollup/rollup-linux-x64-musl': 4.18.0 - '@rollup/rollup-win32-arm64-msvc': 4.18.0 - '@rollup/rollup-win32-ia32-msvc': 4.18.0 - '@rollup/rollup-win32-x64-msvc': 4.18.0 + '@rollup/rollup-android-arm-eabi': 4.21.0 + '@rollup/rollup-android-arm64': 4.21.0 + '@rollup/rollup-darwin-arm64': 4.21.0 + '@rollup/rollup-darwin-x64': 4.21.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.21.0 + '@rollup/rollup-linux-arm-musleabihf': 4.21.0 + '@rollup/rollup-linux-arm64-gnu': 4.21.0 + '@rollup/rollup-linux-arm64-musl': 4.21.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.21.0 + '@rollup/rollup-linux-riscv64-gnu': 4.21.0 + '@rollup/rollup-linux-s390x-gnu': 4.21.0 + '@rollup/rollup-linux-x64-gnu': 4.21.0 + '@rollup/rollup-linux-x64-musl': 4.21.0 + '@rollup/rollup-win32-arm64-msvc': 4.21.0 + '@rollup/rollup-win32-ia32-msvc': 4.21.0 + '@rollup/rollup-win32-x64-msvc': 4.21.0 fsevents: 2.3.3 - run-async@3.0.0: {} - run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 - rxjs@7.8.1: - dependencies: - tslib: 2.6.3 - safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} @@ -6438,7 +6393,7 @@ snapshots: semver@5.7.2: {} - semver@7.6.2: {} + semver@7.6.3: {} set-blocking@2.0.0: {} @@ -6470,8 +6425,6 @@ snapshots: siginfo@2.0.0: {} - signal-exit@3.0.7: {} - signal-exit@4.1.0: {} sigstore@2.3.1: @@ -6506,7 +6459,7 @@ snapshots: socks-proxy-agent@8.0.4: dependencies: agent-base: 7.1.1 - debug: 4.3.5 + debug: 4.3.6 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -6532,16 +6485,16 @@ snapshots: spdx-correct@3.2.0: dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.18 + spdx-license-ids: 3.0.20 spdx-exceptions@2.5.0: {} spdx-expression-parse@3.0.1: dependencies: spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.18 + spdx-license-ids: 3.0.20 - spdx-license-ids@3.0.18: {} + spdx-license-ids@3.0.20: {} split2@4.2.0: {} @@ -6580,6 +6533,7 @@ snapshots: string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 + optional: true strip-ansi@6.0.1: dependencies: @@ -6640,18 +6594,14 @@ snapshots: through@2.3.8: {} - tinybench@2.8.0: {} + tinybench@2.9.0: {} - tinypool@1.0.0: {} + tinypool@1.0.1: {} tinyrainbow@1.2.0: {} tinyspy@3.0.0: {} - tmp@0.0.33: - dependencies: - os-tmpdir: 1.0.2 - tmp@0.2.3: {} to-fast-properties@2.0.0: {} @@ -6664,12 +6614,12 @@ snapshots: treeverse@3.0.0: {} - tslib@2.6.3: {} + tslib@2.7.0: {} tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.3.5 + debug: 4.3.6 make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -6687,34 +6637,34 @@ snapshots: type-fest@3.13.1: {} - type-fest@4.21.0: {} + type-fest@4.25.0: {} typed-rest-client@1.8.11: dependencies: - qs: 6.12.2 + qs: 6.13.0 tunnel: 0.0.6 - underscore: 1.13.6 - - typedarray-to-buffer@3.1.5: - dependencies: - is-typedarray: 1.0.0 + underscore: 1.13.7 typesafe-path@0.2.2: {} typescript-auto-import-cache@0.3.3: dependencies: - semver: 7.6.2 + semver: 7.6.3 - typescript@5.5.3: {} + typescript@5.5.4: {} + + typescript@5.7.0-dev.20240825: {} uc.micro@1.0.6: {} - uglify-js@3.18.0: + uglify-js@3.19.2: optional: true - underscore@1.13.6: {} + underscore@1.13.7: {} + + undici-types@6.19.8: {} - undici-types@5.26.5: {} + undici@6.19.8: {} unicorn-magic@0.1.0: {} @@ -6745,59 +6695,61 @@ snapshots: validate-npm-package-name@5.0.1: {} - vite-node@2.0.3(@types/node@20.14.11): + vite-node@2.0.5(@types/node@22.5.0): dependencies: cac: 6.7.14 - debug: 4.3.5 + debug: 4.3.6 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.3.4(@types/node@20.14.11) + vite: 5.4.2(@types/node@22.5.0) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite@5.3.4(@types/node@20.14.11): + vite@5.4.2(@types/node@22.5.0): dependencies: esbuild: 0.21.5 - postcss: 8.4.39 - rollup: 4.18.0 + postcss: 8.4.41 + rollup: 4.21.0 optionalDependencies: - '@types/node': 20.14.11 + '@types/node': 22.5.0 fsevents: 2.3.3 - vitest@2.0.3(@types/node@20.14.11): + vitest@2.0.5(@types/node@22.5.0): dependencies: '@ampproject/remapping': 2.3.0 - '@vitest/expect': 2.0.3 - '@vitest/pretty-format': 2.0.3 - '@vitest/runner': 2.0.3 - '@vitest/snapshot': 2.0.3 - '@vitest/spy': 2.0.3 - '@vitest/utils': 2.0.3 + '@vitest/expect': 2.0.5 + '@vitest/pretty-format': 2.0.5 + '@vitest/runner': 2.0.5 + '@vitest/snapshot': 2.0.5 + '@vitest/spy': 2.0.5 + '@vitest/utils': 2.0.5 chai: 5.1.1 - debug: 4.3.5 + debug: 4.3.6 execa: 8.0.1 - magic-string: 0.30.10 + magic-string: 0.30.11 pathe: 1.1.2 std-env: 3.7.0 - tinybench: 2.8.0 - tinypool: 1.0.0 + tinybench: 2.9.0 + tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.3.4(@types/node@20.14.11) - vite-node: 2.0.3(@types/node@20.14.11) - why-is-node-running: 2.2.2 + vite: 5.4.2(@types/node@22.5.0) + vite-node: 2.0.5(@types/node@22.5.0) + why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.14.11 + '@types/node': 22.5.0 transitivePeerDependencies: - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color @@ -6806,7 +6758,7 @@ snapshots: volar-service-css@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-css-languageservice: 6.3.0 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 optionalDependencies: '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee @@ -6823,7 +6775,7 @@ snapshots: volar-service-html@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: vscode-html-languageservice: 5.3.0 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-uri: 3.0.8 optionalDependencies: '@volar/language-service': https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee @@ -6849,7 +6801,7 @@ snapshots: pug-parser: 6.0.0 volar-service-html: 0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee) vscode-html-languageservice: 5.3.0 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 volar-service-typescript-twoslash-queries@0.0.61(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: @@ -6860,9 +6812,9 @@ snapshots: volar-service-typescript@https://pkg.pr.new/volarjs/services/volar-service-typescript@177b9ed(@volar/language-service@https://pkg.pr.new/volarjs/volar.js/@volar/language-service@28cbdee): dependencies: path-browserify: 1.0.1 - semver: 7.6.2 + semver: 7.6.3 typescript-auto-import-cache: 0.3.3 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-nls: 5.2.0 vscode-uri: 3.0.8 optionalDependencies: @@ -6871,14 +6823,14 @@ snapshots: vscode-css-languageservice@6.3.0: dependencies: '@vscode/l10n': 0.0.18 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 vscode-uri: 3.0.8 vscode-html-languageservice@5.3.0: dependencies: '@vscode/l10n': 0.0.18 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 vscode-uri: 3.0.8 @@ -6886,7 +6838,7 @@ snapshots: dependencies: '@vscode/l10n': 0.0.18 jsonc-parser: 3.3.1 - vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-textdocument: 1.0.12 vscode-languageserver-types: 3.17.5 vscode-uri: 3.0.8 @@ -6895,7 +6847,7 @@ snapshots: vscode-languageclient@9.0.1: dependencies: minimatch: 5.1.6 - semver: 7.6.2 + semver: 7.6.3 vscode-languageserver-protocol: 3.17.5 vscode-languageserver-protocol@3.17.5: @@ -6903,7 +6855,7 @@ snapshots: vscode-jsonrpc: 8.2.0 vscode-languageserver-types: 3.17.5 - vscode-languageserver-textdocument@1.0.11: {} + vscode-languageserver-textdocument@1.0.12: {} vscode-languageserver-types@3.17.5: {} @@ -6931,35 +6883,35 @@ snapshots: '@vue/compiler-sfc': 2.7.16 csstype: 3.1.3 - vue@3.3.13(typescript@5.5.3): + vue@3.3.13(typescript@5.5.4): dependencies: '@vue/compiler-dom': 3.3.13 '@vue/compiler-sfc': 3.3.13 '@vue/runtime-dom': 3.3.13 - '@vue/server-renderer': 3.3.13(vue@3.4.31(typescript@5.5.3)) + '@vue/server-renderer': 3.3.13(vue@3.4.38(typescript@5.5.4)) '@vue/shared': 3.3.13 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 - vue@3.4.31(typescript@5.5.3): + vue@3.4.38(typescript@5.5.4): dependencies: - '@vue/compiler-dom': 3.4.31 - '@vue/compiler-sfc': 3.4.31 - '@vue/runtime-dom': 3.4.31 - '@vue/server-renderer': 3.4.31(vue@3.4.31(typescript@5.5.3)) - '@vue/shared': 3.4.31 + '@vue/compiler-dom': 3.4.38 + '@vue/compiler-sfc': 3.4.38 + '@vue/runtime-dom': 3.4.38 + '@vue/server-renderer': 3.4.38(vue@3.4.38(typescript@5.5.4)) + '@vue/shared': 3.4.38 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 - vue@3.5.0-alpha.3(typescript@5.5.3): + vue@3.5.0-alpha.3(typescript@5.5.4): dependencies: '@vue/compiler-dom': 3.5.0-alpha.3 '@vue/compiler-sfc': 3.5.0-alpha.3 '@vue/runtime-dom': 3.5.0-alpha.3 - '@vue/server-renderer': 3.5.0-alpha.3(vue@3.4.31(typescript@5.5.3)) + '@vue/server-renderer': 3.5.0-alpha.3(vue@3.4.38(typescript@5.5.4)) '@vue/shared': 3.5.0-alpha.3 optionalDependencies: - typescript: 5.5.3 + typescript: 5.5.4 walk-up-path@3.0.1: {} @@ -6969,6 +6921,12 @@ snapshots: web-streams-polyfill@3.3.3: {} + whatwg-encoding@3.1.1: + dependencies: + iconv-lite: 0.6.3 + + whatwg-mimetype@4.0.0: {} + which@2.0.2: dependencies: isexe: 2.0.0 @@ -6977,7 +6935,7 @@ snapshots: dependencies: isexe: 3.1.1 - why-is-node-running@2.2.2: + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 @@ -7009,32 +6967,25 @@ snapshots: wrappy@1.0.2: optional: true - write-file-atomic@3.0.3: - dependencies: - imurmurhash: 0.1.4 - is-typedarray: 1.0.0 - signal-exit: 3.0.7 - typedarray-to-buffer: 3.1.5 - write-file-atomic@5.0.1: dependencies: imurmurhash: 0.1.4 signal-exit: 4.1.0 - write-json-file@5.0.0: + write-json-file@6.0.0: dependencies: detect-indent: 7.0.1 is-plain-obj: 4.1.0 sort-keys: 5.0.0 - write-file-atomic: 3.0.3 + write-file-atomic: 5.0.1 - write-package@7.0.1: + write-package@7.1.0: dependencies: - deepmerge-ts: 5.1.0 + deepmerge-ts: 7.1.0 read-pkg: 9.0.1 sort-keys: 5.0.0 - type-fest: 4.21.0 - write-json-file: 5.0.0 + type-fest: 4.25.0 + write-json-file: 6.0.0 xml2js@0.5.0: dependencies: @@ -7069,3 +7020,5 @@ snapshots: buffer-crc32: 0.2.13 yocto-queue@1.1.1: {} + + yoctocolors-cjs@2.1.2: {} diff --git a/test-workspace/package.json b/test-workspace/package.json index 6837f18018..2078ebacdb 100644 --- a/test-workspace/package.json +++ b/test-workspace/package.json @@ -2,6 +2,8 @@ "private": true, "version": "2.0.28", "devDependencies": { + "typescript-stable": "npm:typescript@latest", + "typescript-next": "npm:typescript@next", "vue": "^3.4.0", "vue-component-type-helpers": "2.0.28", "vue2": "npm:vue@2.7.16", From de50847cb025af87092147365b837ee0563e44fa Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 26 Aug 2024 01:08:58 +0800 Subject: [PATCH 16/37] test(tsc): add tests for #3779, #3820 (#3838) --- .../language-server/tests/renaming.spec.ts | 2 +- .../tsc/passedFixtures/vue3.5/#3779/main.vue | 10 ++++++++++ .../tsc/passedFixtures/vue3.5/#3779/named.vue | 10 ++++++++++ .../tsc/passedFixtures/vue3.5/#3820/main.vue | 19 +++++++++++++++++++ .../tsc/passedFixtures/vue3.5/tsconfig.json | 1 + 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue diff --git a/packages/language-server/tests/renaming.spec.ts b/packages/language-server/tests/renaming.spec.ts index c4a0356278..829b59f4e3 100644 --- a/packages/language-server/tests/renaming.spec.ts +++ b/packages/language-server/tests/renaming.spec.ts @@ -776,7 +776,7 @@ describe('Renaming', async () => { const position = document.positionAt(offset); const edit = await server.sendRenameRequest(document.uri, position, newName); - expect(edit).toBeDefined(); + expect(edit?.changes).toBeDefined(); for (const [uri, edits] of Object.entries(edit!.changes!)) { delete edit!.changes![uri]; diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue new file mode 100644 index 0000000000..5fcef0b240 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3779/main.vue @@ -0,0 +1,10 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue new file mode 100644 index 0000000000..5fcef0b240 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3779/named.vue @@ -0,0 +1,10 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue new file mode 100644 index 0000000000..4c9321df33 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/#3820/main.vue @@ -0,0 +1,19 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json index 574d756717..1e3a821a3c 100644 --- a/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue3.5/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { + "lib": "vue3.5", "target": 3.5, }, "include": [ From 74c763e84a01360b92ab026c3479650e315cccb0 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Mon, 26 Aug 2024 01:21:42 +0800 Subject: [PATCH 17/37] test(tsc): only test TS-next in CI --- packages/tsc/tests/typecheck.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tsc/tests/typecheck.spec.ts b/packages/tsc/tests/typecheck.spec.ts index bd8d302817..a7cc585449 100644 --- a/packages/tsc/tests/typecheck.spec.ts +++ b/packages/tsc/tests/typecheck.spec.ts @@ -16,7 +16,7 @@ describe(`vue-tsc`, () => { `); }); - test(`TypeScript - next`, () => { + test.skipIf(!process.env.GITHUB_ACTIONS)(`TypeScript - Next`, () => { expect( getTscOutput('next') ).toMatchInlineSnapshot(` From 21e3b71c61651dc5d9a80b8071b477bc76f7ac8f Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Mon, 26 Aug 2024 01:57:40 +0800 Subject: [PATCH 18/37] chore(component-type-helpers): fix typo --- packages/component-type-helpers/index.ts | 20 ++++++++++---------- packages/component-type-helpers/vue2.ts | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/component-type-helpers/index.ts b/packages/component-type-helpers/index.ts index 3ea6a621be..45ba9c089e 100644 --- a/packages/component-type-helpers/index.ts +++ b/packages/component-type-helpers/index.ts @@ -1,50 +1,50 @@ export type ComponentType = - T extends new (...angs: any) => {} ? 1 : + T extends new (...args: any) => {} ? 1 : T extends (...args: any) => any ? 2 : 0; export type ComponentProps = - T extends new (...angs: any) => { $props: infer P; } ? NonNullable

: + T extends new (...args: any) => { $props: infer P; } ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; export type ComponentSlots = - T extends new (...angs: any) => { $slots: infer S; } ? NonNullable : + T extends new (...args: any) => { $slots: infer S; } ? NonNullable : T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any; }, ...args: any) => any ? NonNullable : {}; export type ComponentEmit = - T extends new (...angs: any) => { $emit: infer E; } ? NonNullable : + T extends new (...args: any) => { $emit: infer E; } ? NonNullable : {}; export type ComponentExposed = - T extends new (...angs: any) => infer E ? E : + T extends new (...args: any) => infer E ? E : T extends (props: any, ctx: any, expose: (exposed: infer E) => any, ...args: any) => any ? NonNullable : {}; export const code = ` export type ComponentType = - T extends new (...angs: any) => {} ? 1 : + T extends new (...args: any) => {} ? 1 : T extends (...args: any) => any ? 2 : 0; export type ComponentProps = - T extends new (...angs: any) => { $props: infer P; } ? NonNullable

: + T extends new (...args: any) => { $props: infer P; } ? NonNullable

: T extends (props: infer P, ...args: any) => any ? P : {}; export type ComponentSlots = - T extends new (...angs: any) => { $slots: infer S; } ? NonNullable : + T extends new (...args: any) => { $slots: infer S; } ? NonNullable : T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any; }, ...args: any) => any ? NonNullable : {}; export type ComponentEmit = - T extends new (...angs: any) => { $emit: infer E; } ? NonNullable : + T extends new (...args: any) => { $emit: infer E; } ? NonNullable : T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E; }, ...args: any) => any ? NonNullable : {}; export type ComponentExposed = - T extends new (...angs: any) => infer E ? E : + T extends new (...args: any) => infer E ? E : T extends (props: any, ctx: { expose(exposed: infer E): any; }, ...args: any) => any ? NonNullable : {}; `.trim(); diff --git a/packages/component-type-helpers/vue2.ts b/packages/component-type-helpers/vue2.ts index 2442b471e7..4939bdca2f 100644 --- a/packages/component-type-helpers/vue2.ts +++ b/packages/component-type-helpers/vue2.ts @@ -6,7 +6,7 @@ export { } from './index'; export type ComponentSlots = - T extends new (...angs: any) => { $scopedSlots: infer S; } ? NonNullable : + T extends new (...args: any) => { $scopedSlots: infer S; } ? NonNullable : T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any; }, ...args: any) => any ? NonNullable : {}; From 9da831f875f9286271873187838fe3ff18c9e318 Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 26 Aug 2024 04:38:15 +0800 Subject: [PATCH 19/37] feat(language-core): typed fallthrough attributes (#4103) Co-authored-by: A5rocks Co-authored-by: Johnson Chu --- .../lib/codegen/script/component.ts | 30 +++++++-- .../lib/codegen/script/context.ts | 9 +++ .../lib/codegen/script/internalComponent.ts | 2 +- .../lib/codegen/script/scriptSetup.ts | 4 +- .../lib/codegen/script/template.ts | 5 +- .../lib/codegen/template/context.ts | 2 + .../lib/codegen/template/element.ts | 18 +++++- .../lib/codegen/template/index.ts | 11 ++++ .../lib/codegen/template/templateChild.ts | 5 ++ .../language-core/lib/parsers/scriptRanges.ts | 6 ++ .../lib/parsers/scriptSetupRanges.ts | 12 +++- packages/language-core/lib/plugins/vue-tsx.ts | 5 ++ .../tsc/tests/__snapshots__/dts.spec.ts.snap | 62 +++++++++++++------ .../vue2_strictTemplate/tsconfig.json | 1 + .../vue3_strictTemplate/#4699/HelloWorld.vue | 42 +++++++++++++ .../vue3_strictTemplate/#4699/main.vue | 9 +++ .../inheritAttrs/basic.vue | 7 +++ .../inheritAttrs/child.vue | 9 +++ .../define-options-inherit-attrs-false.vue | 11 ++++ .../inherit-attrs-false-v-bind.vue | 15 +++++ .../inheritAttrs/inherit-attrs-false.vue | 15 +++++ .../vue3_strictTemplate/inheritAttrs/main.vue | 16 +++++ .../vue3_strictTemplate/tsconfig.json | 2 +- 23 files changed, 264 insertions(+), 34 deletions(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/HelloWorld.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/main.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/basic.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/child.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/define-options-inherit-attrs-false.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false-v-bind.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/main.vue diff --git a/packages/language-core/lib/codegen/script/component.ts b/packages/language-core/lib/codegen/script/component.ts index db9305102c..74722a7156 100644 --- a/packages/language-core/lib/codegen/script/component.ts +++ b/packages/language-core/lib/codegen/script/component.ts @@ -31,7 +31,7 @@ export function* generateComponent( yield `}${endOfLine}`; yield `},${newLine}`; if (!ctx.bypassDefineComponent) { - yield* generateScriptSetupOptions(options, ctx, scriptSetup, scriptSetupRanges); + yield* generateScriptSetupOptions(options, ctx, scriptSetup, scriptSetupRanges, true); } if (options.sfc.script && options.scriptRanges) { yield* generateScriptOptions(options.sfc.script, options.scriptRanges); @@ -65,9 +65,10 @@ export function* generateScriptSetupOptions( options: ScriptCodegenOptions, ctx: ScriptCodegenContext, scriptSetup: NonNullable, - scriptSetupRanges: ScriptSetupRanges + scriptSetupRanges: ScriptSetupRanges, + inheritAttrs: boolean ): Generator { - yield* generatePropsOption(options, ctx, scriptSetup, scriptSetupRanges); + yield* generatePropsOption(options, ctx, scriptSetup, scriptSetupRanges, inheritAttrs); yield* generateEmitsOption(options, scriptSetup, scriptSetupRanges); } @@ -75,14 +76,31 @@ export function* generatePropsOption( options: ScriptCodegenOptions, ctx: ScriptCodegenContext, scriptSetup: NonNullable, - scriptSetupRanges: ScriptSetupRanges + scriptSetupRanges: ScriptSetupRanges, + inheritAttrs: boolean ) { - if (options.vueCompilerOptions.target >= 3.5 && ctx.generatedPropsType) { - yield `__typeProps: {} as __VLS_PublicProps,${newLine}`; + + if (options.vueCompilerOptions.target >= 3.5) { + const types = []; + if (inheritAttrs && options.templateCodegen?.inheritedAttrVars.size) { + types.push('typeof __VLS_template>[1]'); + } + if (ctx.generatedPropsType) { + types.push('{} as __VLS_PublicProps'); + } + if (types.length) { + yield `__typeProps: ${types.join(' & ')},${newLine}`; + } } if (options.vueCompilerOptions.target < 3.5 || !ctx.generatedPropsType || scriptSetupRanges.props.withDefaults) { const codegens: (() => Generator)[] = []; + if (inheritAttrs && options.templateCodegen?.inheritedAttrVars.size) { + codegens.push(function* () { + yield `{} as ${ctx.helperTypes.TypePropsToOption.name}<__VLS_PickNotAny<${ctx.helperTypes.OmitIndexSignature.name}[1]>, {}>>`; + }); + } + if (ctx.generatedPropsType) { codegens.push(function* () { yield `{} as `; diff --git a/packages/language-core/lib/codegen/script/context.ts b/packages/language-core/lib/codegen/script/context.ts index 968ba61e33..8bb0ad2176 100644 --- a/packages/language-core/lib/codegen/script/context.ts +++ b/packages/language-core/lib/codegen/script/context.ts @@ -102,6 +102,15 @@ export function createScriptCodegenContext(options: ScriptCodegenOptions) { };`; }, } satisfies HelperType as HelperType, + OmitIndexSignature: { + get name() { + this.used = true; + return `__VLS_OmitIndexSignature`; + }, + get code() { + return `type __VLS_OmitIndexSignature = { [K in keyof T as {} extends Record ? never : K]: T[K]; };`; + } + } satisfies HelperType as HelperType, }; const inlayHints: InlayHintInfo[] = []; diff --git a/packages/language-core/lib/codegen/script/internalComponent.ts b/packages/language-core/lib/codegen/script/internalComponent.ts index 207cd8daa9..458adaf8b8 100644 --- a/packages/language-core/lib/codegen/script/internalComponent.ts +++ b/packages/language-core/lib/codegen/script/internalComponent.ts @@ -49,7 +49,7 @@ export function* generateInternalComponent( yield `}${endOfLine}`; // return { yield `},${newLine}`; // setup() { if (options.sfc.scriptSetup && options.scriptSetupRanges && !ctx.bypassDefineComponent) { - yield* generateScriptSetupOptions(options, ctx, options.sfc.scriptSetup, options.scriptSetupRanges); + yield* generateScriptSetupOptions(options, ctx, options.sfc.scriptSetup, options.scriptSetupRanges, false); } if (options.sfc.script && options.scriptRanges) { yield* generateScriptOptions(options.sfc.script, options.scriptRanges); diff --git a/packages/language-core/lib/codegen/script/scriptSetup.ts b/packages/language-core/lib/codegen/script/scriptSetup.ts index 36cdb4aa15..131d6a497e 100644 --- a/packages/language-core/lib/codegen/script/scriptSetup.ts +++ b/packages/language-core/lib/codegen/script/scriptSetup.ts @@ -67,7 +67,7 @@ export function* generateScriptSetup( + ` props: ${ctx.helperTypes.Prettify.name} & __VLS_BuiltInPublicProps,${newLine}` + ` expose(exposed: import('${options.vueCompilerOptions.lib}').ShallowUnwrapRef<${scriptSetupRanges.expose.define ? 'typeof __VLS_exposed' : '{}'}>): void,${newLine}` + ` attrs: any,${newLine}` - + ` slots: ReturnType,${newLine}` + + ` slots: ReturnType[0],${newLine}` + ` emit: ${emitTypes.join(' & ')},${newLine}` + ` }${endOfLine}`; yield ` })(),${newLine}`; // __VLS_setup = (async () => { @@ -250,7 +250,7 @@ function* generateSetupFunction( yield* generateComponent(options, ctx, scriptSetup, scriptSetupRanges); yield endOfLine; yield `${syntax} `; - yield `{} as ${ctx.helperTypes.WithTemplateSlots.name}>${endOfLine}`; + yield `{} as ${ctx.helperTypes.WithTemplateSlots.name}[0]>${endOfLine}`; } else { yield `${syntax} `; diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index 8d0dbc85a3..f273a6ddac 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -35,7 +35,7 @@ export function* generateTemplate( const templateUsageVars = [...getTemplateUsageVars(options, ctx)]; yield `// @ts-ignore${newLine}`; yield `[${templateUsageVars.join(', ')}]${newLine}`; - yield `return {}${endOfLine}`; + yield `return [{}, {}] as const${endOfLine}`; yield `}${newLine}`; } } @@ -154,10 +154,11 @@ function* generateTemplateContext( yield `// no template${newLine}`; if (!options.scriptSetupRanges?.slots.define) { yield `const __VLS_slots = {}${endOfLine}`; + yield `const __VLS_inheritedAttrs = {}${endOfLine}`; } } - yield `return ${options.scriptSetupRanges?.slots.name ?? '__VLS_slots'}${endOfLine}`; + yield `return [${options.scriptSetupRanges?.slots.name ?? '__VLS_slots'}, __VLS_inheritedAttrs] as const${endOfLine}`; } function* generateCssClassProperty( diff --git a/packages/language-core/lib/codegen/template/context.ts b/packages/language-core/lib/codegen/template/context.ts index 54b3c5ef03..10d1a7addd 100644 --- a/packages/language-core/lib/codegen/template/context.ts +++ b/packages/language-core/lib/codegen/template/context.ts @@ -125,6 +125,8 @@ export function createTemplateCodegenContext(scriptSetupBindingNames: TemplateCo emptyClassOffsets, inlayHints, hasSlot: false, + inheritedAttrVars: new Set(), + singleRootNode: undefined as CompilerDOM.ElementNode | undefined, accessExternalVariable(name: string, offset?: number) { let arr = accessExternalVariables.get(name); if (!arr) { diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index 73fa83d5f6..91af8b4bdb 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -224,7 +224,7 @@ export function* generateComponent( yield `, ...__VLS_functionalComponentArgsRest(${var_functionalComponent}))${endOfLine}`; } else { - // without strictTemplates, this only for instacne type + // without strictTemplates, this only for instance type yield `const ${var_componentInstance} = ${var_functionalComponent}({`; yield* generateElementProps(options, ctx, node, props, false); yield `}, ...__VLS_functionalComponentArgsRest(${var_functionalComponent}))${endOfLine}`; @@ -271,6 +271,15 @@ export function* generateComponent( yield `let ${var_componentEvents}!: __VLS_NormalizeEmits${endOfLine}`; } + if ( + node.props.some(prop => prop.type === CompilerDOM.NodeTypes.DIRECTIVE && prop.name === 'bind' && prop.exp?.loc.source === '$attrs') + || node === ctx.singleRootNode + ) { + const varAttrs = ctx.getInternalVariable(); + ctx.inheritedAttrVars.add(varAttrs); + yield `var ${varAttrs}!: Parameters[0];\n`; + } + const slotDir = node.props.find(p => p.type === CompilerDOM.NodeTypes.DIRECTIVE && p.name === 'slot') as CompilerDOM.DirectiveNode; if (slotDir) { yield* generateComponentSlot(options, ctx, node, slotDir, currentComponent, componentCtxVar); @@ -349,6 +358,13 @@ export function* generateElement( else { yield* generateElementChildren(options, ctx, node, currentComponent, componentCtxVar); } + + if ( + node.props.some(prop => prop.type === CompilerDOM.NodeTypes.DIRECTIVE && prop.name === 'bind' && prop.exp?.loc.source === '$attrs') + || node === ctx.singleRootNode + ) { + ctx.inheritedAttrVars.add(`__VLS_intrinsicElements.${node.tag}`); + } } function* generateVScope( diff --git a/packages/language-core/lib/codegen/template/index.ts b/packages/language-core/lib/codegen/template/index.ts index c78716c3b3..5c5665e168 100644 --- a/packages/language-core/lib/codegen/template/index.ts +++ b/packages/language-core/lib/codegen/template/index.ts @@ -17,6 +17,7 @@ export interface TemplateCodegenOptions { hasDefineSlots?: boolean; slotsAssignName?: string; propsAssignName?: string; + inheritAttrs: boolean; } export function* generateTemplate(options: TemplateCodegenOptions): Generator { @@ -43,6 +44,8 @@ export function* generateTemplate(options: TemplateCodegenOptions): Generator { + yield 'var __VLS_inheritedAttrs!: {}'; + for (const varName of ctx.inheritedAttrVars) { + yield ` & typeof ${varName}`; + } + yield endOfLine; + } + function* generateStyleScopedClasses(): Generator { yield `if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {${newLine}`; for (const offset of ctx.emptyClassOffsets) { diff --git a/packages/language-core/lib/codegen/template/templateChild.ts b/packages/language-core/lib/codegen/template/templateChild.ts index b03f366930..999c0d4709 100644 --- a/packages/language-core/lib/codegen/template/templateChild.ts +++ b/packages/language-core/lib/codegen/template/templateChild.ts @@ -47,8 +47,13 @@ export function* generateTemplateChild( } } + const shouldInheritRootNodeAttrs = options.inheritAttrs; + if (node.type === CompilerDOM.NodeTypes.ROOT) { let prev: CompilerDOM.TemplateChildNode | undefined; + if (shouldInheritRootNodeAttrs && node.children.length === 1 && node.children[0].type === CompilerDOM.NodeTypes.ELEMENT) { + ctx.singleRootNode = node.children[0]; + } for (const childNode of node.children) { yield* generateTemplateChild(options, ctx, childNode, currentComponent, prev, componentCtxVar); prev = childNode; diff --git a/packages/language-core/lib/parsers/scriptRanges.ts b/packages/language-core/lib/parsers/scriptRanges.ts index d7c5b81870..01e5101e81 100644 --- a/packages/language-core/lib/parsers/scriptRanges.ts +++ b/packages/language-core/lib/parsers/scriptRanges.ts @@ -13,6 +13,7 @@ export function parseScriptRanges(ts: typeof import('typescript'), ast: ts.Sourc componentsOption: TextRange | undefined, componentsOptionNode: ts.ObjectLiteralExpression | undefined, nameOption: TextRange | undefined, + inheritAttrsOption: string | undefined, }) | undefined; let classBlockEnd: number | undefined; @@ -40,6 +41,7 @@ export function parseScriptRanges(ts: typeof import('typescript'), ast: ts.Sourc if (obj) { let componentsOptionNode: ts.ObjectLiteralExpression | undefined; let nameOptionNode: ts.Expression | undefined; + let inheritAttrsOption: string | undefined; ts.forEachChild(obj, node => { if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name)) { const name = getNodeText(ts, node.name, ast); @@ -49,6 +51,9 @@ export function parseScriptRanges(ts: typeof import('typescript'), ast: ts.Sourc if (name === 'name') { nameOptionNode = node.initializer; } + if (name === 'inheritAttrs') { + inheritAttrsOption = getNodeText(ts, node.initializer, ast); + } } }); exportDefault = { @@ -59,6 +64,7 @@ export function parseScriptRanges(ts: typeof import('typescript'), ast: ts.Sourc componentsOption: componentsOptionNode ? _getStartEnd(componentsOptionNode) : undefined, componentsOptionNode: withNode ? componentsOptionNode : undefined, nameOption: nameOptionNode ? _getStartEnd(nameOptionNode) : undefined, + inheritAttrsOption, }; } } diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index 4281e3d8e0..a696920e49 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -40,6 +40,7 @@ export function parseScriptSetupRanges( } = {}; const options: { name?: string; + inheritAttrs?: string; } = {}; const definePropProposalA = vueCompilerOptions.experimentalDefinePropProposal === 'kevinEdition' || ast.text.trimStart().startsWith('// @experimentalDefinePropProposal=kevinEdition'); @@ -101,8 +102,8 @@ export function parseScriptSetupRanges( slots, emits, expose, - defineProp, options, + defineProp, }; function _getStartEnd(node: ts.Node) { @@ -282,6 +283,15 @@ export function parseScriptSetupRanges( } else if (vueCompilerOptions.macros.defineOptions.includes(callText)) { if (node.arguments.length && ts.isObjectLiteralExpression(node.arguments[0])) { + const obj = node.arguments[0]; + ts.forEachChild(obj, node => { + if (ts.isPropertyAssignment(node) && ts.isIdentifier(node.name)) { + const name = getNodeText(ts, node.name, ast); + if (name === 'inheritAttrs') { + options.inheritAttrs = getNodeText(ts, node.initializer, ast); + } + } + }); for (const prop of node.arguments[0].properties) { if ((ts.isPropertyAssignment(prop)) && getNodeText(ts, prop.name, ast) === 'name' && ts.isStringLiteral(prop.initializer)) { options.name = prop.initializer.text; diff --git a/packages/language-core/lib/plugins/vue-tsx.ts b/packages/language-core/lib/plugins/vue-tsx.ts index fcbb3a4208..42e59217e5 100644 --- a/packages/language-core/lib/plugins/vue-tsx.ts +++ b/packages/language-core/lib/plugins/vue-tsx.ts @@ -97,6 +97,7 @@ function createTsx( hasDefineSlots: hasDefineSlots(), slotsAssignName: slotsAssignName(), propsAssignName: propsAssignName(), + inheritAttrs: inheritAttrs(), }); let current = codegen.next(); @@ -135,6 +136,10 @@ function createTsx( }); const slotsAssignName = computed(() => scriptSetupRanges()?.slots.name); const propsAssignName = computed(() => scriptSetupRanges()?.props.name); + const inheritAttrs = computed(() => { + const value = scriptSetupRanges()?.options.inheritAttrs ?? scriptRanges()?.exportDefault?.inheritAttrsOption; + return value !== 'false'; + }); const generatedScript = computed(() => { const codes: Code[] = []; const linkedCodeMappings: Mapping[] = []; diff --git a/packages/tsc/tests/__snapshots__/dts.spec.ts.snap b/packages/tsc/tests/__snapshots__/dts.spec.ts.snap index cb65071221..22142cecc0 100644 --- a/packages/tsc/tests/__snapshots__/dts.spec.ts.snap +++ b/packages/tsc/tests/__snapshots__/dts.spec.ts.snap @@ -11,11 +11,11 @@ declare const _default: (__VLS_props: NonNullable & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps); expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; - slots: ReturnType<() => { + slots: ReturnType<() => readonly [{ default?(_: { row: Row; }): any; - }>; + }, import("vue").HTMLAttributes & import("vue").ReservedProps]>[0]; emit: {}; }>) => import("vue").VNode Input: events/component-generic.vue, Output: events/compo }, never>, "onFoo"> & {}> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps); expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; - slots: ReturnType<() => {}>; + slots: ReturnType<() => readonly [{}, {}]>[0]; emit: ((evt: "foo", value: string) => void) & {}; }>) => import("vue").VNode Input: generic/component.vue, Output: generic/component.v baz: number; }>): void; attrs: any; - slots: ReturnType<() => Readonly<{ + slots: ReturnType<() => readonly [Readonly<{ default?(data: { foo: number; }): any; @@ -116,7 +116,7 @@ exports[`vue-tsc-dts > Input: generic/component.vue, Output: generic/component.v default?(data: { foo: number; }): any; - }>; + }, any]>[0]; emit: ((e: "bar", data: number) => void) & ((evt: "update:title", title: string) => void); }>) => import("vue").VNode Input: generic/custom-extension-component.cext, Output: g baz: number; }>): void; attrs: any; - slots: ReturnType<() => Readonly<{ + slots: ReturnType<() => readonly [Readonly<{ default?(data: { foo: number; }): any; @@ -155,7 +155,7 @@ exports[`vue-tsc-dts > Input: generic/custom-extension-component.cext, Output: g default?(data: { foo: number; }): any; - }>; + }, any]>[0]; emit: ((e: "bar", data: number) => void) & ((evt: "update:title", title: string) => void); }>) => import("vue").VNode = { `; exports[`vue-tsc-dts > Input: generic/main.vue, Output: generic/main.vue.d.ts 1`] = ` -"declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; +"declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_OmitIndexSignature<{ + "onUpdate:title"?: (title: string) => any; + onBar?: (data: number) => any; + title?: string; + foo: number; +} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly any; + onBar?: (data: number) => any; + title?: string; + foo: number; +} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps>>>>, {}, {}>; export default _default; +type __VLS_NonUndefinedable = T extends undefined ? never : T; +type __VLS_TypePropsToOption = { + [K in keyof T]-?: {} extends Pick ? { + type: import('vue').PropType<__VLS_NonUndefinedable>; + } : { + type: import('vue').PropType; + required: true; + }; +}; +type __VLS_OmitIndexSignature = { + [K in keyof T as {} extends Record ? never : K]: T[K]; +}; " `; @@ -634,7 +656,7 @@ export {}; `; exports[`vue-tsc-dts > Input: template-slots/component.vue, Output: template-slots/component.vue.d.ts 1`] = ` -"declare function __VLS_template(): { +"declare function __VLS_template(): readonly [{ "no-bind"?(_: {}): any; default?(_: { num: number; @@ -646,9 +668,9 @@ exports[`vue-tsc-dts > Input: template-slots/component.vue, Output: template-slo num: number; str: string; }): any; -}; +}, {}]; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots>; +declare const _default: __VLS_WithTemplateSlots[0]>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -660,7 +682,7 @@ type __VLS_WithTemplateSlots = T & { exports[`vue-tsc-dts > Input: template-slots/component-define-slots.vue, Output: template-slots/component-define-slots.vue.d.ts 1`] = ` "import { VNode } from 'vue'; -declare function __VLS_template(): Readonly<{ +declare function __VLS_template(): readonly [Readonly<{ default: (props: { num: number; }) => VNode[]; @@ -684,9 +706,9 @@ declare function __VLS_template(): Readonly<{ str: string; }) => VNode[]; 'no-bind': () => VNode[]; -}; +}, {}]; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots>; +declare const _default: __VLS_WithTemplateSlots[0]>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -697,7 +719,7 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-destructuring.vue, Output: template-slots/component-destructuring.vue.d.ts 1`] = ` -"declare function __VLS_template(): Readonly<{ +"declare function __VLS_template(): readonly [Readonly<{ bottom: (props: { num: number; }) => any[]; @@ -705,9 +727,9 @@ exports[`vue-tsc-dts > Input: template-slots/component-destructuring.vue, Output bottom: (props: { num: number; }) => any[]; -}; +}, {}]; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots>; +declare const _default: __VLS_WithTemplateSlots[0]>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -718,7 +740,7 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-no-script.vue, Output: template-slots/component-no-script.vue.d.ts 1`] = ` -"declare function __VLS_template(): { +"declare function __VLS_template(): readonly [{ "no-bind"?(_: {}): any; default?(_: { num: number; @@ -730,9 +752,9 @@ exports[`vue-tsc-dts > Input: template-slots/component-no-script.vue, Output: te num: number; str: string; }): any; -}; +}, {}]; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots>; +declare const _default: __VLS_WithTemplateSlots[0]>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { diff --git a/test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json b/test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json index 141c51abdd..2011fc02db 100644 --- a/test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue2_strictTemplate/tsconfig.json @@ -12,5 +12,6 @@ "../vue3_strictTemplate/#3140", "../vue3_strictTemplate/#3718", "../vue3_strictTemplate/intrinsicProps", + "../vue3_strictTemplate/inheritAttrs", ] } diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/HelloWorld.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/HelloWorld.vue new file mode 100644 index 0000000000..b91a472477 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/HelloWorld.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/main.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/main.vue new file mode 100644 index 0000000000..724454b611 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/#4699/main.vue @@ -0,0 +1,9 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/basic.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/basic.vue new file mode 100644 index 0000000000..638d60b11f --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/basic.vue @@ -0,0 +1,7 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/child.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/child.vue new file mode 100644 index 0000000000..b788b48f99 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/child.vue @@ -0,0 +1,9 @@ + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/define-options-inherit-attrs-false.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/define-options-inherit-attrs-false.vue new file mode 100644 index 0000000000..c07f8a71ea --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/define-options-inherit-attrs-false.vue @@ -0,0 +1,11 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false-v-bind.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false-v-bind.vue new file mode 100644 index 0000000000..0aad51f4fd --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false-v-bind.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false.vue new file mode 100644 index 0000000000..c2ce35f349 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/inherit-attrs-false.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/main.vue b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/main.vue new file mode 100644 index 0000000000..b9a545507a --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/inheritAttrs/main.vue @@ -0,0 +1,16 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/tsconfig.json b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/tsconfig.json index 61ae6aab5d..13bbce6e2e 100644 --- a/test-workspace/tsc/passedFixtures/vue3_strictTemplate/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue3_strictTemplate/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../../tsconfig.base.json", "vueCompilerOptions": { - "strictTemplates": true + "strictTemplates": true, }, "include": [ "**/*" ], } From bee8ef55f34299d8d185fe68cb53ad6552dd2ef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:15:46 +0800 Subject: [PATCH 20/37] feat(language-core): document links for classname within `:class` (#4642) --- .../lib/codegen/script/template.ts | 17 ++- .../lib/codegen/template/context.ts | 6 +- .../lib/codegen/template/element.ts | 143 +++++++++++++++--- .../lib/codegen/template/index.ts | 78 +--------- .../codegen/template/styleScopedClasses.ts | 80 ++++++++++ .../tsc/passedFixtures/#3688/main.vue | 4 +- 6 files changed, 221 insertions(+), 107 deletions(-) create mode 100644 packages/language-core/lib/codegen/template/styleScopedClasses.ts diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index f273a6ddac..9ca16a8791 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -7,6 +7,7 @@ import { forEachInterpolationSegment } from '../template/interpolation'; import type { ScriptCodegenContext } from './context'; import { codeFeatures, type ScriptCodegenOptions } from './index'; import { generateInternalComponent } from './internalComponent'; +import { generateStyleScopedClasses } from '../template/styleScopedClasses'; export function* generateTemplate( options: ScriptCodegenOptions, @@ -124,13 +125,23 @@ function* generateTemplateContext( yield `let __VLS_components!: typeof __VLS_localComponents & __VLS_GlobalComponents & typeof __VLS_ctx${endOfLine}`; // for html completion, TS references... /* Style Scoped */ + const firstClasses = new Set(); yield `/* Style Scoped */${newLine}`; - yield `type __VLS_StyleScopedClasses = {}`; + yield `let __VLS_styleScopedClasses!: {}`; for (let i = 0; i < options.sfc.styles.length; i++) { const style = options.sfc.styles[i]; const option = options.vueCompilerOptions.experimentalResolveStyleCssClasses; if (option === 'always' || (option === 'scoped' && style.scoped)) { for (const className of style.classNames) { + if (firstClasses.has(className.text)) { + templateCodegenCtx.scopedClasses.push({ + source: 'style_' + i, + className: className.text.slice(1), + offset: className.offset + 1 + }); + continue; + } + firstClasses.add(className.text); yield* generateCssClassProperty( i, className.text, @@ -142,7 +153,7 @@ function* generateTemplateContext( } } yield endOfLine; - yield `let __VLS_styleScopedClasses!: __VLS_StyleScopedClasses | keyof __VLS_StyleScopedClasses | (keyof __VLS_StyleScopedClasses)[]${endOfLine}`; + yield* generateStyleScopedClasses(templateCodegenCtx, true); yield* generateCssVars(options, templateCodegenCtx); if (options.templateCodegen) { @@ -173,7 +184,7 @@ function* generateCssClassProperty( '', 'style_' + styleIndex, offset, - codeFeatures.navigationWithoutRename, + codeFeatures.navigation, ]; yield `'`; yield [ diff --git a/packages/language-core/lib/codegen/template/context.ts b/packages/language-core/lib/codegen/template/context.ts index 10d1a7addd..480643d1a8 100644 --- a/packages/language-core/lib/codegen/template/context.ts +++ b/packages/language-core/lib/codegen/template/context.ts @@ -109,7 +109,11 @@ export function createTemplateCodegenContext(scriptSetupBindingNames: TemplateCo const hasSlotElements = new Set();; const blockConditions: string[] = []; const usedComponentCtxVars = new Set(); - const scopedClasses: { className: string, offset: number; }[] = []; + const scopedClasses: { + source: string; + className: string; + offset: number; + }[] = []; const emptyClassOffsets: number[] = []; const inlayHints: InlayHintInfo[] = []; diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index 91af8b4bdb..4bb0f87c87 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -1,4 +1,5 @@ import * as CompilerDOM from '@vue/compiler-dom'; +import type * as ts from 'typescript'; import { camelize, capitalize } from '@vue/shared'; import type { Code, VueCodeInformation } from '../../types'; import { hyphenateTag } from '../../utils/shared'; @@ -397,7 +398,7 @@ function* generateVScope( yield* generateElementDirectives(options, ctx, node); yield* generateReferencesForElements(options, ctx, node); // - yield* generateReferencesForScopedCssClasses(ctx, node); + yield* generateReferencesForScopedCssClasses(options, ctx, node); if (inScope) { yield `}${newLine}`; @@ -575,6 +576,7 @@ function* generateReferencesForElements( } function* generateReferencesForScopedCssClasses( + options: TemplateCodegenOptions, ctx: TemplateCodegenContext, node: CompilerDOM.ElementNode ): Generator { @@ -586,28 +588,17 @@ function* generateReferencesForScopedCssClasses( ) { let startOffset = prop.value.loc.start.offset; let content = prop.value.loc.source; + let isWrapped = false; if ( (content.startsWith(`'`) && content.endsWith(`'`)) || (content.startsWith(`"`) && content.endsWith(`"`)) ) { - startOffset++; content = content.slice(1, -1); + isWrapped = true; } if (content) { - let currentClassName = ''; - for (const char of (content + ' ')) { - if (char.trim() === '') { - if (currentClassName !== '') { - ctx.scopedClasses.push({ className: currentClassName, offset: startOffset }); - startOffset += currentClassName.length; - currentClassName = ''; - } - startOffset += char.length; - } - else { - currentClassName += char; - } - } + const classes = collectClasses(content, startOffset + (isWrapped ? 1 : 0)); + ctx.scopedClasses.push(...classes); } else { ctx.emptyClassOffsets.push(startOffset); @@ -619,14 +610,84 @@ function* generateReferencesForScopedCssClasses( && prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && prop.arg.content === 'class' ) { - yield `__VLS_styleScopedClasses = (`; - yield [ - prop.exp.content, - 'template', - prop.exp.loc.start.offset, - ctx.codeFeatures.navigationAndCompletion, - ]; - yield `)${endOfLine}`; + const content = '`${' + prop.exp.content + '}`'; + const startOffset = prop.exp.loc.start.offset - 3; + + const { ts } = options; + const ast = ts.createSourceFile('', content, 99 satisfies typeof ts.ScriptTarget.Latest); + const literals: ts.StringLiteralLike[] = []; + + ts.forEachChild(ast, node => { + if ( + !ts.isExpressionStatement(node) || + !isTemplateExpression(node.expression) + ) { + return; + } + + const expression = node.expression.templateSpans[0].expression; + + if (ts.isStringLiteralLike(expression)) { + literals.push(expression); + } + + if (ts.isArrayLiteralExpression(expression)) { + walkArrayLiteral(expression); + } + + if (ts.isObjectLiteralExpression(expression)) { + walkObjectLiteral(expression); + } + }); + + for (const literal of literals) { + const classes = collectClasses( + literal.text, + literal.end - literal.text.length - 1 + startOffset + ); + ctx.scopedClasses.push(...classes); + } + + function walkArrayLiteral(node: ts.ArrayLiteralExpression) { + const { elements } = node; + for (const element of elements) { + if (ts.isStringLiteralLike(element)) { + literals.push(element); + } + else if (ts.isObjectLiteralExpression(element)) { + walkObjectLiteral(element); + } + } + } + + function walkObjectLiteral(node: ts.ObjectLiteralExpression) { + const { properties } = node; + for (const property of properties) { + if (ts.isPropertyAssignment(property)) { + const { name } = property; + if (ts.isIdentifier(name)) { + walkIdentifier(name); + } + else if (ts.isComputedPropertyName(name)) { + const { expression } = name; + if (ts.isStringLiteralLike(expression)) { + literals.push(expression); + } + } + } + else if (ts.isShorthandPropertyAssignment(property)) { + walkIdentifier(property.name); + } + } + } + + function walkIdentifier(node: ts.Identifier) { + ctx.scopedClasses.push({ + source: 'template', + className: node.text, + offset: node.end - node.text.length + startOffset + }); + } } } } @@ -638,3 +699,37 @@ function camelizeComponentName(newName: string) { function getTagRenameApply(oldName: string) { return oldName === hyphenateTag(oldName) ? hyphenateTag : undefined; } + +function collectClasses(content: string, startOffset = 0) { + const classes: { + source: string; + className: string; + offset: number; + }[] = []; + + let currentClassName = ''; + let offset = 0; + for (const char of (content + ' ')) { + if (char.trim() === '') { + if (currentClassName !== '') { + classes.push({ + source: 'template', + className: currentClassName, + offset: offset + startOffset + }); + offset += currentClassName.length; + currentClassName = ''; + } + offset += char.length; + } + else { + currentClassName += char; + } + } + return classes; +} + +// isTemplateExpression is missing in tsc +function isTemplateExpression(node: ts.Node): node is ts.TemplateExpression { + return node.kind === 228 satisfies ts.SyntaxKind.TemplateExpression; +} \ No newline at end of file diff --git a/packages/language-core/lib/codegen/template/index.ts b/packages/language-core/lib/codegen/template/index.ts index 5c5665e168..6f70173f97 100644 --- a/packages/language-core/lib/codegen/template/index.ts +++ b/packages/language-core/lib/codegen/template/index.ts @@ -6,6 +6,7 @@ import { TemplateCodegenContext, createTemplateCodegenContext } from './context' import { getCanonicalComponentName, getPossibleOriginalComponentNames } from './element'; import { generateObjectProperty } from './objectProperty'; import { generateTemplateChild, getVForNode } from './templateChild'; +import { generateStyleScopedClasses } from './styleScopedClasses'; export interface TemplateCodegenOptions { ts: typeof ts; @@ -36,7 +37,7 @@ export function* generateTemplate(options: TemplateCodegenOptions): Generator { - yield `if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {${newLine}`; - for (const offset of ctx.emptyClassOffsets) { - yield `__VLS_styleScopedClasses['`; - yield [ - '', - 'template', - offset, - ctx.codeFeatures.additionalCompletion, - ]; - yield `']${endOfLine}`; - } - for (const { className, offset } of ctx.scopedClasses) { - yield `__VLS_styleScopedClasses[`; - yield [ - '', - 'template', - offset, - ctx.codeFeatures.navigationWithoutRename, - ]; - yield `'`; - - // fix https://github.com/vuejs/language-tools/issues/4537 - yield* escapeString(className, offset, ['\\', '\'']); - yield `'`; - yield [ - '', - 'template', - offset + className.length, - ctx.codeFeatures.navigationWithoutRename, - ]; - yield `]${endOfLine}`; - } - yield `}${newLine}`; - } - function* generatePreResolveComponents(): Generator { yield `let __VLS_resolvedLocalAndGlobalComponents!: {}`; if (options.template.ast) { @@ -144,45 +109,6 @@ export function* generateTemplate(options: TemplateCodegenOptions): Generator { - let count = 0; - - const currentEscapeTargets = [...escapeTargets]; - const firstEscapeTarget = currentEscapeTargets.shift()!; - const splitted = className.split(firstEscapeTarget); - - for (let i = 0; i < splitted.length; i++) { - const part = splitted[i]; - const partLength = part.length; - - if (escapeTargets.length > 0) { - yield* escapeString(part, offset + count, [...currentEscapeTargets]); - } else { - yield [ - part, - 'template', - offset + count, - ctx.codeFeatures.navigationAndAdditionalCompletion, - ]; - } - - if (i !== splitted.length - 1) { - yield '\\'; - - yield [ - firstEscapeTarget, - 'template', - offset + count + partLength, - ctx.codeFeatures.navigationAndAdditionalCompletion, - ]; - - count += partLength + 1; - } else { - count += partLength; - } - } - } } export function* forEachElementNode(node: CompilerDOM.RootNode | CompilerDOM.TemplateChildNode): Generator { diff --git a/packages/language-core/lib/codegen/template/styleScopedClasses.ts b/packages/language-core/lib/codegen/template/styleScopedClasses.ts new file mode 100644 index 0000000000..fe1777866b --- /dev/null +++ b/packages/language-core/lib/codegen/template/styleScopedClasses.ts @@ -0,0 +1,80 @@ +import type { Code } from '../../types'; +import type { TemplateCodegenContext } from './context'; +import { endOfLine, newLine } from '../common'; + +export function* generateStyleScopedClasses( + ctx: TemplateCodegenContext, + withDot = false +): Generator { + for (const offset of ctx.emptyClassOffsets) { + yield `__VLS_styleScopedClasses['`; + yield [ + '', + 'template', + offset, + ctx.codeFeatures.additionalCompletion, + ]; + yield `']${endOfLine}`; + } + for (const { source, className, offset } of ctx.scopedClasses) { + yield `__VLS_styleScopedClasses[`; + yield [ + '', + source, + offset - (withDot ? 1 : 0), + ctx.codeFeatures.navigation, + ]; + yield `'`; + + // fix https://github.com/vuejs/language-tools/issues/4537 + yield* escapeString(source, className, offset, ['\\', '\'']); + yield `'`; + yield [ + '', + source, + offset + className.length, + ctx.codeFeatures.navigationWithoutRename, + ]; + yield `]${endOfLine}`; + } + yield newLine; + + function* escapeString(source: string, className: string, offset: number, escapeTargets: string[]): Generator { + let count = 0; + + const currentEscapeTargets = [...escapeTargets]; + const firstEscapeTarget = currentEscapeTargets.shift()!; + const splitted = className.split(firstEscapeTarget); + + for (let i = 0; i < splitted.length; i++) { + const part = splitted[i]; + const partLength = part.length; + + if (escapeTargets.length > 0) { + yield* escapeString(source, part, offset + count, [...currentEscapeTargets]); + } else { + yield [ + part, + source, + offset + count, + ctx.codeFeatures.navigationAndAdditionalCompletion, + ]; + } + + if (i !== splitted.length - 1) { + yield '\\'; + + yield [ + firstEscapeTarget, + source, + offset + count + partLength, + ctx.codeFeatures.navigationAndAdditionalCompletion, + ]; + + count += partLength + 1; + } else { + count += partLength; + } + } + } +} \ No newline at end of file diff --git a/test-workspace/tsc/passedFixtures/#3688/main.vue b/test-workspace/tsc/passedFixtures/#3688/main.vue index d894172b00..7fbf85ca0a 100644 --- a/test-workspace/tsc/passedFixtures/#3688/main.vue +++ b/test-workspace/tsc/passedFixtures/#3688/main.vue @@ -1,8 +1,6 @@ From 4dd5ee9022ed20ff45da3ae32d8df84706ab4f3b Mon Sep 17 00:00:00 2001 From: zhiyuanzmj <32807958+zhiyuanzmj@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:40:38 +0800 Subject: [PATCH 21/37] feat(language-core): auto infer type for $refs & useTemplateRef (#4644) --- .../lib/codegen/script/component.ts | 9 +- .../lib/codegen/script/globalTypes.ts | 7 + .../lib/codegen/script/internalComponent.ts | 3 + .../lib/codegen/script/scriptSetup.ts | 13 +- .../lib/codegen/script/template.ts | 7 +- .../lib/codegen/template/element.ts | 34 +++- .../lib/codegen/template/index.ts | 14 ++ .../lib/parsers/scriptSetupRanges.ts | 16 ++ packages/language-core/lib/plugins/vue-tsx.ts | 1 + packages/language-core/lib/types.ts | 1 + packages/language-core/lib/utils/ts.ts | 1 + .../schemas/vue-tsconfig.schema.json | 3 +- .../tsc/tests/__snapshots__/dts.spec.ts.snap | 162 ++++++++++-------- pnpm-lock.yaml | 118 +++++++------ test-workspace/package.json | 2 +- .../vue3.5/templateRef/generic.vue | 13 ++ .../vue3.5/templateRef/main.vue | 10 ++ .../vue3.5/templateRef/template-ref.vue | 22 +++ 18 files changed, 297 insertions(+), 139 deletions(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/templateRef/generic.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/templateRef/main.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3.5/templateRef/template-ref.vue diff --git a/packages/language-core/lib/codegen/script/component.ts b/packages/language-core/lib/codegen/script/component.ts index 74722a7156..4d5bbe4215 100644 --- a/packages/language-core/lib/codegen/script/component.ts +++ b/packages/language-core/lib/codegen/script/component.ts @@ -36,6 +36,9 @@ export function* generateComponent( if (options.sfc.script && options.scriptRanges) { yield* generateScriptOptions(options.sfc.script, options.scriptRanges); } + if (options.vueCompilerOptions.target >= 3.5 && scriptSetupRanges.templateRefs.length) { + yield `__typeRefs: {} as __VLS_Refs,${newLine}`; + } yield `})`; } @@ -83,10 +86,10 @@ export function* generatePropsOption( if (options.vueCompilerOptions.target >= 3.5) { const types = []; if (inheritAttrs && options.templateCodegen?.inheritedAttrVars.size) { - types.push('typeof __VLS_template>[1]'); + types.push(`ReturnType['attrs']`); } if (ctx.generatedPropsType) { - types.push('{} as __VLS_PublicProps'); + types.push(`{} as __VLS_PublicProps`); } if (types.length) { yield `__typeProps: ${types.join(' & ')},${newLine}`; @@ -97,7 +100,7 @@ export function* generatePropsOption( if (inheritAttrs && options.templateCodegen?.inheritedAttrVars.size) { codegens.push(function* () { - yield `{} as ${ctx.helperTypes.TypePropsToOption.name}<__VLS_PickNotAny<${ctx.helperTypes.OmitIndexSignature.name}[1]>, {}>>`; + yield `{} as ${ctx.helperTypes.TypePropsToOption.name}<__VLS_PickNotAny<${ctx.helperTypes.OmitIndexSignature.name}['attrs']>, {}>>`; }); } diff --git a/packages/language-core/lib/codegen/script/globalTypes.ts b/packages/language-core/lib/codegen/script/globalTypes.ts index 923d971aa9..987dfba52c 100644 --- a/packages/language-core/lib/codegen/script/globalTypes.ts +++ b/packages/language-core/lib/codegen/script/globalTypes.ts @@ -129,6 +129,13 @@ declare global { > >; type __VLS_PrettifyGlobal = { [K in keyof T]: T[K]; } & {}; + type __VLS_PickRefsExpose = T extends object + ? { [K in keyof T]: (T[K] extends any[] + ? Parameters[0][] + : T[K] extends { expose?: (exposed: infer E) => void } + ? E + : T[K]) | null } + : never; } export const __VLS_globalTypesEnd = {}; `; diff --git a/packages/language-core/lib/codegen/script/internalComponent.ts b/packages/language-core/lib/codegen/script/internalComponent.ts index 458adaf8b8..af8859709c 100644 --- a/packages/language-core/lib/codegen/script/internalComponent.ts +++ b/packages/language-core/lib/codegen/script/internalComponent.ts @@ -48,6 +48,9 @@ export function* generateInternalComponent( } yield `}${endOfLine}`; // return { yield `},${newLine}`; // setup() { + if (options.vueCompilerOptions.target >= 3.5) { + yield `__typeRefs: {} as __VLS_Refs,${newLine}`; + } if (options.sfc.scriptSetup && options.scriptSetupRanges && !ctx.bypassDefineComponent) { yield* generateScriptSetupOptions(options, ctx, options.sfc.scriptSetup, options.scriptSetupRanges, false); } diff --git a/packages/language-core/lib/codegen/script/scriptSetup.ts b/packages/language-core/lib/codegen/script/scriptSetup.ts index 131d6a497e..84fbeb991e 100644 --- a/packages/language-core/lib/codegen/script/scriptSetup.ts +++ b/packages/language-core/lib/codegen/script/scriptSetup.ts @@ -67,7 +67,7 @@ export function* generateScriptSetup( + ` props: ${ctx.helperTypes.Prettify.name} & __VLS_BuiltInPublicProps,${newLine}` + ` expose(exposed: import('${options.vueCompilerOptions.lib}').ShallowUnwrapRef<${scriptSetupRanges.expose.define ? 'typeof __VLS_exposed' : '{}'}>): void,${newLine}` + ` attrs: any,${newLine}` - + ` slots: ReturnType[0],${newLine}` + + ` slots: __VLS_Slots,${newLine}` + ` emit: ${emitTypes.join(' & ')},${newLine}` + ` }${endOfLine}`; yield ` })(),${newLine}`; // __VLS_setup = (async () => { @@ -116,7 +116,7 @@ function* generateSetupFunction( if (options.vueCompilerOptions.target >= 3.3) { yield `const { `; for (const macro of Object.keys(options.vueCompilerOptions.macros)) { - if (!ctx.bindingNames.has(macro)) { + if (!ctx.bindingNames.has(macro) && macro !== 'templateRef') { yield macro + `, `; } } @@ -211,6 +211,11 @@ function* generateSetupFunction( ]); } } + for (const { define } of scriptSetupRanges.templateRefs) { + if (define?.arg) { + setupCodeModifies.push([[`<__VLS_Refs[${scriptSetup.content.slice(define.arg.start, define.arg.end)}], keyof __VLS_Refs>`], define.arg.start - 1, define.arg.start - 1]); + } + } setupCodeModifies = setupCodeModifies.sort((a, b) => a[1] - b[1]); if (setupCodeModifies.length) { @@ -243,6 +248,8 @@ function* generateSetupFunction( yield* generateComponentProps(options, ctx, scriptSetup, scriptSetupRanges, definePropMirrors); yield* generateModelEmits(options, scriptSetup, scriptSetupRanges); yield* generateTemplate(options, ctx, false); + yield `type __VLS_Refs = ReturnType['refs']${endOfLine}`; + yield `type __VLS_Slots = ReturnType['slots']${endOfLine}`; if (syntax) { if (!options.vueCompilerOptions.skipTemplateCodegen && (options.templateCodegen?.hasSlot || scriptSetupRanges?.slots.define)) { @@ -250,7 +257,7 @@ function* generateSetupFunction( yield* generateComponent(options, ctx, scriptSetup, scriptSetupRanges); yield endOfLine; yield `${syntax} `; - yield `{} as ${ctx.helperTypes.WithTemplateSlots.name}[0]>${endOfLine}`; + yield `{} as ${ctx.helperTypes.WithTemplateSlots.name}${endOfLine}`; } else { yield `${syntax} `; diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index 9ca16a8791..a0e124226e 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -165,11 +165,16 @@ function* generateTemplateContext( yield `// no template${newLine}`; if (!options.scriptSetupRanges?.slots.define) { yield `const __VLS_slots = {}${endOfLine}`; + yield `const __VLS_refs = {}${endOfLine}`; yield `const __VLS_inheritedAttrs = {}${endOfLine}`; } } - yield `return [${options.scriptSetupRanges?.slots.name ?? '__VLS_slots'}, __VLS_inheritedAttrs] as const${endOfLine}`; + yield `return {${newLine}`; + yield `slots: ${options.scriptSetupRanges?.slots.name ?? '__VLS_slots'},${newLine}`; + yield `refs: __VLS_refs as __VLS_PickRefsExpose,${newLine}`; + yield `attrs: __VLS_inheritedAttrs,${newLine}`; + yield `}${endOfLine}`; } function* generateCssClassProperty( diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index 4bb0f87c87..9a97c81f9b 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -259,13 +259,26 @@ export function* generateComponent( yield endOfLine; } - yield* generateVScope(options, ctx, node, props); + const refName = yield* generateVScope(options, ctx, node, props); ctx.usedComponentCtxVars.add(componentCtxVar); const usedComponentEventsVar = yield* generateElementEvents(options, ctx, node, var_functionalComponent, var_componentInstance, var_componentEmit, var_componentEvents); if (var_defineComponentCtx && ctx.usedComponentCtxVars.has(var_defineComponentCtx)) { yield `const ${componentCtxVar} = __VLS_nonNullable(__VLS_pickFunctionalComponentCtx(${var_originalComponent}, ${var_componentInstance}))${endOfLine}`; + if (refName) { + yield `// @ts-ignore${newLine}`; + if (node.codegenNode?.type === CompilerDOM.NodeTypes.VNODE_CALL + && node.codegenNode.props?.type === CompilerDOM.NodeTypes.JS_OBJECT_EXPRESSION + && node.codegenNode.props.properties.find(({ key }) => key.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION && key.content === 'ref_for') + ) { + yield `(${refName} ??= []).push(${var_defineComponentCtx})`; + } else { + yield `${refName} = ${var_defineComponentCtx}`; + } + + yield endOfLine; + } } if (usedComponentEventsVar) { yield `let ${var_componentEmit}!: typeof ${componentCtxVar}.emit${endOfLine}`; @@ -350,7 +363,17 @@ export function* generateElement( yield endOfLine; } - yield* generateVScope(options, ctx, node, node.props); + const refName = yield* generateVScope(options, ctx, node, node.props); + if (refName) { + yield `// @ts-ignore${newLine}`; + yield `${refName} = __VLS_intrinsicElements`; + yield* generatePropertyAccess( + options, + ctx, + node.tag + ); + yield endOfLine; + } const slotDir = node.props.find(p => p.type === CompilerDOM.NodeTypes.DIRECTIVE && p.name === 'slot') as CompilerDOM.DirectiveNode; if (slotDir && componentCtxVar) { @@ -397,13 +420,14 @@ function* generateVScope( } yield* generateElementDirectives(options, ctx, node); - yield* generateReferencesForElements(options, ctx, node); // + const refName = yield* generateReferencesForElements(options, ctx, node); // yield* generateReferencesForScopedCssClasses(options, ctx, node); if (inScope) { yield `}${newLine}`; ctx.blockConditions.length = originalConditionsNum; } + return refName; } export function getCanonicalComponentName(tagText: string) { @@ -571,6 +595,10 @@ function* generateReferencesForElements( ')' ); yield endOfLine; + + const refName = CompilerDOM.toValidAssetId(prop.value.content, '_VLS_refs' as any); + options.templateRefNames.set(prop.value.content, refName); + return refName; } } } diff --git a/packages/language-core/lib/codegen/template/index.ts b/packages/language-core/lib/codegen/template/index.ts index 6f70173f97..a338437e97 100644 --- a/packages/language-core/lib/codegen/template/index.ts +++ b/packages/language-core/lib/codegen/template/index.ts @@ -15,6 +15,7 @@ export interface TemplateCodegenOptions { template: NonNullable; scriptSetupBindingNames: Set; scriptSetupImportComponentNames: Set; + templateRefNames: Map; hasDefineSlots?: boolean; slotsAssignName?: string; propsAssignName?: string; @@ -49,8 +50,21 @@ export function* generateTemplate(options: TemplateCodegenOptions): Generator { + for (const [, validId] of options.templateRefNames) { + yield `let ${validId}${newLine}`; + } + yield `const __VLS_refs = {${newLine}`; + for (const [name, validId] of options.templateRefNames) { + yield `'${name}': ${validId}!,${newLine}`; + } + yield `}${endOfLine}`; + } + function* generateSlotsType(): Generator { for (const { expVar, varName } of ctx.dynamicSlots) { ctx.hasSlot = true; diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index a696920e49..ef3858993c 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -42,6 +42,10 @@ export function parseScriptSetupRanges( name?: string; inheritAttrs?: string; } = {}; + const templateRefs: { + name?: string; + define?: ReturnType; + }[] = []; const definePropProposalA = vueCompilerOptions.experimentalDefinePropProposal === 'kevinEdition' || ast.text.trimStart().startsWith('// @experimentalDefinePropProposal=kevinEdition'); const definePropProposalB = vueCompilerOptions.experimentalDefinePropProposal === 'johnsonEdition' || ast.text.trimStart().startsWith('// @experimentalDefinePropProposal=johnsonEdition'); @@ -104,6 +108,7 @@ export function parseScriptSetupRanges( expose, options, defineProp, + templateRefs, }; function _getStartEnd(node: ts.Node) { @@ -298,6 +303,17 @@ export function parseScriptSetupRanges( } } } + } else if (vueCompilerOptions.macros.templateRef.includes(callText) && node.arguments.length && !node.typeArguments?.length) { + const define = parseDefineFunction(node); + define.arg = _getStartEnd(node.arguments[0]); + let name; + if (ts.isVariableDeclaration(parent)) { + name = getNodeText(ts, parent.name, ast); + } + templateRefs.push({ + name, + define + }); } } ts.forEachChild(node, child => { diff --git a/packages/language-core/lib/plugins/vue-tsx.ts b/packages/language-core/lib/plugins/vue-tsx.ts index 42e59217e5..a84dfef4b2 100644 --- a/packages/language-core/lib/plugins/vue-tsx.ts +++ b/packages/language-core/lib/plugins/vue-tsx.ts @@ -94,6 +94,7 @@ function createTsx( template: _sfc.template, scriptSetupBindingNames: scriptSetupBindingNames(), scriptSetupImportComponentNames: scriptSetupImportComponentNames(), + templateRefNames: new Map(), hasDefineSlots: hasDefineSlots(), slotsAssignName: slotsAssignName(), propsAssignName: propsAssignName(), diff --git a/packages/language-core/lib/types.ts b/packages/language-core/lib/types.ts index ac0e9faca8..1b980e659f 100644 --- a/packages/language-core/lib/types.ts +++ b/packages/language-core/lib/types.ts @@ -41,6 +41,7 @@ export interface VueCompilerOptions { defineModel: string[]; defineOptions: string[]; withDefaults: string[]; + templateRef: string[]; }; plugins: VueLanguagePlugin[]; diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index 0c793d3645..5fd1d56a15 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -230,6 +230,7 @@ export function resolveVueCompilerOptions(vueOptions: Partial(__VLS_props: NonNullable & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps); expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; - slots: ReturnType<() => readonly [{ + slots: { default?(_: { row: Row; }): any; - }, import("vue").HTMLAttributes & import("vue").ReservedProps]>[0]; + }; emit: {}; }>) => import("vue").VNode Input: events/component-generic.vue, Output: events/compo }, never>, "onFoo"> & {}> & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps); expose(exposed: import("vue").ShallowUnwrapRef<{}>): void; attrs: any; - slots: ReturnType<() => readonly [{}, {}]>[0]; + slots: {}; emit: ((evt: "foo", value: string) => void) & {}; }>) => import("vue").VNode Input: generic/component.vue, Output: generic/component.v baz: number; }>): void; attrs: any; - slots: ReturnType<() => readonly [Readonly<{ + slots: Readonly<{ default?(data: { foo: number; }): any; @@ -116,7 +116,7 @@ exports[`vue-tsc-dts > Input: generic/component.vue, Output: generic/component.v default?(data: { foo: number; }): any; - }, any]>[0]; + }; emit: ((e: "bar", data: number) => void) & ((evt: "update:title", title: string) => void); }>) => import("vue").VNode Input: generic/custom-extension-component.cext, Output: g baz: number; }>): void; attrs: any; - slots: ReturnType<() => readonly [Readonly<{ + slots: Readonly<{ default?(data: { foo: number; }): any; @@ -155,7 +155,7 @@ exports[`vue-tsc-dts > Input: generic/custom-extension-component.cext, Output: g default?(data: { foo: number; }): any; - }, any]>[0]; + }; emit: ((e: "bar", data: number) => void) & ((evt: "update:title", title: string) => void); }>) => import("vue").VNode Input: template-slots/component.vue, Output: template-slots/component.vue.d.ts 1`] = ` -"declare function __VLS_template(): readonly [{ - "no-bind"?(_: {}): any; - default?(_: { - num: number; - }): any; - "named-slot"?(_: { - str: string; - }): any; - vbind?(_: { - num: number; - str: string; - }): any; -}, {}]; +"declare function __VLS_template(): { + slots: { + "no-bind"?(_: {}): any; + default?(_: { + num: number; + }): any; + "named-slot"?(_: { + str: string; + }): any; + vbind?(_: { + num: number; + str: string; + }): any; + }; + refs: __VLS_PickRefsExpose<{}>; + attrs: {}; +}; +type __VLS_Slots = ReturnType['slots']; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots[0]>; +declare const _default: __VLS_WithTemplateSlots; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -682,33 +687,38 @@ type __VLS_WithTemplateSlots = T & { exports[`vue-tsc-dts > Input: template-slots/component-define-slots.vue, Output: template-slots/component-define-slots.vue.d.ts 1`] = ` "import { VNode } from 'vue'; -declare function __VLS_template(): readonly [Readonly<{ - default: (props: { - num: number; - }) => VNode[]; - 'named-slot': (props: { - str: string; - }) => VNode[]; - vbind: (props: { - num: number; - str: string; - }) => VNode[]; - 'no-bind': () => VNode[]; -}> & { - default: (props: { - num: number; - }) => VNode[]; - 'named-slot': (props: { - str: string; - }) => VNode[]; - vbind: (props: { - num: number; - str: string; - }) => VNode[]; - 'no-bind': () => VNode[]; -}, {}]; +declare function __VLS_template(): { + slots: Readonly<{ + default: (props: { + num: number; + }) => VNode[]; + 'named-slot': (props: { + str: string; + }) => VNode[]; + vbind: (props: { + num: number; + str: string; + }) => VNode[]; + 'no-bind': () => VNode[]; + }> & { + default: (props: { + num: number; + }) => VNode[]; + 'named-slot': (props: { + str: string; + }) => VNode[]; + vbind: (props: { + num: number; + str: string; + }) => VNode[]; + 'no-bind': () => VNode[]; + }; + refs: __VLS_PickRefsExpose<{}>; + attrs: {}; +}; +type __VLS_Slots = ReturnType['slots']; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots[0]>; +declare const _default: __VLS_WithTemplateSlots; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -719,17 +729,22 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-destructuring.vue, Output: template-slots/component-destructuring.vue.d.ts 1`] = ` -"declare function __VLS_template(): readonly [Readonly<{ - bottom: (props: { - num: number; - }) => any[]; -}> & { - bottom: (props: { - num: number; - }) => any[]; -}, {}]; +"declare function __VLS_template(): { + slots: Readonly<{ + bottom: (props: { + num: number; + }) => any[]; + }> & { + bottom: (props: { + num: number; + }) => any[]; + }; + refs: __VLS_PickRefsExpose<{}>; + attrs: {}; +}; +type __VLS_Slots = ReturnType['slots']; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots[0]>; +declare const _default: __VLS_WithTemplateSlots; export default _default; type __VLS_WithTemplateSlots = T & { new (): { @@ -740,21 +755,26 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-no-script.vue, Output: template-slots/component-no-script.vue.d.ts 1`] = ` -"declare function __VLS_template(): readonly [{ - "no-bind"?(_: {}): any; - default?(_: { - num: number; - }): any; - "named-slot"?(_: { - str: string; - }): any; - vbind?(_: { - num: number; - str: string; - }): any; -}, {}]; +"declare function __VLS_template(): { + slots: { + "no-bind"?(_: {}): any; + default?(_: { + num: number; + }): any; + "named-slot"?(_: { + str: string; + }): any; + vbind?(_: { + num: number; + str: string; + }): any; + }; + refs: __VLS_PickRefsExpose<{}>; + attrs: {}; +}; +type __VLS_Slots = ReturnType['slots']; declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly>, {}, {}>; -declare const _default: __VLS_WithTemplateSlots[0]>; +declare const _default: __VLS_WithTemplateSlots; export default _default; type __VLS_WithTemplateSlots = T & { new (): { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4cdf7b7c3..94adcfbf0c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -332,8 +332,8 @@ importers: specifier: npm:vue@3.3.13 version: vue@3.3.13(typescript@5.5.4) vue3.5: - specifier: npm:vue@3.5.0-alpha.3 - version: vue@3.5.0-alpha.3(typescript@5.5.4) + specifier: npm:vue@3.5.0-beta.1 + version: vue@3.5.0-beta.1(typescript@5.5.4) packages: @@ -1233,8 +1233,8 @@ packages: '@vue/compiler-core@3.4.38': resolution: {integrity: sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==} - '@vue/compiler-core@3.5.0-alpha.3': - resolution: {integrity: sha512-du7iRe9SE5HJ8XGaVtN4OnVsBuslCOINZUiRYykJjDvJERdjDcJglJ4YTfi0gmG80p6TmzQSXxPuBVT/JlqpuQ==} + '@vue/compiler-core@3.5.0-beta.1': + resolution: {integrity: sha512-MLP2yH21NFnVn+WhUsrRFR+wwXuBWHQ4YmXou1zVaXSfwqwGonf0KC7FBbXz3RbqPH0v2yksWpZFJYnTY++yNQ==} '@vue/compiler-dom@3.3.13': resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==} @@ -1242,8 +1242,8 @@ packages: '@vue/compiler-dom@3.4.38': resolution: {integrity: sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==} - '@vue/compiler-dom@3.5.0-alpha.3': - resolution: {integrity: sha512-SL/lSqZ/LgiFEyix1Z3SqvRvd1hfZqQ0RfaH0wRDLv/2lkqswl4qxnqFBEChoWS0BpMBIMkAmrAha7xIhELKug==} + '@vue/compiler-dom@3.5.0-beta.1': + resolution: {integrity: sha512-DAC/58eo5XlYdrUXRIf3eWDMbKWM1I85bQfIRIqt7vCE2a2yGmx2LIyI/BEio4uI1Sdf/g16kOzk3BDmFkr1GA==} '@vue/compiler-sfc@2.7.16': resolution: {integrity: sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==} @@ -1254,8 +1254,8 @@ packages: '@vue/compiler-sfc@3.4.38': resolution: {integrity: sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==} - '@vue/compiler-sfc@3.5.0-alpha.3': - resolution: {integrity: sha512-UVs18nFL365hea2P9iOHvQDBB8eZxymhGmEol6YMbwB3DjhOcGyzscVixRin/kNHyPr5dEKjRUKcfxwZ03a+9A==} + '@vue/compiler-sfc@3.5.0-beta.1': + resolution: {integrity: sha512-0139cGju9//Wpm90rtwDy6+/1s61Ba04Mn8+X1Xgo6D9xR3h7yLmgHU7OvG9Mh3LwtlB0sQIUeYZMvF995r4ww==} '@vue/compiler-ssr@3.3.13': resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==} @@ -1263,8 +1263,8 @@ packages: '@vue/compiler-ssr@3.4.38': resolution: {integrity: sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==} - '@vue/compiler-ssr@3.5.0-alpha.3': - resolution: {integrity: sha512-cATOOLUjg9W86ZMT87DPsi3W4BZUZIIrIGZEUrRcC91lWs00PTtXiWxhQF4QGpxKpGLPr9GK3E2z5SeQWlk5Zw==} + '@vue/compiler-ssr@3.5.0-beta.1': + resolution: {integrity: sha512-aC58zZiLS//lqH6DdOPicv5crn8uSkBMilpGR1lKISViI09n5Gz0Ov0c35lYiVk9WifshTXU+BPQut3huKYySA==} '@vue/compiler-vue2@2.7.16': resolution: {integrity: sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A==} @@ -1278,8 +1278,8 @@ packages: '@vue/reactivity@3.4.38': resolution: {integrity: sha512-4vl4wMMVniLsSYYeldAKzbk72+D3hUnkw9z8lDeJacTxAkXeDAP1uE9xr2+aKIN0ipOL8EG2GPouVTH6yF7Gnw==} - '@vue/reactivity@3.5.0-alpha.3': - resolution: {integrity: sha512-Ju0okU4JHdBsxxu7RR3qOMssg4G11KX5vhmlyOwpH3bssp1fYZWQ9qyz+iadtOVsomc+b3WG0Jdx1KFgrGMHcg==} + '@vue/reactivity@3.5.0-beta.1': + resolution: {integrity: sha512-3dBZPdQxGcVCgeJv9KlGuK8a++PUj+OAJ8U89h+77SHMDAKXpLLjnpL+VfreAl37Z39ye4AJyfeYvaXV7fdlcA==} '@vue/runtime-core@3.3.13': resolution: {integrity: sha512-1TzA5TvGuh2zUwMJgdfvrBABWZ7y8kBwBhm7BXk8rvdx2SsgcGfz2ruv2GzuGZNvL1aKnK8CQMV/jFOrxNQUMA==} @@ -1287,8 +1287,8 @@ packages: '@vue/runtime-core@3.4.38': resolution: {integrity: sha512-21z3wA99EABtuf+O3IhdxP0iHgkBs1vuoCAsCKLVJPEjpVqvblwBnTj42vzHRlWDCyxu9ptDm7sI2ZMcWrQqlA==} - '@vue/runtime-core@3.5.0-alpha.3': - resolution: {integrity: sha512-RWo7KGycr0IIj1hjJ6xe5gsTeEMkhsW9wWc+lU4r8t7Tbg90F/wjBOcIXzFKhqI5+o9dExgozRhTYwrchbx/6g==} + '@vue/runtime-core@3.5.0-beta.1': + resolution: {integrity: sha512-j+ivXaIRSZbJJGf9ZZpcf+4vqM3DC3AMgmoRrQ8DJExYIU6mvpkSNUfPRBw3QROoD7BjcuImRN6Ia2QxnlwDfw==} '@vue/runtime-dom@3.3.13': resolution: {integrity: sha512-JJkpE8R/hJKXqVTgUoODwS5wqKtOsmJPEqmp90PDVGygtJ4C0PtOkcEYXwhiVEmef6xeXcIlrT3Yo5aQ4qkHhQ==} @@ -1296,8 +1296,8 @@ packages: '@vue/runtime-dom@3.4.38': resolution: {integrity: sha512-afZzmUreU7vKwKsV17H1NDThEEmdYI+GCAK/KY1U957Ig2NATPVjCROv61R19fjZNzMmiU03n79OMnXyJVN0UA==} - '@vue/runtime-dom@3.5.0-alpha.3': - resolution: {integrity: sha512-IOM5wRRnEPYU2USpLtG1VbTyMkyj9Dk2xGnHKnqtjy/4Wdnp1pXifCTfa37rnFPZFAbKeXRJT74dLMdRIyH9Kw==} + '@vue/runtime-dom@3.5.0-beta.1': + resolution: {integrity: sha512-16xac1YVuQtSsIQsY+94fHlg9QsQOxIZrr66kcHXYN9bSA8SqrTmA6JpfdwQfp+xQMVyRt+xb/K1c8plec9rxQ==} '@vue/server-renderer@3.3.13': resolution: {integrity: sha512-vSnN+nuf6iSqTL3Qgx/9A+BT+0Zf/VJOgF5uMZrKjYPs38GMYyAU1coDyBNHauehXDaP+zl73VhwWv0vBRBHcg==} @@ -1309,10 +1309,10 @@ packages: peerDependencies: vue: 3.4.38 - '@vue/server-renderer@3.5.0-alpha.3': - resolution: {integrity: sha512-w2ZOu7Q64BSotuyKReFEq5p/G0U1txTVgOsKq6+bTo3kPcUBYZV9yVCaePVf9kcU5tqjZoje5UBzNExe5DzZ3A==} + '@vue/server-renderer@3.5.0-beta.1': + resolution: {integrity: sha512-siDsHX84Yb9nF5H2Xp5h8mb/qXftNbgFiEN2Dr9N1RUaPXcz9Ai4grbMg6yTVm8aoC4gCXBgDVms+QRqSX3Xdg==} peerDependencies: - vue: 3.5.0-alpha.3 + vue: 3.5.0-beta.1 '@vue/shared@3.3.13': resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==} @@ -1320,8 +1320,8 @@ packages: '@vue/shared@3.4.38': resolution: {integrity: sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==} - '@vue/shared@3.5.0-alpha.3': - resolution: {integrity: sha512-TOd0zMchrmWoSWNddkx30wHTVRBkzemhgmbXMBUURv6HuyuddlVyqCMLDmYiklEurers3ILRp+e3b5QN838+kg==} + '@vue/shared@3.5.0-beta.1': + resolution: {integrity: sha512-RbjXOkVFA+92CWL8HLexUKIl3yUH0PGuzfjDtaNmr4WRP8vlA7xOyRm4iX+jl/KCbZb9JjC0r8yYWqNiMdeSJQ==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -1779,6 +1779,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@5.0.0: + resolution: {integrity: sha512-BeJFvFRJddxobhvEdm5GqHzRV/X+ACeuw0/BuuxsCh1EUZcAIz8+kYmBp/LrQuloy6K1f3a0M7+IhmZ7QnkISA==} + engines: {node: '>=0.12'} + env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -3401,8 +3405,8 @@ packages: typescript: optional: true - vue@3.5.0-alpha.3: - resolution: {integrity: sha512-VrCHKUgxsiGMO1SCSrS9yHLwJYAwRrbKqrHdd32ruAWnMC5GVnbrjcrcMuvw5RnrfUc+9y7pBXpVbiO6+WsyMQ==} + vue@3.5.0-beta.1: + resolution: {integrity: sha512-17ZEyGr4411DWSNM9E0nNzQ4IPCkFPeDffTL17IFF+vCwinn9o5VyJmHexa2qKiwoLJ4Ib+3IGo+eAEgafW+fA==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -4563,11 +4567,11 @@ snapshots: estree-walker: 2.0.2 source-map-js: 1.2.0 - '@vue/compiler-core@3.5.0-alpha.3': + '@vue/compiler-core@3.5.0-beta.1': dependencies: '@babel/parser': 7.25.4 - '@vue/shared': 3.5.0-alpha.3 - entities: 4.5.0 + '@vue/shared': 3.5.0-beta.1 + entities: 5.0.0 estree-walker: 2.0.2 source-map-js: 1.2.0 @@ -4581,10 +4585,10 @@ snapshots: '@vue/compiler-core': 3.4.38 '@vue/shared': 3.4.38 - '@vue/compiler-dom@3.5.0-alpha.3': + '@vue/compiler-dom@3.5.0-beta.1': dependencies: - '@vue/compiler-core': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/compiler-core': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 '@vue/compiler-sfc@2.7.16': dependencies: @@ -4619,13 +4623,13 @@ snapshots: postcss: 8.4.41 source-map-js: 1.2.0 - '@vue/compiler-sfc@3.5.0-alpha.3': + '@vue/compiler-sfc@3.5.0-beta.1': dependencies: '@babel/parser': 7.25.4 - '@vue/compiler-core': 3.5.0-alpha.3 - '@vue/compiler-dom': 3.5.0-alpha.3 - '@vue/compiler-ssr': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/compiler-core': 3.5.0-beta.1 + '@vue/compiler-dom': 3.5.0-beta.1 + '@vue/compiler-ssr': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 estree-walker: 2.0.2 magic-string: 0.30.11 postcss: 8.4.41 @@ -4641,10 +4645,10 @@ snapshots: '@vue/compiler-dom': 3.4.38 '@vue/shared': 3.4.38 - '@vue/compiler-ssr@3.5.0-alpha.3': + '@vue/compiler-ssr@3.5.0-beta.1': dependencies: - '@vue/compiler-dom': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/compiler-dom': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 '@vue/compiler-vue2@2.7.16': dependencies: @@ -4667,9 +4671,9 @@ snapshots: dependencies: '@vue/shared': 3.4.38 - '@vue/reactivity@3.5.0-alpha.3': + '@vue/reactivity@3.5.0-beta.1': dependencies: - '@vue/shared': 3.5.0-alpha.3 + '@vue/shared': 3.5.0-beta.1 '@vue/runtime-core@3.3.13': dependencies: @@ -4681,10 +4685,10 @@ snapshots: '@vue/reactivity': 3.4.38 '@vue/shared': 3.4.38 - '@vue/runtime-core@3.5.0-alpha.3': + '@vue/runtime-core@3.5.0-beta.1': dependencies: - '@vue/reactivity': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/reactivity': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 '@vue/runtime-dom@3.3.13': dependencies: @@ -4699,11 +4703,11 @@ snapshots: '@vue/shared': 3.4.38 csstype: 3.1.3 - '@vue/runtime-dom@3.5.0-alpha.3': + '@vue/runtime-dom@3.5.0-beta.1': dependencies: - '@vue/reactivity': 3.5.0-alpha.3 - '@vue/runtime-core': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/reactivity': 3.5.0-beta.1 + '@vue/runtime-core': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 csstype: 3.1.3 '@vue/server-renderer@3.3.13(vue@3.4.38(typescript@5.5.4))': @@ -4718,17 +4722,17 @@ snapshots: '@vue/shared': 3.4.38 vue: 3.4.38(typescript@5.5.4) - '@vue/server-renderer@3.5.0-alpha.3(vue@3.4.38(typescript@5.5.4))': + '@vue/server-renderer@3.5.0-beta.1(vue@3.4.38(typescript@5.5.4))': dependencies: - '@vue/compiler-ssr': 3.5.0-alpha.3 - '@vue/shared': 3.5.0-alpha.3 + '@vue/compiler-ssr': 3.5.0-beta.1 + '@vue/shared': 3.5.0-beta.1 vue: 3.4.38(typescript@5.5.4) '@vue/shared@3.3.13': {} '@vue/shared@3.4.38': {} - '@vue/shared@3.5.0-alpha.3': {} + '@vue/shared@3.5.0-beta.1': {} JSONStream@1.3.5: dependencies: @@ -5193,6 +5197,8 @@ snapshots: entities@4.5.0: {} + entities@5.0.0: {} + env-paths@2.2.1: {} err-code@2.0.3: {} @@ -6903,13 +6909,13 @@ snapshots: optionalDependencies: typescript: 5.5.4 - vue@3.5.0-alpha.3(typescript@5.5.4): + vue@3.5.0-beta.1(typescript@5.5.4): dependencies: - '@vue/compiler-dom': 3.5.0-alpha.3 - '@vue/compiler-sfc': 3.5.0-alpha.3 - '@vue/runtime-dom': 3.5.0-alpha.3 - '@vue/server-renderer': 3.5.0-alpha.3(vue@3.4.38(typescript@5.5.4)) - '@vue/shared': 3.5.0-alpha.3 + '@vue/compiler-dom': 3.5.0-beta.1 + '@vue/compiler-sfc': 3.5.0-beta.1 + '@vue/runtime-dom': 3.5.0-beta.1 + '@vue/server-renderer': 3.5.0-beta.1(vue@3.4.38(typescript@5.5.4)) + '@vue/shared': 3.5.0-beta.1 optionalDependencies: typescript: 5.5.4 diff --git a/test-workspace/package.json b/test-workspace/package.json index 2078ebacdb..74f1d5398e 100644 --- a/test-workspace/package.json +++ b/test-workspace/package.json @@ -8,6 +8,6 @@ "vue-component-type-helpers": "2.0.28", "vue2": "npm:vue@2.7.16", "vue3.3": "npm:vue@3.3.13", - "vue3.5": "npm:vue@3.5.0-alpha.3" + "vue3.5": "npm:vue@3.5.0-beta.1" } } diff --git a/test-workspace/tsc/passedFixtures/vue3.5/templateRef/generic.vue b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/generic.vue new file mode 100644 index 0000000000..823347dae9 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/generic.vue @@ -0,0 +1,13 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/templateRef/main.vue b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/main.vue new file mode 100644 index 0000000000..7f871fac60 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/main.vue @@ -0,0 +1,10 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3.5/templateRef/template-ref.vue b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/template-ref.vue new file mode 100644 index 0000000000..2a08b3ce79 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3.5/templateRef/template-ref.vue @@ -0,0 +1,22 @@ + + + From 0b227352ebce0304fa2b59226d435a556fa92c15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:44:24 +0800 Subject: [PATCH 22/37] fix(language-service): consistent data from provider for sfc completion (#4645) --- .../language-server/tests/completions.spec.ts | 4 ++ .../language-service/lib/plugins/vue-sfc.ts | 47 ++++++++++++++----- 2 files changed, 38 insertions(+), 13 deletions(-) diff --git a/packages/language-server/tests/completions.spec.ts b/packages/language-server/tests/completions.spec.ts index 9323cef6f0..f91d333377 100644 --- a/packages/language-server/tests/completions.spec.ts +++ b/packages/language-server/tests/completions.spec.ts @@ -15,15 +15,19 @@ describe('Completions', async () => { "script setup", "style", "script lang="ts"", + "script lang="js"", "script lang="tsx"", "script lang="jsx"", "script setup lang="ts"", + "script setup lang="js"", "script setup lang="tsx"", "script setup lang="jsx"", "style lang="css"", "style lang="scss"", "style lang="less"", + "style lang="stylus"", "style lang="postcss"", + "style lang="sass"", "template lang="pug"", ] `); diff --git a/packages/language-service/lib/plugins/vue-sfc.ts b/packages/language-service/lib/plugins/vue-sfc.ts index 696a4797b1..ea6ea241fa 100644 --- a/packages/language-service/lib/plugins/vue-sfc.ts +++ b/packages/language-service/lib/plugins/vue-sfc.ts @@ -167,10 +167,15 @@ export function create(): LanguageServicePlugin { return; } result.items = result.items.filter(item => item.label !== '!DOCTYPE' && item.label !== 'Custom Blocks'); - for (const scriptItem of result.items.filter(item => item.label === 'script' || item.label === 'script setup')) { + + const tags = sfcDataProvider?.provideTags(); + + const scriptLangs = getLangs('script'); + const scriptItems = result.items.filter(item => item.label === 'script' || item.label === 'script setup'); + for (const scriptItem of scriptItems) { scriptItem.kind = 17 satisfies typeof vscode.CompletionItemKind.File; scriptItem.detail = '.js'; - for (const lang of ['ts', 'tsx', 'jsx']) { + for (const lang of scriptLangs) { result.items.push({ ...scriptItem, detail: `.${lang}`, @@ -183,11 +188,13 @@ export function create(): LanguageServicePlugin { }); } } + + const styleLangs = getLangs('style'); const styleItem = result.items.find(item => item.label === 'style'); if (styleItem) { styleItem.kind = 17 satisfies typeof vscode.CompletionItemKind.File; styleItem.detail = '.css'; - for (const lang of ['css', 'scss', 'less', 'postcss']) { + for (const lang of styleLangs) { result.items.push({ ...styleItem, kind: 17 satisfies typeof vscode.CompletionItemKind.File, @@ -200,22 +207,36 @@ export function create(): LanguageServicePlugin { }); } } + + const templateLangs = getLangs('template'); const templateItem = result.items.find(item => item.label === 'template'); if (templateItem) { templateItem.kind = 17 satisfies typeof vscode.CompletionItemKind.File; templateItem.detail = '.html'; - result.items.push({ - ...templateItem, - kind: 17 satisfies typeof vscode.CompletionItemKind.File, - detail: '.pug', - label: templateItem.label + ' lang="pug"', - textEdit: templateItem.textEdit ? { - ...templateItem.textEdit, - newText: templateItem.textEdit.newText + ' lang="pug"', - } : undefined, - }); + for (const lang of templateLangs) { + if (lang === 'html') { + continue; + } + result.items.push({ + ...templateItem, + kind: 17 satisfies typeof vscode.CompletionItemKind.File, + detail: `.${lang}`, + label: templateItem.label + ' lang="' + lang + '"', + textEdit: templateItem.textEdit ? { + ...templateItem.textEdit, + newText: templateItem.textEdit.newText + ' lang="' + lang + '"', + } : undefined, + }); + } } return result; + + function getLangs(label: string) { + return tags + ?.find(tag => tag.name === label)?.attributes + .find(attr => attr.name === 'lang')?.values + ?.map(({ name }) => name) ?? []; + } }, }; }, From 6bb7820e4441a5f159e66b528e11f31a425a52df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 05:58:10 +0800 Subject: [PATCH 23/37] fix(language-core): local name support for prop using runtime api (#4650) --- .../lib/codegen/script/scriptSetup.ts | 102 ++++++++----- .../lib/parsers/scriptSetupRanges.ts | 138 ++++++++++++------ .../tsc/passedFixtures/vue2/tsconfig.json | 1 + .../tsc/passedFixtures/vue3/#4649/main.vue | 24 +++ .../passedFixtures/vue3/#4649/model-comp.vue | 18 +++ .../passedFixtures/vue3/#4649/prop-comp.vue | 21 +++ 6 files changed, 230 insertions(+), 74 deletions(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4649/main.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4649/model-comp.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4649/prop-comp.vue diff --git a/packages/language-core/lib/codegen/script/scriptSetup.ts b/packages/language-core/lib/codegen/script/scriptSetup.ts index 84fbeb991e..977edacf4b 100644 --- a/packages/language-core/lib/codegen/script/scriptSetup.ts +++ b/packages/language-core/lib/codegen/script/scriptSetup.ts @@ -1,5 +1,5 @@ import type { ScriptSetupRanges } from '../../parsers/scriptSetupRanges'; -import type { Code, Sfc } from '../../types'; +import type { Code, Sfc, TextRange } from '../../types'; import { endOfLine, generateSfcBlockSection, newLine } from '../common'; import { generateComponent, generateEmitsOption } from './component'; import type { ScriptCodegenContext } from './context'; @@ -88,16 +88,16 @@ export function* generateScriptSetup( if (ctx.scriptSetupGeneratedOffset !== undefined) { for (const defineProp of scriptSetupRanges.defineProp) { - if (!defineProp.name) { + if (!defineProp.localName) { continue; } - const propName = scriptSetup.content.substring(defineProp.name.start, defineProp.name.end); - const propMirror = definePropMirrors.get(propName); + const [_, localName] = getPropAndLocalName(scriptSetup, defineProp); + const propMirror = definePropMirrors.get(localName!); if (propMirror !== undefined) { options.linkedCodeMappings.push({ - sourceOffsets: [defineProp.name.start + ctx.scriptSetupGeneratedOffset], + sourceOffsets: [defineProp.localName.start + ctx.scriptSetupGeneratedOffset], generatedOffsets: [propMirror], - lengths: [defineProp.name.end - defineProp.name.start], + lengths: [defineProp.localName.end - defineProp.localName.start], data: undefined, }); } @@ -302,14 +302,19 @@ function* generateComponentProps( yield `const __VLS_defaults = {${newLine}`; for (const defineProp of scriptSetupRanges.defineProp) { if (defineProp.defaultValue) { - if (defineProp.name) { - yield scriptSetup.content.substring(defineProp.name.start, defineProp.name.end); + const [propName, localName] = getPropAndLocalName(scriptSetup, defineProp); + + if (defineProp.name || defineProp.isModel) { + yield propName!; + } + else if (defineProp.localName) { + yield localName!; } else { - yield `modelValue`; + continue; } yield `: `; - yield scriptSetup.content.substring(defineProp.defaultValue.start, defineProp.defaultValue.end); + yield getRangeName(scriptSetup, defineProp.defaultValue); yield `,${newLine}`; } } @@ -331,33 +336,35 @@ function* generateComponentProps( ctx.generatedPropsType = true; yield `{${newLine}`; for (const defineProp of scriptSetupRanges.defineProp) { - let propName = 'modelValue'; - if (defineProp.name && defineProp.nameIsString) { + const [propName, localName] = getPropAndLocalName(scriptSetup, defineProp); + + if (defineProp.isModel && !defineProp.name) { + yield propName!; + } + else if (defineProp.name) { // renaming support yield generateSfcBlockSection(scriptSetup, defineProp.name.start, defineProp.name.end, codeFeatures.navigation); - propName = scriptSetup.content.substring(defineProp.name.start, defineProp.name.end); - propName = propName.replace(/['"]+/g, ''); } - else if (defineProp.name) { - propName = scriptSetup.content.substring(defineProp.name.start, defineProp.name.end); - definePropMirrors.set(propName, options.getGeneratedLength()); - yield propName; + else if (defineProp.localName) { + definePropMirrors.set(localName!, options.getGeneratedLength()); + yield localName!; } else { - yield propName; + continue; } + yield defineProp.required ? `: ` : `?: `; - yield* generateDefinePropType(scriptSetup, propName, defineProp); + yield* generateDefinePropType(scriptSetup, propName, localName, defineProp); yield `,${newLine}`; if (defineProp.modifierType) { let propModifierName = 'modelModifiers'; if (defineProp.name) { - propModifierName = `${scriptSetup.content.substring(defineProp.name.start + 1, defineProp.name.end - 1)}Modifiers`; + propModifierName = `${getRangeName(scriptSetup, defineProp.name, true)}Modifiers`; } - const modifierType = scriptSetup.content.substring(defineProp.modifierType.start, defineProp.modifierType.end); + const modifierType = getRangeName(scriptSetup, defineProp.modifierType); definePropMirrors.set(propModifierName, options.getGeneratedLength()); yield `${propModifierName}?: Record<${modifierType}, true>,${endOfLine}`; } @@ -394,13 +401,10 @@ function* generateModelEmits( continue; } - let propName = 'modelValue'; - if (defineProp.name) { - propName = scriptSetup.content.substring(defineProp.name.start, defineProp.name.end); - propName = propName.replace(/['"]+/g, ''); - } + const [propName, localName] = getPropAndLocalName(scriptSetup, defineProp); + yield `'update:${propName}': [${propName}:`; - yield* generateDefinePropType(scriptSetup, propName, defineProp); + yield* generateDefinePropType(scriptSetup, propName, localName, defineProp); yield `]${endOfLine}`; } yield `}`; @@ -413,16 +417,21 @@ function* generateModelEmits( yield endOfLine; } -function* generateDefinePropType(scriptSetup: NonNullable, propName: string, defineProp: ScriptSetupRanges['defineProp'][number]) { +function* generateDefinePropType( + scriptSetup: NonNullable, + propName: string | undefined, + localName: string | undefined, + defineProp: ScriptSetupRanges['defineProp'][number] +) { if (defineProp.type) { // Infer from defineProp - yield scriptSetup.content.substring(defineProp.type.start, defineProp.type.end); + yield getRangeName(scriptSetup, defineProp.type); } - else if ((defineProp.name && defineProp.nameIsString) || !defineProp.nameIsString) { + else if (defineProp.runtimeType && localName) { // Infer from actual prop declaration code - yield `typeof ${propName}['value']`; + yield `typeof ${localName}['value']`; } - else if (defineProp.defaultValue) { + else if (defineProp.defaultValue && propName) { // Infer from defineProp({default: T}) yield `typeof __VLS_defaults['${propName}']`; } @@ -430,3 +439,30 @@ function* generateDefinePropType(scriptSetup: NonNullable, p yield `any`; } } + +function getPropAndLocalName( + scriptSetup: NonNullable, + defineProp: ScriptSetupRanges['defineProp'][number] +) { + const localName = defineProp.localName + ? getRangeName(scriptSetup, defineProp.localName) + : undefined; + let propName = defineProp.name + ? getRangeName(scriptSetup, defineProp.name) + : defineProp.isModel + ? 'modelValue' + : localName; + if (defineProp.name) { + propName = propName!.replace(/['"]+/g, '') + } + return [propName, localName]; +} + +function getRangeName( + scriptSetup: NonNullable, + range: TextRange, + unwrap = false +) { + const offset = unwrap ? 1 : 0; + return scriptSetup.content.substring(range.start + offset, range.end - offset); +} \ No newline at end of file diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index ef3858993c..d173e7da4d 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -50,10 +50,11 @@ export function parseScriptSetupRanges( const definePropProposalA = vueCompilerOptions.experimentalDefinePropProposal === 'kevinEdition' || ast.text.trimStart().startsWith('// @experimentalDefinePropProposal=kevinEdition'); const definePropProposalB = vueCompilerOptions.experimentalDefinePropProposal === 'johnsonEdition' || ast.text.trimStart().startsWith('// @experimentalDefinePropProposal=johnsonEdition'); const defineProp: { + localName: TextRange | undefined; name: TextRange | undefined; - nameIsString: boolean; type: TextRange | undefined; modifierType?: TextRange | undefined; + runtimeType: TextRange | undefined; defaultValue: TextRange | undefined; required: boolean; isModel?: boolean; @@ -134,81 +135,136 @@ export function parseScriptSetupRanges( ) { const callText = getNodeText(ts, node.expression, ast); if (vueCompilerOptions.macros.defineModel.includes(callText)) { - let name: TextRange | undefined; + let localName: TextRange | undefined; + let propName: TextRange | undefined; let options: ts.Node | undefined; + + if ( + ts.isVariableDeclaration(parent) && + ts.isIdentifier(parent.name) + ) { + localName = _getStartEnd(parent.name); + } + if (node.arguments.length >= 2) { - name = _getStartEnd(node.arguments[0]); + propName = _getStartEnd(node.arguments[0]); options = node.arguments[1]; } else if (node.arguments.length >= 1) { if (ts.isStringLiteral(node.arguments[0])) { - name = _getStartEnd(node.arguments[0]); + propName = _getStartEnd(node.arguments[0]); } else { options = node.arguments[0]; } } + + let runtimeType: TextRange | undefined; + let defaultValue: TextRange | undefined; let required = false; if (options && ts.isObjectLiteralExpression(options)) { for (const property of options.properties) { - if (ts.isPropertyAssignment(property) && ts.isIdentifier(property.name) && getNodeText(ts, property.name, ast) === 'required' && property.initializer.kind === ts.SyntaxKind.TrueKeyword) { + if (!ts.isPropertyAssignment(property) || !ts.isIdentifier(property.name)) { + continue; + } + const text = getNodeText(ts, property.name, ast); + if (text === 'type') { + runtimeType = _getStartEnd(property.initializer); + } + else if (text === 'default') { + defaultValue = _getStartEnd(property.initializer); + } + else if (text === 'required' && property.initializer.kind === ts.SyntaxKind.TrueKeyword) { required = true; - break; } } } defineProp.push({ - name, - nameIsString: true, + localName, + name: propName, type: node.typeArguments?.length ? _getStartEnd(node.typeArguments[0]) : undefined, modifierType: node.typeArguments && node.typeArguments?.length >= 2 ? _getStartEnd(node.typeArguments[1]) : undefined, - defaultValue: undefined, + runtimeType, + defaultValue, required, isModel: true, }); } else if (callText === 'defineProp') { + let localName: TextRange | undefined; + let propName: TextRange | undefined; + let options: ts.Node | undefined; + + if ( + ts.isVariableDeclaration(parent) && + ts.isIdentifier(parent.name) + ) { + localName = _getStartEnd(parent.name); + } + + let runtimeType: TextRange | undefined; + let defaultValue: TextRange | undefined; + let required = false; if (definePropProposalA) { - let required = false; if (node.arguments.length >= 2) { - const secondArg = node.arguments[1]; - if (ts.isObjectLiteralExpression(secondArg)) { - for (const property of secondArg.properties) { - if (ts.isPropertyAssignment(property) && ts.isIdentifier(property.name) && getNodeText(ts, property.name, ast) === 'required' && property.initializer.kind === ts.SyntaxKind.TrueKeyword) { - required = true; - break; - } + options = node.arguments[1]; + } + if (node.arguments.length >= 1) { + propName = _getStartEnd(node.arguments[0]); + } + + if (options && ts.isObjectLiteralExpression(options)) { + for (const property of options.properties) { + if (!ts.isPropertyAssignment(property) || !ts.isIdentifier(property.name)) { + continue; + } + const text = getNodeText(ts, property.name, ast); + if (text === 'type') { + runtimeType = _getStartEnd(property.initializer); + } + else if (text === 'default') { + defaultValue = _getStartEnd(property.initializer); + } + else if (text === 'required' && property.initializer.kind === ts.SyntaxKind.TrueKeyword) { + required = true; } } } + } + else if (definePropProposalB) { + if (node.arguments.length >= 3) { + options = node.arguments[2]; + } + if (node.arguments.length >= 2) { + if (node.arguments[1].kind === ts.SyntaxKind.TrueKeyword) { + required = true; + } + } if (node.arguments.length >= 1) { - defineProp.push({ - name: _getStartEnd(node.arguments[0]), - nameIsString: true, - type: node.typeArguments?.length ? _getStartEnd(node.typeArguments[0]) : undefined, - defaultValue: undefined, - required, - }); + defaultValue = _getStartEnd(node.arguments[0]); } - else if (ts.isVariableDeclaration(parent)) { - defineProp.push({ - name: _getStartEnd(parent.name), - nameIsString: false, - type: node.typeArguments?.length ? _getStartEnd(node.typeArguments[0]) : undefined, - defaultValue: undefined, - required, - }); + + if (options && ts.isObjectLiteralExpression(options)) { + for (const property of options.properties) { + if (!ts.isPropertyAssignment(property) || !ts.isIdentifier(property.name)) { + continue; + } + const text = getNodeText(ts, property.name, ast); + if (text === 'type') { + runtimeType = _getStartEnd(property.initializer); + } + } } } - else if (definePropProposalB && ts.isVariableDeclaration(parent)) { - defineProp.push({ - name: _getStartEnd(parent.name), - nameIsString: false, - defaultValue: node.arguments.length >= 1 ? _getStartEnd(node.arguments[0]) : undefined, - type: node.typeArguments?.length ? _getStartEnd(node.typeArguments[0]) : undefined, - required: node.arguments.length >= 2 && node.arguments[1].kind === ts.SyntaxKind.TrueKeyword, - }); - } + + defineProp.push({ + localName, + name: propName, + type: node.typeArguments?.length ? _getStartEnd(node.typeArguments[0]) : undefined, + runtimeType, + defaultValue, + required, + }); } else if (vueCompilerOptions.macros.defineSlots.includes(callText)) { slots.define = parseDefineFunction(node); diff --git a/test-workspace/tsc/passedFixtures/vue2/tsconfig.json b/test-workspace/tsc/passedFixtures/vue2/tsconfig.json index 61eb1dbaff..7c1913090d 100644 --- a/test-workspace/tsc/passedFixtures/vue2/tsconfig.json +++ b/test-workspace/tsc/passedFixtures/vue2/tsconfig.json @@ -22,6 +22,7 @@ "../vue3/#4512", "../vue3/#4540", "../vue3/#4646", + "../vue3/#4649", "../vue3/components", "../vue3/defineEmits", "../vue3/defineModel", diff --git a/test-workspace/tsc/passedFixtures/vue3/#4649/main.vue b/test-workspace/tsc/passedFixtures/vue3/#4649/main.vue new file mode 100644 index 0000000000..f4384a3425 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4649/main.vue @@ -0,0 +1,24 @@ + + + diff --git a/test-workspace/tsc/passedFixtures/vue3/#4649/model-comp.vue b/test-workspace/tsc/passedFixtures/vue3/#4649/model-comp.vue new file mode 100644 index 0000000000..a9f4fb8ba5 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4649/model-comp.vue @@ -0,0 +1,18 @@ + diff --git a/test-workspace/tsc/passedFixtures/vue3/#4649/prop-comp.vue b/test-workspace/tsc/passedFixtures/vue3/#4649/prop-comp.vue new file mode 100644 index 0000000000..3f483c1427 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4649/prop-comp.vue @@ -0,0 +1,21 @@ + From 6722371c512d118ea126bb3510821690665815ab Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 21:58:34 +0000 Subject: [PATCH 24/37] ci(lint): auto-fix --- packages/language-core/lib/parsers/scriptSetupRanges.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index d173e7da4d..cb21124748 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -212,7 +212,7 @@ export function parseScriptSetupRanges( if (node.arguments.length >= 1) { propName = _getStartEnd(node.arguments[0]); } - + if (options && ts.isObjectLiteralExpression(options)) { for (const property of options.properties) { if (!ts.isPropertyAssignment(property) || !ts.isIdentifier(property.name)) { From 812592c6c83d549eec76faab410d493160b10d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:14:08 +0800 Subject: [PATCH 25/37] fix(language-plugin-pug): compute offset correctly of pug class (#4652) --- .../lib/codegen/template/element.ts | 46 +++++++++++++------ packages/language-plugin-pug/index.ts | 26 ++++++++--- 2 files changed, 52 insertions(+), 20 deletions(-) diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index 9a97c81f9b..f0c98d6e7a 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -614,22 +614,40 @@ function* generateReferencesForScopedCssClasses( && prop.name === 'class' && prop.value ) { - let startOffset = prop.value.loc.start.offset; - let content = prop.value.loc.source; - let isWrapped = false; - if ( - (content.startsWith(`'`) && content.endsWith(`'`)) - || (content.startsWith(`"`) && content.endsWith(`"`)) - ) { - content = content.slice(1, -1); - isWrapped = true; - } - if (content) { - const classes = collectClasses(content, startOffset + (isWrapped ? 1 : 0)); - ctx.scopedClasses.push(...classes); + if (options.template.lang === 'pug') { + const getClassOffset = Reflect.get(prop.value.loc.start, 'getClassOffset') as (offset: number) => number; + const content = prop.value.loc.source.slice(1, -1); + + let startOffset = 1; + for (const className of content.split(' ')) { + if (className) { + ctx.scopedClasses.push({ + source: 'template', + className, + offset: getClassOffset(startOffset), + }); + } + startOffset += className.length + 1; + } } else { - ctx.emptyClassOffsets.push(startOffset); + let startOffset = prop.value.loc.start.offset; + let content = prop.value.loc.source; + let isWrapped = false; + if ( + (content.startsWith(`'`) && content.endsWith(`'`)) + || (content.startsWith(`"`) && content.endsWith(`"`)) + ) { + content = content.slice(1, -1); + isWrapped = true; + } + if (content) { + const classes = collectClasses(content, startOffset + (isWrapped ? 1 : 0)); + ctx.scopedClasses.push(...classes); + } + else { + ctx.emptyClassOffsets.push(startOffset); + } } } else if ( diff --git a/packages/language-plugin-pug/index.ts b/packages/language-plugin-pug/index.ts index 945b1d78d5..de7339a46e 100644 --- a/packages/language-plugin-pug/index.ts +++ b/packages/language-plugin-pug/index.ts @@ -37,13 +37,18 @@ const plugin: VueLanguagePlugin = ({ modules }) => { const proxys = new WeakMap(); return new Proxy(target, { get(target, prop, receiver) { + if (prop === 'getClassOffset') { + // div.foo#baz.bar + // ^^^ ^^^ + // class=" foo bar" + // ^^^ ^^^ + // NOTE: we need to expose source offset getter + return function(startOffset: number) { + return getOffset(target.offset + startOffset); + }; + } if (prop === 'offset') { - const htmlOffset = target.offset; - const nums: number[] = []; - for (const mapped of map.toSourceLocation(htmlOffset)) { - nums.push(mapped[0]); - } - return Math.max(-1, ...nums); + return getOffset(target.offset); } const value = Reflect.get(target, prop, receiver); if (typeof value === 'object' && value !== null) { @@ -59,6 +64,15 @@ const plugin: VueLanguagePlugin = ({ modules }) => { } }); } + + function getOffset(offset: number) { + const htmlOffset = offset; + const nums: number[] = []; + for (const mapped of map.toSourceLocation(htmlOffset)) { + nums.push(mapped[0]); + } + return Math.max(-1, ...nums); + } } } }, From 08dddcefc94bb7c58ea0bde3ce45784cb732e08c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:14:32 +0000 Subject: [PATCH 26/37] ci(lint): auto-fix --- packages/language-plugin-pug/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-plugin-pug/index.ts b/packages/language-plugin-pug/index.ts index de7339a46e..af5b487ad7 100644 --- a/packages/language-plugin-pug/index.ts +++ b/packages/language-plugin-pug/index.ts @@ -43,7 +43,7 @@ const plugin: VueLanguagePlugin = ({ modules }) => { // class=" foo bar" // ^^^ ^^^ // NOTE: we need to expose source offset getter - return function(startOffset: number) { + return function (startOffset: number) { return getOffset(target.offset + startOffset); }; } From d6bd7977608cc1b0011d36bef65ce2d4118d3a68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:35:58 +0800 Subject: [PATCH 27/37] feat(language-service): better sorting & filtering of completion (#4671) --- .../language-server/tests/completions.spec.ts | 17 ++ .../lib/plugins/vue-template.ts | 164 +++++++++++++----- 2 files changed, 133 insertions(+), 48 deletions(-) diff --git a/packages/language-server/tests/completions.spec.ts b/packages/language-server/tests/completions.spec.ts index f91d333377..b86517721e 100644 --- a/packages/language-server/tests/completions.spec.ts +++ b/packages/language-server/tests/completions.spec.ts @@ -33,6 +33,23 @@ describe('Completions', async () => { `); }); + it('#4670', async () => { + expect( + (await requestCompletionList('fixture.vue', 'vue', ``)).items.map(item => item.label).filter(label => label.includes('click')) + ).toMatchInlineSnapshot(` + [ + "onclick", + "ondblclick", + "v-on:auxclick", + "@auxclick", + "v-on:click", + "@click", + "v-on:dblclick", + "@dblclick", + ] + `); + }); + it('HTML tags and built-in components', async () => { expect( (await requestCompletionList('fixture.vue', 'vue', ``)).items.map(item => item.label) diff --git a/packages/language-service/lib/plugins/vue-template.ts b/packages/language-service/lib/plugins/vue-template.ts index 1963bf9038..1b267dcc0d 100644 --- a/packages/language-service/lib/plugins/vue-template.ts +++ b/packages/language-service/lib/plugins/vue-template.ts @@ -1,6 +1,6 @@ import type { Disposable, LanguageServiceContext, LanguageServicePluginInstance } from '@volar/language-service'; import { VueCompilerOptions, VueVirtualCode, hyphenateAttr, hyphenateTag, parseScriptSetupRanges, tsCodegen } from '@vue/language-core'; -import { camelize, capitalize, hyphenate } from '@vue/shared'; +import { camelize, capitalize } from '@vue/shared'; import { getComponentSpans } from '@vue/typescript-plugin/lib/common'; import { create as createHtmlService } from 'volar-service-html'; import { create as createPugService } from 'volar-service-pug'; @@ -12,10 +12,16 @@ import { getNameCasing } from '../ideFeatures/nameCasing'; import { AttrNameCasing, LanguageServicePlugin, TagNameCasing } from '../types'; import { loadModelModifiersData, loadTemplateData } from './data'; -let builtInData: html.HTMLDataV1; -let modelData: html.HTMLDataV1; +type InternalItemId = + | 'componentEvent' + | 'componentProp' + | 'specialTag'; const specialTags = new Set(['slot', 'component', 'template']); +const specialProps = new Set(['class', 'is', 'key', 'ref', 'style']); + +let builtInData: html.HTMLDataV1; +let modelData: html.HTMLDataV1; export function create( mode: 'html' | 'pug', @@ -522,7 +528,6 @@ export function create( attrs, props: props.filter(prop => !prop.startsWith('ref_') - && !hyphenate(prop).startsWith('on-vnode-') ), events, }); @@ -566,7 +571,9 @@ export function create( const isGlobal = !propsSet.has(prop); const name = casing.attr === AttrNameCasing.Camel ? prop : hyphenateAttr(prop); - if (hyphenateAttr(name).startsWith('on-')) { + const isEvent = hyphenateAttr(name).startsWith('on-'); + + if (isEvent) { const propNameBase = name.startsWith('on-') ? name.slice('on-'.length) @@ -584,7 +591,7 @@ export function create( } ); } - { + else { const propName = name; const propKey = createInternalItemId('componentProp', [isGlobal ? '*' : tag, propName]); @@ -611,14 +618,16 @@ export function create( const name = casing.attr === AttrNameCasing.Camel ? event : hyphenateAttr(event); const propKey = createInternalItemId('componentEvent', [tag, name]); - attributes.push({ - name: 'v-on:' + name, - description: propKey, - }); - attributes.push({ - name: '@' + name, - description: propKey, - }); + attributes.push( + { + name: 'v-on:' + name, + description: propKey, + }, + { + name: '@' + name, + description: propKey, + } + ); } const models: [boolean, string][] = []; @@ -765,54 +774,98 @@ export function create( } const itemIdKey = typeof item.documentation === 'string' ? item.documentation : item.documentation?.value; - const itemId = itemIdKey ? readInternalItemId(itemIdKey) : undefined; + let itemId = itemIdKey ? readInternalItemId(itemIdKey) : undefined; if (itemId) { - let label = hyphenate(itemId.args[1]); - if (label.startsWith('on-')) { - label = 'on' + label.slice('on-'.length); - } - else if (itemId.type === 'componentEvent') { - label = 'on' + label; + let [isEvent, name] = tryGetEventName(itemId); + if (isEvent) { + name = 'on' + name; } - const original = originals.get(label); + const original = originals.get(name); item.documentation = original?.documentation; } - else if (!originals.has(item.label)) { - originals.set(item.label, item); + else { + let name = item.label; + const isVBind = name.startsWith('v-bind:') ? ( + name = name.slice('v-bind:'.length), true + ) : false; + const isVBindAbbr = name.startsWith(':') && name !== ':' ? ( + name = name.slice(':'.length), true + ) : false; + + /** + * for `is`, `key` and `ref` starting with `v-bind:` or `:` + * that without `internalItemId`. + */ + if (isVBind || isVBindAbbr) { + itemId = { + type: 'componentProp', + args: ['^', name] + }; + } + else if (!originals.has(item.label)) { + originals.set(item.label, item); + } } + const tokens: string[] = []; + if (item.kind === 10 satisfies typeof vscode.CompletionItemKind.Property && lastCompletionComponentNames.has(hyphenateTag(item.label))) { item.kind = 6 satisfies typeof vscode.CompletionItemKind.Variable; - item.sortText = '\u0000' + (item.sortText ?? item.label); + tokens.push('\u0000'); } - else if (itemId && (itemId.type === 'componentProp' || itemId.type === 'componentEvent')) { + else if (itemId) { + + const isComponent = itemId.args[0] !== '*'; + const [isEvent, name] = tryGetEventName(itemId); - const [componentName] = itemId.args; + if (itemId.type === 'componentProp') { + if (isComponent || specialProps.has(name)) { + item.kind = 5 satisfies typeof vscode.CompletionItemKind.Field; + } + } + else if (isEvent) { + item.kind = 23 satisfies typeof vscode.CompletionItemKind.Event; + if (name.startsWith('vnode-')) { + tokens.push('\u0004'); + } + } - if (componentName !== '*') { - if ( - item.label === 'class' - || item.label === 'ref' - || item.label.endsWith(':class') - || item.label.endsWith(':ref') - ) { - item.sortText = '\u0000' + (item.sortText ?? item.label); + if ( + isComponent + || (isComponent && isEvent) + || specialProps.has(name) + ) { + tokens.push('\u0000'); + + if (item.label.startsWith(':')) { + tokens.push('\u0001'); + } + else if (item.label.startsWith('@')) { + tokens.push('\u0002'); + } + else if (item.label.startsWith('v-bind:')) { + tokens.push('\u0003'); + } + else if (item.label.startsWith('v-on:')) { + tokens.push('\u0004'); } else { - item.sortText = '\u0000\u0000' + (item.sortText ?? item.label); + tokens.push('\u0000'); } - } - if (itemId.type === 'componentProp') { - if (componentName !== '*') { - item.kind = 5 satisfies typeof vscode.CompletionItemKind.Field; + if (specialProps.has(name)) { + tokens.push('\u0001'); + } + else { + tokens.push('\u0000'); } - } - else { - item.kind = componentName !== '*' ? 3 satisfies typeof vscode.CompletionItemKind.Function : 23 satisfies typeof vscode.CompletionItemKind.Event; } } + else if (specialProps.has(item.label)) { + item.kind = 5 satisfies typeof vscode.CompletionItemKind.Field; + tokens.push('\u0000', '\u0000', '\u0001'); + } else if ( item.label === 'v-if' || item.label === 'v-else-if' @@ -820,15 +873,17 @@ export function create( || item.label === 'v-for' ) { item.kind = 14 satisfies typeof vscode.CompletionItemKind.Keyword; - item.sortText = '\u0003' + (item.sortText ?? item.label); + tokens.push('\u0003'); } else if (item.label.startsWith('v-')) { item.kind = 3 satisfies typeof vscode.CompletionItemKind.Function; - item.sortText = '\u0002' + (item.sortText ?? item.label); + tokens.push('\u0002'); } else { - item.sortText = '\u0001' + (item.sortText ?? item.label); + tokens.push('\u0001'); } + + item.sortText = tokens.join('') + (item.sortText ?? item.label); } updateExtraCustomData([]); @@ -888,7 +943,7 @@ export function create( } }; -function createInternalItemId(type: 'componentEvent' | 'componentProp' | 'specialTag', args: string[]) { +function createInternalItemId(type: InternalItemId, args: string[]) { return '__VLS_::' + type + '::' + args.join(','); } @@ -900,7 +955,7 @@ function readInternalItemId(key: string) { if (isInternalItemId(key)) { const strs = key.split('::'); return { - type: strs[1] as 'componentEvent' | 'componentProp' | 'specialTag', + type: strs[1] as InternalItemId, args: strs[2].split(','), }; } @@ -917,3 +972,16 @@ function getReplacement(list: html.CompletionList, doc: TextDocument) { } } } + +function tryGetEventName( + itemId: ReturnType & {} +): [isEvent: boolean, name: string] { + const name = hyphenateAttr(itemId.args[1]); + if (name.startsWith('on-')) { + return [true, name.slice('on-'.length)]; + } + else if (itemId.type === 'componentEvent') { + return [true, name]; + } + return [false, name]; +} \ No newline at end of file From c7fe96fc6d03b489f7d6e3be8daad318e01d65b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:49:03 +0800 Subject: [PATCH 28/37] feat(language-core): type support for CSS Modules API (#4674) --- .../lib/codegen/script/scriptSetup.ts | 72 ++++++++++++++++++- .../lib/codegen/script/template.ts | 24 +------ .../lib/parsers/scriptSetupRanges.ts | 14 ++++ packages/language-core/lib/types.ts | 13 +++- packages/language-core/lib/utils/parseSfc.ts | 11 ++- packages/language-core/lib/utils/ts.ts | 3 + .../lib/virtualFile/computedSfc.ts | 10 ++- .../language-server/tests/renaming.spec.ts | 70 ++++++++++++++++++ 8 files changed, 188 insertions(+), 29 deletions(-) diff --git a/packages/language-core/lib/codegen/script/scriptSetup.ts b/packages/language-core/lib/codegen/script/scriptSetup.ts index 977edacf4b..869a9b60ed 100644 --- a/packages/language-core/lib/codegen/script/scriptSetup.ts +++ b/packages/language-core/lib/codegen/script/scriptSetup.ts @@ -4,7 +4,7 @@ import { endOfLine, generateSfcBlockSection, newLine } from '../common'; import { generateComponent, generateEmitsOption } from './component'; import type { ScriptCodegenContext } from './context'; import { ScriptCodegenOptions, codeFeatures } from './index'; -import { generateTemplate } from './template'; +import { generateCssClassProperty, generateTemplate } from './template'; export function* generateScriptSetupImports( scriptSetup: NonNullable, @@ -211,6 +211,34 @@ function* generateSetupFunction( ]); } } + if (scriptSetupRanges.cssModules.length) { + for (const { exp, arg } of scriptSetupRanges.cssModules) { + if (arg) { + setupCodeModifies.push([ + [ + ` as Omit<__VLS_StyleModules, '$style'>[`, + generateSfcBlockSection(scriptSetup, arg.start, arg.end, codeFeatures.all), + `]` + ], + exp.end, + exp.end + ]); + } + else { + setupCodeModifies.push([ + [ + ` as __VLS_StyleModules[`, + ['', scriptSetup.name, exp.start, codeFeatures.verification], + `'$style'`, + ['', scriptSetup.name, exp.end, codeFeatures.verification], + `]` + ], + exp.end, + exp.end + ]); + } + } + } for (const { define } of scriptSetupRanges.templateRefs) { if (define?.arg) { setupCodeModifies.push([[`<__VLS_Refs[${scriptSetup.content.slice(define.arg.start, define.arg.end)}], keyof __VLS_Refs>`], define.arg.start - 1, define.arg.start - 1]); @@ -247,6 +275,7 @@ function* generateSetupFunction( yield* generateComponentProps(options, ctx, scriptSetup, scriptSetupRanges, definePropMirrors); yield* generateModelEmits(options, scriptSetup, scriptSetupRanges); + yield* generateStyleModules(options, ctx); yield* generateTemplate(options, ctx, false); yield `type __VLS_Refs = ReturnType['refs']${endOfLine}`; yield `type __VLS_Slots = ReturnType['slots']${endOfLine}`; @@ -417,6 +446,45 @@ function* generateModelEmits( yield endOfLine; } +function* generateStyleModules( + options: ScriptCodegenOptions, + ctx: ScriptCodegenContext +): Generator { + const styles = options.sfc.styles.filter(style => style.module); + if (!styles.length) { + return; + } + yield `type __VLS_StyleModules = {${newLine}`; + for (let i = 0; i < styles.length; i++) { + const style = styles[i]; + const { name, offset } = style.module!; + if (offset) { + yield [ + name, + 'main', + offset + 1, + codeFeatures.all + ]; + } + else { + yield name; + } + yield `: Record & ${ctx.helperTypes.Prettify.name}<{}`; + for (const className of style.classNames) { + yield* generateCssClassProperty( + i, + className.text, + className.offset, + 'string', + false + ); + } + yield `>${endOfLine}`; + } + yield `}`; + yield endOfLine; +} + function* generateDefinePropType( scriptSetup: NonNullable, propName: string | undefined, @@ -453,7 +521,7 @@ function getPropAndLocalName( ? 'modelValue' : localName; if (defineProp.name) { - propName = propName!.replace(/['"]+/g, '') + propName = propName!.replace(/['"]+/g, ''); } return [propName, localName]; } diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index a0e124226e..3ecc891627 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -24,7 +24,7 @@ export function* generateTemplate( yield `function __VLS_template() {${newLine}`; } const templateCodegenCtx = createTemplateCodegenContext(new Set()); - yield* generateCtx(options, ctx, isClassComponent); + yield* generateCtx(options, isClassComponent); yield* generateTemplateContext(options, templateCodegenCtx); yield* generateExportOptions(options); yield* generateConstNameOption(options); @@ -76,7 +76,6 @@ function* generateConstNameOption(options: ScriptCodegenOptions): Generator { yield `let __VLS_ctx!: `; @@ -91,24 +90,7 @@ function* generateCtx( } /* CSS Module */ if (options.sfc.styles.some(style => style.module)) { - yield `& {${newLine}`; - for (let i = 0; i < options.sfc.styles.length; i++) { - const style = options.sfc.styles[i]; - if (style.module) { - yield `${style.module}: Record & ${ctx.helperTypes.Prettify.name}<{}`; - for (const className of style.classNames) { - yield* generateCssClassProperty( - i, - className.text, - className.offset, - 'string', - false - ); - } - yield `>${endOfLine}`; - } - } - yield `}`; + yield ` & __VLS_StyleModules`; } yield endOfLine; } @@ -177,7 +159,7 @@ function* generateTemplateContext( yield `}${endOfLine}`; } -function* generateCssClassProperty( +export function* generateCssClassProperty( styleIndex: number, classNameWithDot: string, offset: number, diff --git a/packages/language-core/lib/parsers/scriptSetupRanges.ts b/packages/language-core/lib/parsers/scriptSetupRanges.ts index cb21124748..0a53528a1c 100644 --- a/packages/language-core/lib/parsers/scriptSetupRanges.ts +++ b/packages/language-core/lib/parsers/scriptSetupRanges.ts @@ -42,6 +42,10 @@ export function parseScriptSetupRanges( name?: string; inheritAttrs?: string; } = {}; + const cssModules: { + exp: TextRange; + arg?: TextRange; + }[] = []; const templateRefs: { name?: string; define?: ReturnType; @@ -108,6 +112,7 @@ export function parseScriptSetupRanges( emits, expose, options, + cssModules, defineProp, templateRefs, }; @@ -371,6 +376,15 @@ export function parseScriptSetupRanges( define }); } + else if (vueCompilerOptions.composibles.useCssModule.includes(callText)) { + const module: (typeof cssModules)[number] = { + exp: _getStartEnd(node) + }; + if (node.arguments.length) { + module.arg = _getStartEnd(node.arguments[0]); + } + cssModules.push(module); + } } ts.forEachChild(node, child => { parents.push(node); diff --git a/packages/language-core/lib/types.ts b/packages/language-core/lib/types.ts index 1b980e659f..17158d277e 100644 --- a/packages/language-core/lib/types.ts +++ b/packages/language-core/lib/types.ts @@ -43,6 +43,9 @@ export interface VueCompilerOptions { withDefaults: string[]; templateRef: string[]; }; + composibles: { + useCssModule: string[]; + }; plugins: VueLanguagePlugin[]; // experimental @@ -92,6 +95,13 @@ export interface SfcBlock { attrs: Record; } +export interface SFCStyleOverride { + module?: { + name: string; + offset?: number; + }; +} + export interface Sfc { content: string; template: SfcBlock & { @@ -110,8 +120,7 @@ export interface Sfc { genericOffset: number; ast: ts.SourceFile; } | undefined; - styles: readonly (SfcBlock & { - module: string | undefined; + styles: readonly (SfcBlock & SFCStyleOverride & { scoped: boolean; cssVars: { text: string; diff --git a/packages/language-core/lib/utils/parseSfc.ts b/packages/language-core/lib/utils/parseSfc.ts index 4f9e87d502..1bd6779528 100644 --- a/packages/language-core/lib/utils/parseSfc.ts +++ b/packages/language-core/lib/utils/parseSfc.ts @@ -1,6 +1,7 @@ import type { CompilerError, SFCDescriptor, SFCBlock, SFCStyleBlock, SFCScriptBlock, SFCTemplateBlock, SFCParseResult } from '@vue/compiler-sfc'; import type { ElementNode, SourceLocation } from '@vue/compiler-dom'; import * as compiler from '@vue/compiler-dom'; +import { SFCStyleOverride } from '../types'; export function parse(source: string): SFCParseResult { @@ -90,7 +91,10 @@ function createBlock(node: ElementNode, source: string) { end }; const attrs: Record = {}; - const block: SFCBlock & Pick & Pick = { + const block: SFCBlock + & Pick + & Pick + & Pick = { type, content, loc, @@ -110,7 +114,10 @@ function createBlock(node: ElementNode, source: string) { block.scoped = true; } else if (p.name === 'module') { - block.module = attrs[p.name]; + block.module = { + name: p.value?.content ?? '$style', + offset: p.value?.content ? p.value?.loc.start.offset - node.loc.start.offset : undefined + }; } } else if (type === 'script' && p.name === 'setup') { diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index 5fd1d56a15..c1d2cbcd59 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -233,6 +233,9 @@ export function resolveVueCompilerOptions(vueOptions: Partial parsed()?.descriptor.styles ?? []), (block, i) => { const base = computedSfcBlock('style_' + i, 'css', block); - const module = computed(() => typeof block().module === 'string' ? block().module as string : block().module ? '$style' : undefined); + const module = computed(() => { + const _module = block().module as SFCStyleOverride['module']; + return _module ? { + name: _module.name, + offset: _module.offset ? base.start + _module.offset : undefined + } : undefined; + }); const scoped = computed(() => !!block().scoped); const cssVars = computed(() => [...parseCssVars(base.content)]); const classNames = computed(() => [...parseCssClassNames(base.content)]); diff --git a/packages/language-server/tests/renaming.spec.ts b/packages/language-server/tests/renaming.spec.ts index 829b59f4e3..5dfb44718d 100644 --- a/packages/language-server/tests/renaming.spec.ts +++ b/packages/language-server/tests/renaming.spec.ts @@ -747,6 +747,76 @@ describe('Renaming', async () => { `); }); + it('#4673', async () => { + expect( + await requestRename('fixture.vue', 'vue', ` + + + + + + + + `, 'stylus') + ).toMatchInlineSnapshot(` + { + "changes": { + "file://\${testWorkspacePath}/fixture.vue": [ + { + "newText": "stylus", + "range": { + "end": { + "character": 22, + "line": 8, + }, + "start": { + "character": 18, + "line": 8, + }, + }, + }, + { + "newText": "stylus", + "range": { + "end": { + "character": 23, + "line": 15, + }, + "start": { + "character": 19, + "line": 15, + }, + }, + }, + { + "newText": "stylus", + "range": { + "end": { + "character": 40, + "line": 4, + }, + "start": { + "character": 36, + "line": 4, + }, + }, + }, + ], + }, + } + `); + }); + const openedDocuments: TextDocument[] = []; afterEach(async () => { From d35cb822c30698c68b49f1515005d2ada4b43cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 06:57:06 +0800 Subject: [PATCH 29/37] fix(language-core): optimize matching of scoped class and `v-bind()` (#4679) --- .../lib/utils/parseCssClassNames.ts | 10 ++--- .../language-core/lib/utils/parseCssVars.ts | 12 +++--- .../language-server/tests/renaming.spec.ts | 43 ++++--------------- 3 files changed, 17 insertions(+), 48 deletions(-) diff --git a/packages/language-core/lib/utils/parseCssClassNames.ts b/packages/language-core/lib/utils/parseCssClassNames.ts index cdd39a7179..b8f63168ba 100644 --- a/packages/language-core/lib/utils/parseCssClassNames.ts +++ b/packages/language-core/lib/utils/parseCssClassNames.ts @@ -1,16 +1,14 @@ import { clearComments } from './parseCssVars'; -const cssClassNameReg = /(?=([\.]{1}[a-zA-Z_]+[\w\_\-]*)[\s\.\,\+\{\>#\:]{1})/g; +const cssClassNameReg = /(?=(\.[a-z_][-\w]*)[\s.,+~>:#[{])/gi; export function* parseCssClassNames(styleContent: string) { styleContent = clearComments(styleContent); const matches = styleContent.matchAll(cssClassNameReg); for (const match of matches) { - if (match.index !== undefined) { - const matchText = match[1]; - if (matchText !== undefined) { - yield { offset: match.index, text: matchText }; - } + const matchText = match[1]; + if (matchText) { + yield { offset: match.index, text: matchText }; } } } diff --git a/packages/language-core/lib/utils/parseCssVars.ts b/packages/language-core/lib/utils/parseCssVars.ts index 305a02eaec..adcdec35d5 100644 --- a/packages/language-core/lib/utils/parseCssVars.ts +++ b/packages/language-core/lib/utils/parseCssVars.ts @@ -1,6 +1,6 @@ // https://github.com/vuejs/core/blob/main/packages/compiler-sfc/src/cssVars.ts#L47-L61 -const vBindCssVarReg = /\bv-bind\(\s*(?:'([^']+)'|"([^"]+)"|([^'"][^)]*))\s*\)/g; +const vBindCssVarReg = /\bv-bind\(\s*(?:'([^']+)'|"([^"]+)"|([a-z_]\w*))\s*\)/gi; const commentReg1 = /\/\*([\s\S]*?)\*\//g; const commentReg2 = /\/\/([\s\S]*?)\n/g; @@ -8,12 +8,10 @@ export function* parseCssVars(styleContent: string) { styleContent = clearComments(styleContent); const matchs = styleContent.matchAll(vBindCssVarReg); for (const match of matchs) { - if (match.index !== undefined) { - const matchText = match[1] ?? match[2] ?? match[3]; - if (matchText !== undefined) { - const offset = match.index + styleContent.slice(match.index).indexOf(matchText); - yield { offset, text: matchText }; - } + const matchText = match.slice(1).find(t => t); + if (matchText) { + const offset = match.index + styleContent.slice(match.index).indexOf(matchText); + yield { offset, text: matchText }; } } } diff --git a/packages/language-server/tests/renaming.spec.ts b/packages/language-server/tests/renaming.spec.ts index 5dfb44718d..eeb0e85dac 100644 --- a/packages/language-server/tests/renaming.spec.ts +++ b/packages/language-server/tests/renaming.spec.ts @@ -185,7 +185,6 @@ describe('Renaming', async () => { .bar { color: v-bind(foo|); } .bar { color: v-bind('foo'); } .bar { color: v-bind("foo"); } - .bar { color: v-bind(foo + foo); } .bar { color: v-bind('foo + foo'); } .bar { color: v-bind("foo + foo"); } .bar { color: v-bind(); } @@ -199,32 +198,6 @@ describe('Renaming', async () => { { "changes": { "file://\${testWorkspacePath}/fixture.vue": [ - { - "newText": "bar", - "range": { - "end": { - "character": 34, - "line": 10, - }, - "start": { - "character": 31, - "line": 10, - }, - }, - }, - { - "newText": "bar", - "range": { - "end": { - "character": 28, - "line": 10, - }, - "start": { - "character": 25, - "line": 10, - }, - }, - }, { "newText": "bar", "range": { @@ -256,11 +229,11 @@ describe('Renaming', async () => { "range": { "end": { "character": 35, - "line": 12, + "line": 11, }, "start": { "character": 32, - "line": 12, + "line": 11, }, }, }, @@ -269,11 +242,11 @@ describe('Renaming', async () => { "range": { "end": { "character": 29, - "line": 12, + "line": 11, }, "start": { "character": 26, - "line": 12, + "line": 11, }, }, }, @@ -282,11 +255,11 @@ describe('Renaming', async () => { "range": { "end": { "character": 35, - "line": 11, + "line": 10, }, "start": { "character": 32, - "line": 11, + "line": 10, }, }, }, @@ -295,11 +268,11 @@ describe('Renaming', async () => { "range": { "end": { "character": 29, - "line": 11, + "line": 10, }, "start": { "character": 26, - "line": 11, + "line": 10, }, }, }, From 22eea607d564fe26eb2cdbc49f055f0cf0a7783b Mon Sep 17 00:00:00 2001 From: _Kerman Date: Mon, 26 Aug 2024 07:08:07 +0800 Subject: [PATCH 30/37] fix(language-core): should preserve generic info in directive (#4686) --- .../lib/codegen/script/globalTypes.ts | 11 +++-- .../lib/codegen/template/elementDirectives.ts | 41 +++++++++++-------- .../tsc/passedFixtures/vue3/#4682/main.vue | 26 ++++++++++++ 3 files changed, 59 insertions(+), 19 deletions(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4682/main.vue diff --git a/packages/language-core/lib/codegen/script/globalTypes.ts b/packages/language-core/lib/codegen/script/globalTypes.ts index 987dfba52c..70125ca668 100644 --- a/packages/language-core/lib/codegen/script/globalTypes.ts +++ b/packages/language-core/lib/codegen/script/globalTypes.ts @@ -54,9 +54,14 @@ declare global { function __VLS_getSlotParams(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>; // @ts-ignore function __VLS_getSlotParam(slot: T): Parameters<__VLS_PickNotAny, (...args: any[]) => any>>[0]; - function __VLS_directiveFunction(dir: T): - T extends import('${vueCompilerOptions.lib}').ObjectDirective | import('${vueCompilerOptions.lib}').FunctionDirective ? (value: V) => void - : T; + + // Custom Directives + type __VLS_unknownDirective = (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown) => void; + function __VLS_directiveAsFunction(dir: T): T extends (...args: any) => any + ? T | __VLS_unknownDirective + : NonNullable<(T & Record)['created' | 'beforeMount' | 'mounted' | 'beforeUpdate' | 'updated' | 'beforeUnmount' | 'unmounted']>; + const __VLS_directiveBindingRestFields = { instance: null, oldValue: null, modifiers: null as any, dir: null as any }; + function __VLS_withScope(ctx: T, scope: K): ctx is T & K; function __VLS_makeOptional(t: T): { [K in keyof T]?: T[K] }; function __VLS_nonNullable(t: T): T extends null | undefined ? never : T; diff --git a/packages/language-core/lib/codegen/template/elementDirectives.ts b/packages/language-core/lib/codegen/template/elementDirectives.ts index a996a5f384..edf88ab15b 100644 --- a/packages/language-core/lib/codegen/template/elementDirectives.ts +++ b/packages/language-core/lib/codegen/template/elementDirectives.ts @@ -43,7 +43,7 @@ export function* generateElementDirectives( prop.loc.start.offset, prop.loc.end.offset, ctx.codeFeatures.verification, - `__VLS_directiveFunction(__VLS_ctx.`, + `__VLS_directiveAsFunction(__VLS_ctx.`, ...generateCamelized( 'v-' + prop.name, prop.loc.start.offset, @@ -60,27 +60,36 @@ export function* generateElementDirectives( }, } ), - `)(`, + `)(null!, { ...__VLS_directiveBindingRestFields, `, ...( prop.exp?.type === CompilerDOM.NodeTypes.SIMPLE_EXPRESSION - ? wrapWith( - prop.exp.loc.start.offset, - prop.exp.loc.end.offset, - ctx.codeFeatures.verification, - ...generateInterpolation( - options, - ctx, - prop.exp.content, - prop.exp.loc, + ? [ + ...wrapWith( prop.exp.loc.start.offset, - ctx.codeFeatures.all, - '(', - ')' + prop.exp.loc.end.offset, + ctx.codeFeatures.verification, + 'value' + ), + ': ', + ...wrapWith( + prop.exp.loc.start.offset, + prop.exp.loc.end.offset, + ctx.codeFeatures.verification, + ...generateInterpolation( + options, + ctx, + prop.exp.content, + prop.exp.loc, + prop.exp.loc.start.offset, + ctx.codeFeatures.all, + '(', + ')' + ) ) - ) + ] : [`undefined`] ), - `)` + `}, null!, null!)` ); yield endOfLine; } diff --git a/test-workspace/tsc/passedFixtures/vue3/#4682/main.vue b/test-workspace/tsc/passedFixtures/vue3/#4682/main.vue new file mode 100644 index 0000000000..7bd63e50dd --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4682/main.vue @@ -0,0 +1,26 @@ + + + From ebc87100332744bab5891fb83624380bf1d051c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 07:19:45 +0800 Subject: [PATCH 31/37] fix(language-core): generate `ref` as identifier instead of interpolation (#4688) --- .../lib/codegen/template/element.ts | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index f0c98d6e7a..f9ce74932e 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -583,19 +583,24 @@ function* generateReferencesForElements( && prop.name === 'ref' && prop.value ) { + const [content, startOffset] = normalizeAttributeValue(prop.value); + yield `// @ts-ignore${newLine}`; - yield* generateInterpolation( + yield `__VLS_ctx`; + yield* generatePropertyAccess( options, ctx, - prop.value.content, - prop.value.loc, - prop.value.loc.start.offset + 1, + content, + startOffset, ctx.codeFeatures.navigation, - '(', - ')' + prop.value.loc ); yield endOfLine; + if (variableNameRegex.test(content)) { + ctx.accessExternalVariable(content, startOffset); + } + const refName = CompilerDOM.toValidAssetId(prop.value.content, '_VLS_refs' as any); options.templateRefNames.set(prop.value.content, refName); return refName; @@ -631,16 +636,8 @@ function* generateReferencesForScopedCssClasses( } } else { - let startOffset = prop.value.loc.start.offset; - let content = prop.value.loc.source; let isWrapped = false; - if ( - (content.startsWith(`'`) && content.endsWith(`'`)) - || (content.startsWith(`"`) && content.endsWith(`"`)) - ) { - content = content.slice(1, -1); - isWrapped = true; - } + const [content, startOffset] = normalizeAttributeValue(prop.value); if (content) { const classes = collectClasses(content, startOffset + (isWrapped ? 1 : 0)); ctx.scopedClasses.push(...classes); @@ -746,6 +743,19 @@ function getTagRenameApply(oldName: string) { return oldName === hyphenateTag(oldName) ? hyphenateTag : undefined; } +function normalizeAttributeValue(node: CompilerDOM.TextNode): [string, number] { + let offset = node.loc.start.offset; + let content = node.loc.source; + if ( + (content.startsWith(`'`) && content.endsWith(`'`)) + || (content.startsWith(`"`) && content.endsWith(`"`)) + ) { + offset++; + content = content.slice(1, -1); + } + return [content, offset]; +} + function collectClasses(content: string, startOffset = 0) { const classes: { source: string; From fc22bf76828c2325de45a99ffd6f280863fbbe4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 07:36:46 +0800 Subject: [PATCH 32/37] fix(language-core): correct type narrowing from script to template (#4689) --- .../language-core/lib/codegen/script/template.ts | 9 ++++++--- packages/tsc/tests/__snapshots__/dts.spec.ts.snap | 8 ++++---- .../tsc/passedFixtures/vue3/#4391/comp.vue | 5 +++++ .../tsc/passedFixtures/vue3/#4391/main.vue | 12 ++++++++++++ 4 files changed, 27 insertions(+), 7 deletions(-) create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4391/comp.vue create mode 100644 test-workspace/tsc/passedFixtures/vue3/#4391/main.vue diff --git a/packages/language-core/lib/codegen/script/template.ts b/packages/language-core/lib/codegen/script/template.ts index 3ecc891627..50113a84fb 100644 --- a/packages/language-core/lib/codegen/script/template.ts +++ b/packages/language-core/lib/codegen/script/template.ts @@ -18,18 +18,21 @@ export function* generateTemplate( if (!options.vueCompilerOptions.skipTemplateCodegen) { if (isClassComponent) { - yield `__VLS_template() {${newLine}`; + yield `__VLS_template = (() => {${newLine}`; } else { - yield `function __VLS_template() {${newLine}`; + yield `const __VLS_template = (() => {${newLine}`; } const templateCodegenCtx = createTemplateCodegenContext(new Set()); + yield `const __VLS_template_return = () => {${newLine}`; yield* generateCtx(options, isClassComponent); yield* generateTemplateContext(options, templateCodegenCtx); yield* generateExportOptions(options); yield* generateConstNameOption(options); + yield `}${endOfLine}`; yield* generateInternalComponent(options, ctx, templateCodegenCtx); - yield `}${newLine}`; + yield `return __VLS_template_return${endOfLine}`; + yield `})()${endOfLine}`; } else { yield `function __VLS_template() {${newLine}`; diff --git a/packages/tsc/tests/__snapshots__/dts.spec.ts.snap b/packages/tsc/tests/__snapshots__/dts.spec.ts.snap index 70d50901ca..fa28f7d399 100644 --- a/packages/tsc/tests/__snapshots__/dts.spec.ts.snap +++ b/packages/tsc/tests/__snapshots__/dts.spec.ts.snap @@ -656,7 +656,7 @@ export {}; `; exports[`vue-tsc-dts > Input: template-slots/component.vue, Output: template-slots/component.vue.d.ts 1`] = ` -"declare function __VLS_template(): { +"declare const __VLS_template: () => { slots: { "no-bind"?(_: {}): any; default?(_: { @@ -687,7 +687,7 @@ type __VLS_WithTemplateSlots = T & { exports[`vue-tsc-dts > Input: template-slots/component-define-slots.vue, Output: template-slots/component-define-slots.vue.d.ts 1`] = ` "import { VNode } from 'vue'; -declare function __VLS_template(): { +declare const __VLS_template: () => { slots: Readonly<{ default: (props: { num: number; @@ -729,7 +729,7 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-destructuring.vue, Output: template-slots/component-destructuring.vue.d.ts 1`] = ` -"declare function __VLS_template(): { +"declare const __VLS_template: () => { slots: Readonly<{ bottom: (props: { num: number; @@ -755,7 +755,7 @@ type __VLS_WithTemplateSlots = T & { `; exports[`vue-tsc-dts > Input: template-slots/component-no-script.vue, Output: template-slots/component-no-script.vue.d.ts 1`] = ` -"declare function __VLS_template(): { +"declare const __VLS_template: () => { slots: { "no-bind"?(_: {}): any; default?(_: { diff --git a/test-workspace/tsc/passedFixtures/vue3/#4391/comp.vue b/test-workspace/tsc/passedFixtures/vue3/#4391/comp.vue new file mode 100644 index 0000000000..c2e89ef85d --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4391/comp.vue @@ -0,0 +1,5 @@ + diff --git a/test-workspace/tsc/passedFixtures/vue3/#4391/main.vue b/test-workspace/tsc/passedFixtures/vue3/#4391/main.vue new file mode 100644 index 0000000000..ac30a4b759 --- /dev/null +++ b/test-workspace/tsc/passedFixtures/vue3/#4391/main.vue @@ -0,0 +1,12 @@ + + + From 8eda3373acc0cebb7ebc38f76c54baab064f49d7 Mon Sep 17 00:00:00 2001 From: _Kerman Date: Mon, 26 Aug 2024 07:39:10 +0800 Subject: [PATCH 33/37] fix(language-core): should camelize prop name in `experimentalModelPropName` (#4691) --- packages/language-core/lib/utils/ts.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index c1d2cbcd59..18d21ad14c 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -1,3 +1,4 @@ +import { camelize } from '@vue/shared'; import type * as ts from 'typescript'; import * as path from 'path-browserify'; import type { RawVueCompilerOptions, VueCompilerOptions, VueLanguagePlugin } from '../types'; @@ -243,15 +244,17 @@ export function resolveVueCompilerOptions(vueOptions: Partial [camelize(k), v])), }; } From 23dbcea9ddb2c7a78a411d737342d2f3df7cc0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 07:53:13 +0800 Subject: [PATCH 34/37] fix(language-core): drop duplicate hints on incomplete tag (#4696) --- packages/language-core/lib/codegen/template/element.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index f9ce74932e..255bb6139b 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -27,9 +27,10 @@ export function* generateComponent( ): Generator { const startTagOffset = node.loc.start.offset + options.template.content.substring(node.loc.start.offset).indexOf(node.tag); const endTagOffset = !node.isSelfClosing && options.template.lang === 'html' ? node.loc.start.offset + node.loc.source.lastIndexOf(node.tag) : undefined; - const tagOffsets = endTagOffset !== undefined - ? [startTagOffset, endTagOffset] - : [startTagOffset]; + const tagOffsets = + endTagOffset !== undefined && endTagOffset > startTagOffset + ? [startTagOffset, endTagOffset] + : [startTagOffset]; const propsFailedExps: { node: CompilerDOM.SimpleExpressionNode; prefix: string; From 333d73e413aade3aac25c5d7cb5d3055ec5f3a46 Mon Sep 17 00:00:00 2001 From: Runyasak Chaengnaimuang Date: Mon, 26 Aug 2024 07:01:47 +0700 Subject: [PATCH 35/37] feat(language-service): add style scoped and module completion (#4705) --- .../language-server/tests/completions.spec.ts | 12 +++++++ .../language-service/lib/plugins/vue-sfc.ts | 32 +++++++++++++------ 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/packages/language-server/tests/completions.spec.ts b/packages/language-server/tests/completions.spec.ts index b86517721e..96c9624688 100644 --- a/packages/language-server/tests/completions.spec.ts +++ b/packages/language-server/tests/completions.spec.ts @@ -23,11 +23,23 @@ describe('Completions', async () => { "script setup lang="tsx"", "script setup lang="jsx"", "style lang="css"", + "style lang="css" scoped", + "style lang="css" module", "style lang="scss"", + "style lang="scss" scoped", + "style lang="scss" module", "style lang="less"", + "style lang="less" scoped", + "style lang="less" module", "style lang="stylus"", + "style lang="stylus" scoped", + "style lang="stylus" module", "style lang="postcss"", + "style lang="postcss" scoped", + "style lang="postcss" module", "style lang="sass"", + "style lang="sass" scoped", + "style lang="sass" module", "template lang="pug"", ] `); diff --git a/packages/language-service/lib/plugins/vue-sfc.ts b/packages/language-service/lib/plugins/vue-sfc.ts index ea6ea241fa..0bd4816423 100644 --- a/packages/language-service/lib/plugins/vue-sfc.ts +++ b/packages/language-service/lib/plugins/vue-sfc.ts @@ -195,16 +195,11 @@ export function create(): LanguageServicePlugin { styleItem.kind = 17 satisfies typeof vscode.CompletionItemKind.File; styleItem.detail = '.css'; for (const lang of styleLangs) { - result.items.push({ - ...styleItem, - kind: 17 satisfies typeof vscode.CompletionItemKind.File, - detail: lang === 'postcss' ? '.css' : `.${lang}`, - label: styleItem.label + ' lang="' + lang + '"', - textEdit: styleItem.textEdit ? { - ...styleItem.textEdit, - newText: styleItem.textEdit.newText + ' lang="' + lang + '"', - } : undefined, - }); + result.items.push( + getStyleCompletionItem(styleItem, lang), + getStyleCompletionItem(styleItem, lang, 'scoped'), + getStyleCompletionItem(styleItem, lang, 'module') + ); } } @@ -253,3 +248,20 @@ export function create(): LanguageServicePlugin { } } } + +function getStyleCompletionItem( + styleItem: vscode.CompletionItem, + lang: string, + attr?: string +): vscode.CompletionItem { + return { + ...styleItem, + kind: 17 satisfies typeof vscode.CompletionItemKind.File, + detail: lang === 'postcss' ? '.css' : `.${lang}`, + label: styleItem.label + ' lang="' + lang + '"' + (attr ? ` ${attr}` : ''), + textEdit: styleItem.textEdit ? { + ...styleItem.textEdit, + newText: styleItem.textEdit.newText + ' lang="' + lang + '"' + (attr ? ` ${attr}` : ''), + } : undefined + }; +} From 66920c8928dd3c477b7287ccd6ec2ed6710d5756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Mon, 26 Aug 2024 08:05:27 +0800 Subject: [PATCH 36/37] fix(language-core): correct inlay hints for v-bind with modifier (#4721) --- .../lib/codegen/template/elementProps.ts | 6 ++++-- .../language-server/tests/inlayHints.spec.ts | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/language-core/lib/codegen/template/elementProps.ts b/packages/language-core/lib/codegen/template/elementProps.ts index 150b5ef5b6..780e9d9618 100644 --- a/packages/language-core/lib/codegen/template/elementProps.ts +++ b/packages/language-core/lib/codegen/template/elementProps.ts @@ -143,6 +143,7 @@ export function* generateElementProps( ...genereatePropExp( options, ctx, + prop, prop.exp, ctx.codeFeatures.all, prop.arg?.loc.start.offset === prop.exp?.loc.start.offset, @@ -266,6 +267,7 @@ export function* generateElementProps( function* genereatePropExp( options: TemplateCodegenOptions, ctx: TemplateCodegenContext, + prop: CompilerDOM.DirectiveNode, exp: CompilerDOM.SimpleExpressionNode | undefined, features: VueCodeInformation, isShorthand: boolean, @@ -299,11 +301,11 @@ function* genereatePropExp( if (enableCodeFeatures) { ctx.inlayHints.push({ blockName: 'template', - offset: exp.loc.end.offset, + offset: prop.loc.end.offset, setting: 'vue.inlayHints.vBindShorthand', label: `="${propVariableName}"`, tooltip: [ - `This is a shorthand for \`${exp.loc.source}="${propVariableName}"\`.`, + `This is a shorthand for \`${prop.loc.source}="${propVariableName}"\`.`, 'To hide this hint, set `vue.inlayHints.vBindShorthand` to `false` in IDE settings.', '[More info](https://github.com/vuejs/core/pull/9451)', ].join('\n\n'), diff --git a/packages/language-server/tests/inlayHints.spec.ts b/packages/language-server/tests/inlayHints.spec.ts index f3ac6a899a..3db8a55abe 100644 --- a/packages/language-server/tests/inlayHints.spec.ts +++ b/packages/language-server/tests/inlayHints.spec.ts @@ -174,6 +174,22 @@ describe('Definitions', async () => { `); }); + it('#4720', async () => { + expect( + await requestInlayHintsResult('fixture.vue', 'vue', ` + + `) + ).toMatchInlineSnapshot(` + " + + " + `); + }); + const openedDocuments: TextDocument[] = []; afterEach(async () => { From 0e2db193fbd0dc1458455e9eaef9286642115c54 Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Mon, 26 Aug 2024 08:58:08 +0800 Subject: [PATCH 37/37] fix(language-core): tsNode.text is missing in tsc --- packages/language-core/lib/codegen/template/element.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/language-core/lib/codegen/template/element.ts b/packages/language-core/lib/codegen/template/element.ts index 255bb6139b..7cc1b213f2 100644 --- a/packages/language-core/lib/codegen/template/element.ts +++ b/packages/language-core/lib/codegen/template/element.ts @@ -15,6 +15,7 @@ import { generateInterpolation } from './interpolation'; import { generatePropertyAccess } from './propertyAccess'; import { generateTemplateChild } from './templateChild'; import { generateObjectProperty } from './objectProperty'; +import { getNodeText } from '../../parsers/scriptSetupRanges'; const colonReg = /:/g; @@ -726,10 +727,11 @@ function* generateReferencesForScopedCssClasses( } function walkIdentifier(node: ts.Identifier) { + const text = getNodeText(ts, node, ast); ctx.scopedClasses.push({ source: 'template', - className: node.text, - offset: node.end - node.text.length + startOffset + className: text, + offset: node.end - text.length + startOffset }); } }