Skip to content

Commit

Permalink
chore: switch to tinyglobby
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Dec 14, 2024
1 parent d1807bd commit 8cf2213
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"@nolyfill/is-core-module": "1.0.39",
"debug": "^4.3.7",
"enhanced-resolve": "^5.15.0",
"fast-glob": "^3.3.2",
"get-tsconfig": "^4.7.5",
"is-bun-module": "^1.0.2",
"is-glob": "^4.0.3",
"stable-hash": "^0.0.4"
"stable-hash": "^0.0.4",
"tinyglobby": "^0.2.10"
},
"devDependencies": {
"@1stg/eslint-config": "7",
Expand Down
9 changes: 5 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ import isNodeCoreModule from '@nolyfill/is-core-module'
import debug from 'debug'
import type { FileSystem, ResolveOptions, Resolver } from 'enhanced-resolve'
import enhancedResolve from 'enhanced-resolve'
import fg from 'fast-glob'
import { globSync } from 'tinyglobby'
import { createPathsMatcher, getTsconfig } from 'get-tsconfig'
import type { TsConfigResult } from 'get-tsconfig'
import type { Version } from 'is-bun-module'
import { isBunModule } from 'is-bun-module'
import isGlob from 'is-glob'
import stableHashExports from 'stable-hash'

const { globSync } = fg

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- esmodule interop
const stableHash = stableHashExports.default || stableHashExports

Expand Down Expand Up @@ -393,7 +391,10 @@ function initMappers(options: InternalResolverOptions) {
const projectPaths = [
...new Set([
...configPaths.filter(path => !isGlob(path)),
...globSync([...configPaths.filter(path => isGlob(path)), ...ignore]),
...globSync(
[...configPaths.filter(path => isGlob(path)), ...ignore],
{ expandDirectories: false }
),
]),
]

Expand Down

0 comments on commit 8cf2213

Please sign in to comment.