Skip to content

Commit c321a3f

Browse files
chore: replace fast-glob with tinyglobby (#6274)
1 parent 0282564 commit c321a3f

File tree

16 files changed

+69
-402
lines changed

16 files changed

+69
-402
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"@vite-pwa/assets-generator": "^0.2.4",
2626
"@vite-pwa/vitepress": "^0.5.0",
2727
"@vitejs/plugin-vue": "^5.1.2",
28-
"fast-glob": "^3.3.2",
2928
"https-localhost": "^4.7.1",
29+
"tinyglobby": "^0.2.5",
3030
"unocss": "^0.62.0",
3131
"unplugin-vue-components": "^0.27.4",
3232
"vite": "^5.2.8",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@
5252
"changelogithub": "^0.13.9",
5353
"esbuild": "^0.23.0",
5454
"eslint": "^9.9.0",
55-
"fast-glob": "^3.3.2",
5655
"magic-string": "^0.30.11",
5756
"pathe": "^1.1.2",
5857
"rimraf": "^6.0.1",
5958
"rollup": "^4.20.0",
6059
"rollup-plugin-dts": "^6.1.1",
6160
"rollup-plugin-esbuild": "^6.1.1",
6261
"rollup-plugin-license": "^3.5.2",
62+
"tinyglobby": "^0.2.5",
6363
"tsx": "^4.17.0",
6464
"typescript": "^5.5.4",
6565
"vite": "^5.4.0",

packages/browser/src/client/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { fileURLToPath } from 'node:url'
22
import fs from 'node:fs'
33
import { defineConfig } from 'vite'
44
import { resolve } from 'pathe'
5-
import fg from 'fast-glob'
5+
import { globSync } from 'tinyglobby'
66

77
export default defineConfig({
88
server: {
@@ -51,7 +51,7 @@ export default defineConfig({
5151
await waitFor(() => fs.existsSync(ui))
5252
clearTimeout(timeout)
5353

54-
const files = fg.sync('**/*', { cwd: ui })
54+
const files = globSync(['**/*'], { cwd: ui, expandDirectories: false })
5555

5656
if (fs.existsSync(browser)) {
5757
fs.rmSync(browser, { recursive: true })

packages/ui/node/reporter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { fileURLToPath } from 'node:url'
33
import { promisify } from 'node:util'
44
import { gzip, constants as zlibConstants } from 'node:zlib'
55
import { basename, dirname, relative, resolve } from 'pathe'
6+
import { globSync } from 'tinyglobby'
67
import c from 'tinyrainbow'
7-
import fg from 'fast-glob'
88
import { stringify } from 'flatted'
99
import type {
1010
File,
@@ -111,7 +111,7 @@ export default class HTMLReporter implements Reporter {
111111
await fs.writeFile(metaFile, data, 'base64')
112112
const ui = resolve(distDir, 'client')
113113
// copy ui
114-
const files = fg.sync('**/*', { cwd: ui })
114+
const files = globSync(['**/*'], { cwd: ui, expandDirectories: false })
115115
await Promise.all(
116116
files.map(async (f) => {
117117
if (f === 'index.html') {

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848
},
4949
"dependencies": {
5050
"@vitest/utils": "workspace:*",
51-
"fast-glob": "^3.3.2",
5251
"fflate": "^0.8.2",
5352
"flatted": "^3.3.1",
5453
"pathe": "^1.1.2",
5554
"sirv": "^2.0.4",
55+
"tinyglobby": "^0.2.5",
5656
"tinyrainbow": "^1.2.0"
5757
},
5858
"devDependencies": {

0 commit comments

Comments
 (0)