postcss-cli icon indicating copy to clipboard operation
postcss-cli copied to clipboard

chore!: upgrade chokidar to v4

Open hyperz111 opened this issue 1 month ago • 8 comments

Like #501, but to v4. chokidar version 4 and up now only have 1 dependency, which is can make the install size is smaller and faster. But if you want to v5 like #501, we must drop Nodejs v18 and only support v20.19.

hyperz111 avatar Dec 09 '25 05:12 hyperz111

cc @ai

hyperz111 avatar Dec 09 '25 05:12 hyperz111

cc @RyanZim

hyperz111 avatar Dec 09 '25 12:12 hyperz111

Is there some pressing need to upgrade from v3? If not, we might as well wait until we're working on the next major release, and then upgrade to v5 directly.

RyanZim avatar Dec 09 '25 22:12 RyanZim

Is there some pressing need to upgrade from v3? If not, we might as well wait until we're working on the next major release, and then upgrade to v5 directly.

They have remove the glob support, but we have handle it in first .then using tinyglobby. Maybe we just should upgrade the package.

hyperz111 avatar Dec 09 '25 22:12 hyperz111

Seems that the removal of glob support actually breaks things; tests are failing.

RyanZim avatar Dec 10 '25 15:12 RyanZim

@RyanZim, i send the commit that i want to try in CI.

hyperz111 avatar Dec 11 '25 06:12 hyperz111

@RyanZim, all tests run successfully 🥳

hyperz111 avatar Dec 11 '25 07:12 hyperz111

Two problems with this approach:

  1. It's synchronous, which is probably slow.
  2. This only finds files that exist when the command is run, it doesn't watch for the creation of new files. Actually solving this problem correctly is going to be complicated; I need to think this through.

RyanZim avatar Dec 12 '25 20:12 RyanZim

Maybe close this @RyanZim?

hyperz111 avatar Dec 23 '25 08:12 hyperz111