diff --git a/package.json b/package.json index ff164572..e93af060 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,6 @@ "chalk": "^4.1.1", "cross-env": "^7.0.3", "execa": "^5.1.1", - "fast-glob": "^3.2.7", "fast-json-stable-stringify": "^2.1.0", "fs-extra": "^11.1.0", "klaw": "^4.0.1", @@ -65,6 +64,7 @@ "sort-package-json": "^2.10.0", "strip-ansi": "^7.0.0", "tiny-invariant": "^1.1.0", + "tinyglobby": "^0.2.10", "typescript": "^5.5.3", "vite": "^5.3.2", "vite-plugin-checker": "workspace:*", diff --git a/packages/vite-plugin-checker/package.json b/packages/vite-plugin-checker/package.json index a6ad9665..b6909d09 100644 --- a/packages/vite-plugin-checker/package.json +++ b/packages/vite-plugin-checker/package.json @@ -41,11 +41,11 @@ "chalk": "^4.1.1", "chokidar": "^3.5.1", "commander": "^8.0.0", - "fast-glob": "^3.2.7", "fs-extra": "^11.1.0", "npm-run-path": "^4.0.1", "strip-ansi": "^6.0.0", "tiny-invariant": "^1.1.0", + "tinyglobby": "^0.2.10", "vscode-languageclient": "^7.0.0", "vscode-languageserver": "^7.0.0", "vscode-languageserver-textdocument": "^1.0.1", diff --git a/packages/vite-plugin-checker/src/checkers/vls/diagnostics.ts b/packages/vite-plugin-checker/src/checkers/vls/diagnostics.ts index 4cfbefd4..34a0926d 100644 --- a/packages/vite-plugin-checker/src/checkers/vls/diagnostics.ts +++ b/packages/vite-plugin-checker/src/checkers/vls/diagnostics.ts @@ -4,7 +4,7 @@ import path from 'node:path' import { Duplex } from 'node:stream' import chalk from 'chalk' import chokidar from 'chokidar' -import glob from 'fast-glob' +import { globSync } from 'tinyglobby' import { VLS } from 'vls' import type { TextDocument } from 'vscode-languageserver-textdocument' import { @@ -254,7 +254,7 @@ async function getDiagnostics( options, ) - const files = glob.sync([...watchedDidChangeContentGlob], { + const files = globSync([...watchedDidChangeContentGlob], { cwd: workspaceUri.fsPath, ignore: ['node_modules/**'], }) diff --git a/playground/vitestGlobalSetup.ts b/playground/vitestGlobalSetup.ts index eb2150ea..63b97187 100644 --- a/playground/vitestGlobalSetup.ts +++ b/playground/vitestGlobalSetup.ts @@ -1,7 +1,7 @@ import fs from 'fs-extra' import os from 'node:os' import path from 'node:path' -import glob from 'fast-glob' +import { glob } from 'tinyglobby' import { chromium } from 'playwright-chromium' import type { BrowserServer } from 'playwright-chromium' diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c036e22d..8c114ed0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,9 +61,6 @@ importers: execa: specifier: ^5.1.1 version: 5.1.1 - fast-glob: - specifier: ^3.2.7 - version: 3.3.2 fast-json-stable-stringify: specifier: ^2.1.0 version: 2.1.0 @@ -109,6 +106,9 @@ importers: tiny-invariant: specifier: ^1.1.0 version: 1.3.3 + tinyglobby: + specifier: ^0.2.10 + version: 0.2.10 typescript: specifier: ^5.5.3 version: 5.5.3 @@ -175,9 +175,6 @@ importers: commander: specifier: ^8.0.0 version: 8.3.0 - fast-glob: - specifier: ^3.2.7 - version: 3.3.2 fs-extra: specifier: ^11.1.0 version: 11.2.0 @@ -190,6 +187,9 @@ importers: tiny-invariant: specifier: ^1.1.0 version: 1.3.3 + tinyglobby: + specifier: ^0.2.10 + version: 0.2.10 vscode-languageclient: specifier: ^7.0.0 version: 7.0.0 @@ -898,7 +898,7 @@ importers: version: 0.12.2(vite@5.3.2(@types/node@15.14.9)(sass@1.77.6)) vite-plugin-vue2: specifier: ^1.9.0 - version: 1.9.3(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.3.2(@types/node@15.14.9)(sass@1.77.6))(vue-template-compiler@2.7.16)(vue@2.7.16) + version: 1.9.3(lodash@4.17.21)(vite@5.3.2(@types/node@15.14.9)(sass@1.77.6))(vue-template-compiler@2.7.16)(vue@2.7.16) vls: specifier: ^0.8.5 version: 0.8.5 @@ -3384,6 +3384,14 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -4271,6 +4279,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pidtree@0.5.0: resolution: {integrity: sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA==} engines: {node: '>=0.10'} @@ -4823,6 +4835,10 @@ packages: tinybench@2.8.0: resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + tinypool@0.8.4: resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} @@ -6738,9 +6754,9 @@ snapshots: de-indent: 1.0.2 he: 1.2.0 - '@vue/component-compiler-utils@3.3.0(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@vue/component-compiler-utils@3.3.0(lodash@4.17.21)': dependencies: - consolidate: 0.15.1(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + consolidate: 0.15.1(lodash@4.17.21) hash-sum: 1.0.2 lru-cache: 4.1.5 merge-source-map: 1.1.0 @@ -7218,21 +7234,17 @@ snapshots: confbox@0.1.7: {} - consolidate@0.15.1(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + consolidate@0.15.1(lodash@4.17.21): dependencies: bluebird: 3.7.2 optionalDependencies: lodash: 4.17.21 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - consolidate@0.16.0(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + consolidate@0.16.0(lodash@4.17.21): dependencies: bluebird: 3.7.2 optionalDependencies: lodash: 4.17.21 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) content-disposition@0.5.4: dependencies: @@ -7789,6 +7801,10 @@ snapshots: dependencies: reusify: 1.0.4 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 @@ -8609,6 +8625,8 @@ snapshots: picomatch@2.3.1: {} + picomatch@4.0.2: {} + pidtree@0.5.0: {} pify@4.0.1: {} @@ -9186,6 +9204,11 @@ snapshots: tinybench@2.8.0: {} + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + tinypool@0.8.4: {} tinyspy@2.2.1: {} @@ -9363,7 +9386,7 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue2@1.9.3(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(vite@5.3.2(@types/node@15.14.9)(sass@1.77.6))(vue-template-compiler@2.7.16)(vue@2.7.16): + vite-plugin-vue2@1.9.3(lodash@4.17.21)(vite@5.3.2(@types/node@15.14.9)(sass@1.77.6))(vue-template-compiler@2.7.16)(vue@2.7.16): dependencies: '@babel/core': 7.24.7 '@babel/parser': 7.24.7 @@ -9373,8 +9396,8 @@ snapshots: '@rollup/pluginutils': 4.2.1 '@vue/babel-helper-vue-jsx-merge-props': 1.4.0 '@vue/babel-preset-jsx': 1.4.0(@babel/core@7.24.7)(vue@2.7.16) - '@vue/component-compiler-utils': 3.3.0(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - consolidate: 0.16.0(lodash@4.17.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@vue/component-compiler-utils': 3.3.0(lodash@4.17.21) + consolidate: 0.16.0(lodash@4.17.21) debug: 4.3.5(supports-color@8.1.1) fs-extra: 9.1.0 hash-sum: 2.0.0