4 ms·
> The alternative is the npm hellscape where you have a package for "isOdd" and a package for "is even" that can break the entire ecosystem if the owner is disg
by preommr 2y ago
> The alternative is the npm hellscape where you have a package for "isOdd" and a package for "is even" that can break the entire ecosystem if the owner is disgruntled because everything depends on them.
This used to be true 5-10 years ago. The js ecosystem moves fast and much has been done to fix the dependency sprawl.
- dartos 2y agoI… don’t think that’s true. Just look at how many downloads some of those packages have today. Look at the dependency tree for a next or nuxt app. What the js world did is make their build systems somewhat sane, whatwith not needing babel in every project anymore.
- throwitaway1123 2y ago> Look at the dependency tree for a next Looks ok to me: https://npmgraph.js.org/?q=next https://npmgraph.js.org/?q=next Ironically, most of the dependencies are actually Rust crates used by swc and turbopack [1][2]. Try running `cargo tree` on either of those crates, it's enlightening to say the least. And of course, Node has a built in file watcher, and even the most popular third party package for file watching (Chokidar) has a single dependency [3]. [1] https://github.com/vercel/next.js/blob/07a55e03a31b16da1d0855f0309e2d8cf32e6113/Cargo.toml https://github.com/vercel/next.js/blob/07a55e03a31b16da1d085... [2] https://github.com/swc-project/swc/blob/b94a0e1fd2b900b05c5f18d3d993a74ff9cc6e7d/Cargo.toml https://github.com/swc-project/swc/blob/b94a0e1fd2b900b05c5f... [3] https://npmgraph.js.org/?q=chokidar https://npmgraph.js.org/?q=chokidar
- dartos 2y agoNot sure what npmgraph is doing exactly, but there are more dependencies than that. React is a dependency of every next application, but I don’t see it there. Maybe next, the singular package, has fewer dependencies than a project made with next.
- throwitaway1123 2y agoReact and react-dom are peer dependencies (npmgraph lists them but doesn't graph them visually). The actual full installation command is: `npm install next@latest react@latest react-dom@latest`[1]. Even if you include react and react-dom, the dependency graph still looks tolerable to me: https://npmgraph.js.org/?q=next%4014.2.13%2C+react%4018.3.1%2C+react-dom%4018.3.1 https://npmgraph.js.org/?q=next%4014.2.13%2C+react%4018.3.1%... [1] https://nextjs.org/docs/getting-started/installation#manual-installation https://nextjs.org/docs/getting-started/installation#manual-...