Skip to content

Update chokidar to v4 #5368

Open
Open
@Fuzzyma

Description

@Fuzzyma

Bug report

This is not a bug report but I didn't know where to put it.
I would like to propose updating chokidar to v4. This would reduce the dependency count by 11 and also improves typing.
I am opening this issue as part of the ecosystem cleanup initiative (https://e18e.dev). We are trying to modernize the ecosystem by reducing dependency bloat, package size or improve speed.

If you are open for this, I would be happy to create a PR and do the necessary changes!

Actual Behavior

Expected Behavior

How Do We Reproduce?

Please paste the results of npx webpack-cli info here, and mention other relevant information

Activity

alexander-akait

alexander-akait commented on Dec 5, 2024

@alexander-akait
Member

@Fuzzyma I am afraid we can't do it right now, due - https://github.com/paulmillr/chokidar/releases/tag/4.0.0

Remove glob support

It will be breaking change for us

Fuzzyma

Fuzzyma commented on Dec 5, 2024

@Fuzzyma
Author

Ah I see. I actually faced the same problem over at tailwindcss. One community member (@talentlessguy) suggested this solution:

chokidar.watch(paths.map(p => isGlob(p) ? tinyglobby(p) : p))

Would that maybe work?

alexander-akait

alexander-akait commented on Dec 5, 2024

@alexander-akait
Member

@Fuzzyma This can work, need to test if it will work with creating nested directories, but I think it should

benmccann

benmccann commented on Dec 5, 2024

@benmccann

It should work. One more suggestion: you can replace isGlob with isDynamicPattern from tinyglobby, so that you don't need an additional library for that

Fuzzyma

Fuzzyma commented on Dec 7, 2024

@Fuzzyma
Author

When looking into this I hit a blocker with chokidar and would like to wait for the resolution before I put more work into it.

// EDIT:

Ok, with the fix that I proposed to chokidar I made it work. If the change to chokidar is not accepted I need to add a small workaround. Will create a PR for review tomorrow

linked a pull request that will close this issue on Dec 8, 2024
Anubhab2003

Anubhab2003 commented on Jan 3, 2025

@Anubhab2003

Hey I am Interested in this issue, How to get started

Fuzzyma

Fuzzyma commented on Jan 3, 2025

@Fuzzyma
Author

@Anubhab2003 a pr already exists and is ready to be merged. Nothing to do here :D

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Update chokidar to v4 · Issue #5368 · webpack/webpack-dev-server