Skip to content

refactor: replace tinyglobby dependency#226

Open
danielbayley wants to merge 1 commit intoantfu-collective:mainfrom
danielbayley:reduce-deps-glob
Open

refactor: replace tinyglobby dependency#226
danielbayley wants to merge 1 commit intoantfu-collective:mainfrom
danielbayley:reduce-deps-glob

Conversation

@danielbayley
Copy link
Contributor

Description

Replaces unnecessary dependency on tinyglobby with built-in Node fs.promises.glob.

@userquin
Copy link
Member

userquin commented Nov 2, 2025

From the docs here https://nodejs.org/api/fs.html#fspromisesglobpattern-options will require Node 22, this is breaking, what happens with Node 20 support?

exclude: DEFAULT_IGNORE_PATHS.concat(options.ignorePaths || []),
cwd,
withFileTypes: true,
}))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot be done with await Promise.all or move it to async generator (to be consumed via for await loop)? this way we can also apply the filter in the async function*

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iirc we also have a PR at fsdir to add aynsc generator support (being used by tinyglobby)

@userquin
Copy link
Member

userquin commented Nov 2, 2025

tinygloby using picomatch, how about glob/pattern compatibility? exclude can be also a function whereas at tinyglobby can be only string | string[] (ignore): https://github.com/SuperchupuDev/tinyglobby/blob/main/src/types.ts#L95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants