4 ms·
3425 lines in package-lock.json for a "Minimal URL shortener" https://github.com/nelsontky/gh-pages-url-shortener/blob/main/package-lock.json#L3425 https://git
by eeZah7Ux 6y ago
3425 lines in package-lock.json for a "Minimal URL shortener"
https://github.com/nelsontky/gh-pages-url-shortener/blob/main/package-lock.json#L3425 https://github.com/nelsontky/gh-pages-url-shortener/blob/mai...
- tjelen 6y agoAnd all that is just for being able to write `response = await fetch(...)` instead of `fetch(...).then(...)`.
- nelsontky 6y agoMy fault. Didn't know that ES2015 actually supported `.then()`. Anyway, this was also an exercise for me to learn about babel (I use CRA all the time so have no idea what is going on behind the scenes) and this was a nice intro!
- darkwater 6y agoI always wondered if relying so much on external libraries in the long run is more hassle to maintain than doing it by yourself. Security updates will be provided for X major version for a reasonable amount of time, but afterwards you will have to update, check that nothing breaks and update your code as well. Also some of the deps will break regardless of SemVer and you will need to update.
- wwwwwwwww 6y agoSadly, its a lost cause. The result is [left-pad](https://www.theregister.com/2016/03/23/npm_left_pad_chaos/ https://www.theregister.com/2016/03/23/npm_left_pad_chaos/).
- interactivecode 6y agoeven though this isn't really a constructive comment, most of that package-lock.json is build tools. If you remove those and only install production packages it's 27 lines: https://gist.github.com/StefKors/3b43896467d05cb1fb693ed0da94d500 https://gist.github.com/StefKors/3b43896467d05cb1fb693ed0da9...
- nelsontky 6y agoI figured that since the dependencies were only used in the build step it's not really considered. That being said, I didn't know ES2015 had `.then()` and was kinda trying out babel since I always used CRA and never knew what was going on behind the scenes. The dependencies were definitely not needed but in the production build, they aren't really "unminimal"