Skip to content

Commit

Permalink
chore: replace tinyglobby with fast-glob
Browse files Browse the repository at this point in the history
  • Loading branch information
kricsleo committed Jan 14, 2025
1 parent 71bc6a0 commit 89ab342
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"@swc/core": "^1.10.7",
"@swc/helpers": "^0.5.11",
"clean-css": "^5.3.3",
"fast-glob": "^3.3.3",
"magic-string": "^0.30.17",
"ora": "^8.0.1",
"picomatch": "^4.0.2",
Expand All @@ -74,7 +75,6 @@
"rollup-plugin-dts": "^6.1.1",
"rollup-plugin-swc3": "^0.11.1",
"rollup-preserve-directives": "^1.1.3",
"tinyglobby": "^0.2.10",
"tslib": "^2.8.1",
"yargs": "^17.7.2"
},
Expand Down
141 changes: 117 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/entries.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { existsSync } from 'fs'
import fsp from 'fs/promises'
import path, { posix } from 'path'
import { glob } from 'tinyglobby'
import { glob } from 'fast-glob'
import { getExportTypeFromFile, type ParsedExportsInfo } from './exports'
import { PackageMetadata, type Entries, ExportPaths } from './types'
import { logger } from './logger'
Expand Down Expand Up @@ -302,7 +302,7 @@ export async function collectSourceEntriesByExportPath(

const entryFiles = await glob(entryFilesPatterns, {
cwd: dirPath,
ignore: PRIVATE_GLOB_PATTERN,
ignore: [PRIVATE_GLOB_PATTERN],
})

validateEntryFiles(entryFiles)
Expand Down Expand Up @@ -402,7 +402,7 @@ export async function collectSourceEntriesFromExportPaths(
const privatePattern = `**/_*{,/*}{,{.${suffixPattern}}}.{${extPattern}}`
const privateFiles = await glob(privatePattern, {
cwd: sourceFolderPath,
ignore: TESTS_GLOB_PATTERN,
ignore: [TESTS_GLOB_PATTERN],
})

for (const file of privateFiles) {
Expand Down
2 changes: 1 addition & 1 deletion src/prepare/prepare-entries.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { existsSync } from 'fs'
import { glob } from 'tinyglobby'
import { glob } from 'fast-glob'
import {
BINARY_TAG,
PRIVATE_GLOB_PATTERN,
Expand Down
Loading

0 comments on commit 89ab342

Please sign in to comment.