-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Leaner Dependencies #223
Comments
Regarding cross-spawn, there’s also this: lydell/elm-watch#66. The key here is that we only need to support spawning the different elm tools, not stuff in general, which makes the problem space much smaller. Basically, the approach is to first try to spawn |
cross-spawn, glob and chalk are also used in node-test-runner. I think there is a big overlap in users between node-test-runner and elm-review, so for the dependencies to actually get leaner for many people, we need to make upgrades there as well (which I have nothing against, I love fewer dependencies, the only road block is fear of breakage). |
Hmm. You know, maybe a package just for spawning elm tools would be useful. It'd be lean b/c we know what we need to support, and could cut down on size, though not on deps #s. Then, node-elm-review, elm-watch, elm-test (, elm pages?), etc, could use it, and then npm would dedupe them. There's probably a few different deps for this between those packages. elm-optimize-level2 is in js. So's elm-coverage. Probably quite a few others. I'm not saying anything concrete here, but maybe we could all standardize our deps. I mean, there's node-elm-compiler vendored here, we could upstream some, etc. Get elm-doc-preview up to date. I think there were some peers conflicts there. Etc. You shouldn't need a ton in node_modules to create solid elm apps. Related: #136 (would actually increase size, I think, but that's a reason to make it smaller 🤷♂️).
I would think that there's probably a good deal of duplication. If this is actually going to help, it'd probably have more impact in elm-test (as elm-review is probably elss used).
Yeah. Maybe once I finish types here, I could go work on elm-test for a while. Switch to TS, drop some deps, etc. |
I don't know if you've seen the e18e initiative/project, which aims to reduce the dependencies of the npm ecosystem. I just saw that they have an ESLint plugin, which reports that we could replace rimraf quite easily: https://github.com/es-tooling/module-replacements/blob/main/docs/modules/rimraf.md For globby, they suggested replacing it by I have never heard of picocolors, we could check it out yes. |
I'd seen it a few weeks ago, and it popped up yesterday, which is where I got the idea to swap out chalk.
Hmm. Ok, I'll take a look at those replacements a bit closer later. |
just my two cents:
|
Nice, thanks for that!
We still support 14, and isn't fetch under a flag until 21? |
nope, fetch was added in like 17 point something and unflagged in 18.0.0 https://nodejs.org/en/blog/announcements/v18-release-announce#fetch-experimental |
Ah, I see. It was experimental, but not under a flag. I think we try not to use even unflagged experimental APIs, but that's good to know nonetheless, thanks! |
Execa has no known bugs. It's more likely
I recommend reading this: https://github.com/chalk/chalk#why-not-switch-to-a-smaller-coloring-package |
I thought there were some, looks like I was wrong there.
I did. I still think chalk wouldn't be deduped, we're still on an ancient version because this is CJS. I primarily want to drop Footnotes
|
In addition, your comment in the Chalk readme that
is correct, but misses the point. It's not that the
Amen. that's why this is far down on this list over at #169. I don't expect a major difference, so I'm not prioritizing it. Signing off, @lishaduck. I assume you're just global searching for Picocolors (or e18e), so I don't expect you to read this, but I wanted to clarify the goal of this issue anyway. If you do read this, I hope there are no hard feelings. I admire your work. |
@jfmengels, do we actually depend on uglify-js? I realized we don't use it anywhere. |
node-
)glob
,globby
, and (as a dependency ofglobby
)fast-glob
. We ought to switch totinyglobby
node-fetch-native
is much leaner thannode-fetch
(though we usegot
, don't we?), and defaults to native fetch in Node 21+We're also using cross-spawn, many projects switched to Execa a while back, but because it's ESM-only and has some longstanding bugs, I recently saw a few projects switch to(@jsdevtools/ez-spawn
as a smaller, faster, and more correct CommonJS-compatible cross-spawn/Execacross-spawn
is actually smaller, nevermind);tinyexec
is smaller though.e18e reccomends moving offora
in favor ofnanospinner
; Sindre says it copies parts of ora's deps in violation of the MIT license though (Does not adhere to license usmanyunusov/nanospinner#29), so I wouldn't.cp
stabilization)rm
overrimraf
Globbing's been been on the todo list for a bit, so figured I'd file an issue.
The text was updated successfully, but these errors were encountered: