mapbox / node-pre-gyp

Node.js tool for easy binary deployment of C++ addons
BSD 3-Clause "New" or "Revised" License
1.1k stars 259 forks source link

Replace `npmlog` with `consola` #829

Open br0p0p opened 4 days ago

br0p0p commented 4 days ago

This PR replaces the deprecated and dependency-laden npmlog with a smaller, modern alternative: consola.

Module + Dependencies Size on Disk (Unpacked Size) Bundle size (minified)
npmlog 15 401 KB 65 KB
consola 1 222 KB 6 KB
𝛥 -14 (-93.3%) -179 KB (−44.63%) -59 KB (-90.7%)

This data was gathered from https://npmgraph.js.org/

Extrapolating based on the download stats for @mapbox/node-pre-gyp (5,730,435 downloads per week), this migration will have the following effects on the ecosystem as a whole:


I will note that the output looks slightly different with these changes. Happy to update if the new format is not great

Before

Screenshot 2024-07-02 at 9 15 09 AM

After

Screenshot 2024-07-02 at 9 15 39 AM
benmccann commented 2 days ago

@br0p0p would you be able to fix the merge conflict?

br0p0p commented 1 day ago

@benmccann done