Skip to content

Commit 2de6dd5

Browse files
committed
fix: Revert "refactor: replace globby with faster alternative (#1158)"
This reverts commit 0f0b4b2.
1 parent 6e66f29 commit 2de6dd5

5 files changed

Lines changed: 135 additions & 53 deletions

File tree

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@
5757
"debug": "^4.3.5",
5858
"esbuild": "^0.23.0",
5959
"execa": "^5.1.1",
60-
"fdir": "^6.1.1",
60+
"globby": "^11.1.0",
6161
"joycon": "^3.1.1",
6262
"picocolors": "^1.0.1",
63-
"picomatch": "^4.0.2",
6463
"postcss-load-config": "^6.0.1",
6564
"resolve-from": "^5.0.0",
6665
"rollup": "^4.19.0",
@@ -75,7 +74,6 @@
7574
"@types/debug": "4.1.12",
7675
"@types/fs-extra": "11.0.4",
7776
"@types/node": "20.14.11",
78-
"@types/picomatch": "^3.0.0",
7977
"@types/resolve": "1.20.6",
8078
"flat": "6.0.1",
8179
"fs-extra": "11.2.0",

pnpm-lock.yaml

Lines changed: 124 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import path from 'node:path'
22
import fs from 'node:fs'
33
import { Worker } from 'node:worker_threads'
4+
import glob from 'globby'
45
import { loadTsConfig } from 'bundle-require'
56
import execa from 'execa'
6-
import { fdir } from 'fdir'
7-
import picomatch from 'picomatch'
87
import kill from 'tree-kill'
98
import { version } from '../package.json'
109
import { PrettyError, handleError } from './errors'
@@ -119,12 +118,7 @@ const normalizeOptions = async (
119118
}
120119

121120
if (Array.isArray(entry)) {
122-
const matcher = picomatch(entry, { windows: process.platform === 'win32' })
123-
options.entry = await new fdir()
124-
.withRelativePaths()
125-
.filter((file) => matcher(file))
126-
.crawl(process.cwd())
127-
.withPromise()
121+
options.entry = await glob(entry)
128122
// Ensure entry exists
129123
if (!options.entry || options.entry.length === 0) {
130124
throw new PrettyError(`Cannot find ${entry}`)

0 commit comments

Comments
 (0)