SukkaW / nolyfill

Speed up your package installation process, reduce your disk usage, and extend the lifespan of your precious SSD.
MIT License
1.11k stars 15 forks source link

[Feature Request] `rimraf` #60

Open wojtekmaj opened 9 months ago

wojtekmaj commented 9 months ago

In Node.js v14.14.0, fs.rm and fs.rmSync was added. It's a built-in module that removes files and directories. The recursive option is used to remove directories and their contents.

rimraf is still WIDELY used, for no apparent reason.

Each copy takes a whopping 3.38 MB.

SukkaW commented 9 months ago

rimraf itself is only 271 KiB. The main culprit is the glob package (which is minipass-based).

wojtekmaj commented 9 months ago

In my opinion, it doesn't matter which package is at fault. At the end of the day, all that matters is that installing rimraf adds 4 MB to your node_modules, and it does have a native replacement.

mary-ext commented 5 months ago

Does Nolyfill do a compatibility check? With Node.js supporting fs.glob and fs.globSync now it might be worth doing this.

Could also look into tackling https://github.com/SukkaW/nolyfill/issues/59 for when ESM-CJS sync interop becomes stable

alex-kinokon commented 3 months ago

For the record, they will not be dropping glob any time soon.