Skip to content

Commit 6bbd8e9

Browse files
authored
chore: switch to tinyglobby (#687)
1 parent d2c0822 commit 6bbd8e9

File tree

6 files changed

+34
-122
lines changed

6 files changed

+34
-122
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"@swc/core": "^1.13.3",
6666
"@swc/helpers": "^0.5.17",
6767
"clean-css": "^5.3.3",
68-
"fast-glob": "^3.3.3",
6968
"magic-string": "^0.30.17",
7069
"nanospinner": "^1.2.2",
7170
"picomatch": "^4.0.2",
@@ -74,6 +73,7 @@
7473
"rollup-plugin-dts": "^6.2.3",
7574
"rollup-plugin-swc3": "^0.11.1",
7675
"rollup-preserve-directives": "^1.1.3",
76+
"tinyglobby": "^0.2.14",
7777
"tslib": "^2.8.1",
7878
"yargs": "^17.7.2"
7979
},

pnpm-lock.yaml

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

src/entries.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { existsSync } from 'fs'
22
import fsp from 'fs/promises'
33
import path, { posix } from 'path'
4-
import { glob } from 'fast-glob'
4+
import { glob } from 'tinyglobby'
55
import { getExportTypeFromFile, type ParsedExportsInfo } from './exports'
66
import { PackageMetadata, type Entries, ExportPaths } from './types'
77
import { logger } from './logger'
@@ -302,6 +302,7 @@ export async function collectSourceEntriesByExportPath(
302302
const entryFiles = await glob(entryFilesPatterns, {
303303
cwd: dirPath,
304304
ignore: [PRIVATE_GLOB_PATTERN],
305+
expandDirectories: false,
305306
})
306307

307308
validateEntryFiles(entryFiles)
@@ -402,6 +403,7 @@ export async function collectSourceEntriesFromExportPaths(
402403
const privateFiles = await glob(privatePattern, {
403404
cwd: sourceFolderPath,
404405
ignore: [TESTS_GLOB_PATTERN],
406+
expandDirectories: false,
405407
})
406408

407409
for (const file of privateFiles) {

src/prepare/prepare-entries.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { existsSync } from 'fs'
2-
import { glob } from 'fast-glob'
2+
import { glob } from 'tinyglobby'
33
import {
44
BINARY_TAG,
55
PRIVATE_GLOB_PATTERN,
@@ -29,11 +29,13 @@ export async function collectSourceEntries(sourceFolderPath: string) {
2929
const binMatches = await glob(binPattern, {
3030
cwd: sourceFolderPath,
3131
ignore: [PRIVATE_GLOB_PATTERN, TESTS_GLOB_PATTERN], // ignore private entries
32+
expandDirectories: false,
3233
})
3334

3435
const srcMatches = await glob(srcPattern, {
3536
cwd: sourceFolderPath,
3637
ignore: [PRIVATE_GLOB_PATTERN, TESTS_GLOB_PATTERN], // ignore private entries
38+
expandDirectories: false,
3739
})
3840

3941
for (const file of binMatches) {

0 commit comments

Comments
 (0)