diff --git a/.gitignore b/.gitignore index 7b42626d66..642e52a767 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ dist node_modules *.tsbuildinfo *.vsix +.idea .vscode-test-web extensions/*/meta.json extensions/*/stats.html diff --git a/packages/component-meta/lib/base.ts b/packages/component-meta/lib/base.ts index 33230b7eb6..12269a2b49 100644 --- a/packages/component-meta/lib/base.ts +++ b/packages/component-meta/lib/base.ts @@ -1,6 +1,6 @@ import { TypeScriptProjectHost, createLanguageServiceHost, resolveFileLanguageId } from '@volar/typescript'; import * as vue from '@vue/language-core'; -import { posix as path } from 'path-browserify'; +import { posix as path } from 'pathe'; import type * as ts from 'typescript'; import { code as typeHelpersCode } from 'vue-component-type-helpers'; import { code as vue2TypeHelpersCode } from 'vue-component-type-helpers/vue2'; diff --git a/packages/component-meta/package.json b/packages/component-meta/package.json index e598f5bc81..aab09b0c8b 100644 --- a/packages/component-meta/package.json +++ b/packages/component-meta/package.json @@ -15,7 +15,7 @@ "dependencies": { "@volar/typescript": "~2.4.11", "@vue/language-core": "3.0.0-alpha.4", - "path-browserify": "^1.0.1", + "pathe": "^2.0.3", "vue-component-type-helpers": "3.0.0-alpha.4" }, "peerDependencies": { @@ -27,7 +27,6 @@ } }, "devDependencies": { - "@types/node": "^22.10.4", - "@types/path-browserify": "^1.0.1" + "@types/node": "^22.10.4" } } diff --git a/packages/language-core/lib/codegen/script/componentSelf.ts b/packages/language-core/lib/codegen/script/componentSelf.ts index d778ceee46..f8ba424cb3 100644 --- a/packages/language-core/lib/codegen/script/componentSelf.ts +++ b/packages/language-core/lib/codegen/script/componentSelf.ts @@ -1,4 +1,4 @@ -import * as path from 'path-browserify'; +import path from 'pathe'; import type { Code } from '../../types'; import { codeFeatures } from '../codeFeatures'; import type { TemplateCodegenContext } from '../template/context'; diff --git a/packages/language-core/lib/codegen/script/index.ts b/packages/language-core/lib/codegen/script/index.ts index 74f7caa315..b778879511 100644 --- a/packages/language-core/lib/codegen/script/index.ts +++ b/packages/language-core/lib/codegen/script/index.ts @@ -1,4 +1,4 @@ -import * as path from 'path-browserify'; +import path from 'pathe'; import type * as ts from 'typescript'; import type { ScriptRanges } from '../../parsers/scriptRanges'; import type { ScriptSetupRanges } from '../../parsers/scriptSetupRanges'; diff --git a/packages/language-core/lib/plugins/vue-tsx.ts b/packages/language-core/lib/plugins/vue-tsx.ts index 7a3fb5d44d..2b558ee190 100644 --- a/packages/language-core/lib/plugins/vue-tsx.ts +++ b/packages/language-core/lib/plugins/vue-tsx.ts @@ -1,6 +1,6 @@ import { camelize, capitalize } from '@vue/shared'; import { computed } from 'alien-signals'; -import * as path from 'path-browserify'; +import path from 'pathe'; import { generateScript } from '../codegen/script'; import { generateTemplate } from '../codegen/template'; import { parseScriptRanges } from '../parsers/scriptRanges'; diff --git a/packages/language-core/lib/utils/ts.ts b/packages/language-core/lib/utils/ts.ts index 1b279fd26b..e8de2f33bb 100644 --- a/packages/language-core/lib/utils/ts.ts +++ b/packages/language-core/lib/utils/ts.ts @@ -1,5 +1,5 @@ import { camelize } from '@vue/shared'; -import { posix as path } from 'path-browserify'; +import { posix as path } from 'pathe'; import type * as ts from 'typescript'; import { generateGlobalTypes, getGlobalTypesFileName } from '../codegen/globalTypes'; import { getAllExtensions } from '../languagePlugin'; diff --git a/packages/language-core/package.json b/packages/language-core/package.json index 55f7582514..6f6858362d 100644 --- a/packages/language-core/package.json +++ b/packages/language-core/package.json @@ -20,12 +20,11 @@ "alien-signals": "^1.0.3", "minimatch": "^9.0.3", "muggle-string": "^0.4.1", - "path-browserify": "^1.0.1" + "pathe": "^2.0.3" }, "devDependencies": { "@types/minimatch": "^5.1.2", "@types/node": "^22.10.4", - "@types/path-browserify": "^1.0.1", "@volar/typescript": "~2.4.11", "@vue/compiler-sfc": "^3.5.0" }, diff --git a/packages/language-service/lib/plugins/vue-document-drop.ts b/packages/language-service/lib/plugins/vue-document-drop.ts index 605eeeeef6..b1aac0159a 100644 --- a/packages/language-service/lib/plugins/vue-document-drop.ts +++ b/packages/language-service/lib/plugins/vue-document-drop.ts @@ -1,6 +1,6 @@ import { VueVirtualCode, forEachEmbeddedCode } from '@vue/language-core'; import { camelize, capitalize, hyphenate } from '@vue/shared'; -import { posix as path } from 'path-browserify'; +import { posix as path } from 'pathe'; import { getUserPreferences } from 'volar-service-typescript/lib/configs/getUserPreferences'; import type * as vscode from 'vscode-languageserver-protocol'; import { URI } from 'vscode-uri'; diff --git a/packages/language-service/package.json b/packages/language-service/package.json index d45f22faa2..9153685240 100644 --- a/packages/language-service/package.json +++ b/packages/language-service/package.json @@ -25,7 +25,7 @@ "@vue/shared": "^3.5.0", "@vue/typescript-plugin": "3.0.0-alpha.4", "alien-signals": "^1.0.3", - "path-browserify": "^1.0.1", + "pathe": "^2.0.3", "volar-service-css": "0.0.64", "volar-service-emmet": "0.0.64", "volar-service-html": "0.0.64", @@ -41,7 +41,6 @@ }, "devDependencies": { "@types/node": "^22.10.4", - "@types/path-browserify": "^1.0.1", "@volar/kit": "~2.4.11", "vscode-languageserver-protocol": "^3.17.5" } diff --git a/packages/typescript-plugin/lib/requests/utils.ts b/packages/typescript-plugin/lib/requests/utils.ts index 2551ca2b99..d7d9cfb8c9 100644 --- a/packages/typescript-plugin/lib/requests/utils.ts +++ b/packages/typescript-plugin/lib/requests/utils.ts @@ -1,6 +1,6 @@ import type { VueVirtualCode } from '@vue/language-core'; import { camelize, capitalize } from '@vue/shared'; -import * as path from 'path-browserify'; +import path from 'pathe'; import type * as ts from 'typescript'; export function getComponentType( diff --git a/packages/typescript-plugin/package.json b/packages/typescript-plugin/package.json index 051209a126..ea331868f8 100644 --- a/packages/typescript-plugin/package.json +++ b/packages/typescript-plugin/package.json @@ -16,10 +16,9 @@ "@volar/typescript": "~2.4.11", "@vue/language-core": "3.0.0-alpha.4", "@vue/shared": "^3.5.0", - "path-browserify": "^1.0.1" + "pathe": "^2.0.3" }, "devDependencies": { - "@types/node": "^22.10.4", - "@types/path-browserify": "^1.0.1" + "@types/node": "^22.10.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff16e548df..a825dafc72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -83,9 +83,9 @@ importers: '@vue/language-core': specifier: 3.0.0-alpha.4 version: link:../language-core - path-browserify: - specifier: ^1.0.1 - version: 1.0.1 + pathe: + specifier: ^2.0.3 + version: 2.0.3 typescript: specifier: '*' version: 5.8.3 @@ -96,9 +96,6 @@ importers: '@types/node': specifier: ^22.10.4 version: 22.13.10 - '@types/path-browserify': - specifier: ^1.0.1 - version: 1.0.3 packages/component-type-helpers: {} @@ -125,9 +122,9 @@ importers: muggle-string: specifier: ^0.4.1 version: 0.4.1 - path-browserify: - specifier: ^1.0.1 - version: 1.0.1 + pathe: + specifier: ^2.0.3 + version: 2.0.3 typescript: specifier: '*' version: 5.8.3 @@ -138,9 +135,6 @@ importers: '@types/node': specifier: ^22.10.4 version: 22.13.10 - '@types/path-browserify': - specifier: ^1.0.1 - version: 1.0.3 '@volar/typescript': specifier: ~2.4.11 version: 2.4.12 @@ -224,9 +218,9 @@ importers: alien-signals: specifier: ^1.0.3 version: 1.0.4 - path-browserify: - specifier: ^1.0.1 - version: 1.0.1 + pathe: + specifier: ^2.0.3 + version: 2.0.3 volar-service-css: specifier: 0.0.64 version: 0.0.64(@volar/language-service@2.4.12) @@ -267,9 +261,6 @@ importers: '@types/node': specifier: ^22.10.4 version: 22.13.10 - '@types/path-browserify': - specifier: ^1.0.1 - version: 1.0.3 '@volar/kit': specifier: ~2.4.11 version: 2.4.12(typescript@5.9.0-dev.20250319) @@ -304,16 +295,13 @@ importers: '@vue/shared': specifier: ^3.5.0 version: 3.5.13 - path-browserify: - specifier: ^1.0.1 - version: 1.0.1 + pathe: + specifier: ^2.0.3 + version: 2.0.3 devDependencies: '@types/node': specifier: ^22.10.4 version: 22.13.10 - '@types/path-browserify': - specifier: ^1.0.1 - version: 1.0.3 test-workspace: devDependencies: @@ -1186,9 +1174,6 @@ packages: '@types/parse-path@7.0.3': resolution: {integrity: sha512-LriObC2+KYZD3FzCrgWGv/qufdUy4eXrxcLgQMfYXgPbLIecKIsVBaQgUPmxSSLcjmYbDTQbMgr6qr6l/eb7Bg==} - '@types/path-browserify@1.0.3': - resolution: {integrity: sha512-ZmHivEbNCBtAfcrFeBCiTjdIc2dey0l7oCGNGpSuRTy8jP6UVND7oUowlvDujBy8r2Hoa8bfFUOCiPWfmtkfxw==} - '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -2972,6 +2957,9 @@ packages: pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@2.0.3: + resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + pathval@2.0.0: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} @@ -4757,8 +4745,6 @@ snapshots: '@types/parse-path@7.0.3': {} - '@types/path-browserify@1.0.3': {} - '@types/semver@7.5.8': {} '@types/vscode@1.98.0': {} @@ -6777,6 +6763,8 @@ snapshots: pathe@1.1.2: {} + pathe@2.0.3: {} + pathval@2.0.0: {} pend@1.2.0: {}