-
Notifications
You must be signed in to change notification settings - Fork 2
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
Cleanup of the Netlify CLI #156
Comments
Another suggestion: Some dev dependencies could be dropped too:
|
good issue 🙌 cc @sarahetter another interesting one to look at, but much bigger job, would be moving from express to something like polka (or another fast/light alternative) there's a few modern, lightweight node web servers floating around these days. using one could improve the dev server performance and overall CLI size i imagine |
shameless plug of tinyhttp, in case you need a smoother transition from express, rather than going hardcore with polka |
Seems like this PR is also related, it bumps a lot of deps and shrinks the lockfile heavily |
Moving to polka is quite easy. It's API compatible with express. You just have to be sure to use the version tagged with |
Also wanted to mention since this issue doesn't yet that the package we're talking about here is I wonder if it's necessary for it to depend on both fastify and express? |
depends on how they use it. If they use a lot of different request / response extensions, it's not that easy. If it's just res.send and res.json, then yes I agree it's better to move to Polka |
Hey all! Thanks for all your investigation here. I'm excited about the potential work & cleanup! ✨ For the immediate future hold off on submitting PRs as we're actively scoping out a larger project in the netlify-cli and don't want to have any throw-away work. I'll keep this issue updated when we have more information. |
Currently it has 107 direct dependencies, and many more non-direct. It's worth cleaning them up.
Modules that can be replaced with other modules:
chalk
->picocolors
(mainly a size win)find-up
-> empathic, -7 depsdot-prop
-> dlv + dset, might be that only one is neededexeca
-> tinyexecModules that can be removed in favor of 1-3 lines of code:
is-stream
p-filter
:p-map
, probably could be replaced withPromise.all
p-wait-for
:through2-filter
:from2-array
:tempy
->os.tmpdir()
+fs.createFile
/fs.mkdir
hasha
->crypto.createHash('sha512').digest()
PRs:
hasha
: chore(deps): remove hasha netlify/cli#7017The text was updated successfully, but these errors were encountered: