Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace fast-glob with alternative in NextJS #37

Open
43081j opened this issue Apr 13, 2024 · 4 comments
Open

Replace fast-glob with alternative in NextJS #37

43081j opened this issue Apr 13, 2024 · 4 comments
Labels
needs first contact It is unclear if the maintainer of the repo is open for e18e

Comments

@43081j
Copy link
Collaborator

43081j commented Apr 13, 2024

fast-glob is used in a few places in nextjs. For example:

https://github.com/vercel/next.js/blob/7ef6c4eb17b92fac2a71f52c99a23a9794438c3a/packages/create-next-app/helpers/copy.ts#L25-L30

Two possible alternatives which are leaner and faster:

@styfle
Copy link

styfle commented Apr 16, 2024

It looks like glob will be built-in starting with Node.js 22 so that would be ideal

@43081j
Copy link
Collaborator Author

43081j commented Apr 17, 2024

it will be 🥳 though we don't know yet which versions will have it (i.e. will it be backported, and if so, how far?)

it probably isn't imminent so we could still get some gains meanwhile and move to the built-in later, though that decision is on each individual repo to make rather than us

@styfle
Copy link

styfle commented Apr 17, 2024

From my experience, every glob implementation is slightly different.

So its easier to make the change 1 time rather than multiple times with different packages using different implementations that may introduce breaking changes.

@43081j
Copy link
Collaborator Author

43081j commented Apr 18, 2024

From my experience, every glob implementation is slightly different.

So its easier to make the change 1 time rather than multiple times with different packages using different implementations that may introduce breaking changes.

true

i did run a pretty large test suite against fdir which people had already been running against fast-glob and all of them passed, that's partly why i settled on it

though if there's an option to move to the node built-in, i agree we 100% should. and if a maintainer doesn't want to have to move twice, we should wait

@43081j 43081j added the help wanted Extra attention is needed label Jun 23, 2024
@43081j 43081j changed the title Replace fast-glob with fdir in NextJS Replace fast-glob with alternative in NextJS Jun 29, 2024
@Fuzzyma Fuzzyma added needs first contact It is unclear if the maintainer of the repo is open for e18e and removed help wanted Extra attention is needed labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs first contact It is unclear if the maintainer of the repo is open for e18e
Projects
None yet
Development

No branches or pull requests

3 participants