Skip to content

Commit

Permalink
chore: switch to tinyglobby (#330)
Browse files Browse the repository at this point in the history
* chore: switch to tinyglobby

* chore: update lockfile

* chore: make eslint happy

* chore: yarn dedupe

---------

Co-authored-by: SukkaW <[email protected]>
  • Loading branch information
benmccann and SukkaW authored Dec 15, 2024
1 parent d1807bd commit 0fd4eea
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 206 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
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ 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 { 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
import { globSync } from 'tinyglobby'

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- esmodule interop
const stableHash = stableHashExports.default || stableHashExports
Expand Down Expand Up @@ -393,7 +391,9 @@ 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
Loading

0 comments on commit 0fd4eea

Please sign in to comment.