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

Update chokidar to v3 #87

Open
polarathene opened this issue Jun 22, 2020 · 3 comments
Open

Update chokidar to v3 #87

polarathene opened this issue Jun 22, 2020 · 3 comments

Comments

@polarathene
Copy link

Presently results in a warning about breakage on node v14 installs.

warning gatsby > babel-plugin-add-module-exports > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning gatsby > babel-plugin-add-module-exports > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

Benefits by the maintainer are mentioned here:

We've released Chokidar 3 in April. See my post on that: Chokidar 3: How to save 32TB of traffic every week with one NPM package

The changes are pretty big. First of all, the package is 16 times smaller and uses 15 dependencies instead of 201. We've switched to n-api, which means users won't download fsevents binaries anymore. n-api is included in every nodejs installation, and it's tiny. Directory walking has been improved massively with stream implementation of readdirp. Massive RAM & CPU improvements etc.

@ljharb
Copy link

ljharb commented Jun 22, 2020

I’m not sure why chokidar is a direct optional dep at all.

@polarathene
Copy link
Author

@ljharb it was originally in the devDependencies prior to 1.0.0 it seems. But even then I don't see any usage of it. optionalDependencies is meant to be used for allowing a package to install correctly, even if an optional dependency fails to install(I'm guessing due to those fsevent errors/warnings?).

If it's really not needed for the package, then yeah, it probably should be removed..

@ljharb
Copy link

ljharb commented Jun 23, 2020

Right, but optionalDeps is part of the API of a package - there's no such thing as optional dev deps.

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 a pull request may close this issue.

2 participants