-
-
Notifications
You must be signed in to change notification settings - Fork 26
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. |
Oh, tinyglobby doesn't (actually) support Node v14, it seems: thecodrr/fdir#116 😞 |
tinyglobby tries to support node >=12, as fdir doesn't use any node 14 exclusive features, but i don't run tests on node 12 due to test runner incompatibilities (fdir doesn't either for the same reason iirc). can you check? |
Our tests run on 16, not 14, which is why I asked. I'll see if I can get them to run on 14 though. |
@SuperchupuDev, you'll be pleased to hear that it workses! |
@jfmengels, what's your policy wrt experimental features? E.g., if |
@lishaduck If the feature works well in the versions I support, then I'm okay with using them if they stabilized later. I would only be worried that they didn't work as well in earlier versions we intend to support, but if they work well, I'm fine with that. |
👍 (#120 should be easy-peasy then!)
Yeah. If they don't work well, we'd need to polyfill it, and at that point, just use the library.
I personally wouldn't want to be to blame if something breaks, so I wasn't planning on it. |
node-
)glob
,globby
, and (as a dependency ofglobby
)fast-glob
. We ought to switch totinyglobby
globby
withtinyglobby
glob
withtinnyglobby
node-fetch-native
is much leaner thannode-fetch
(though we usegot
, don't we?), and defaults to native fetch in Node 21+cross-spawn
, e18e reccomendstinyexec
insteadora
in favor ofnanospinner
rm
overrimraf
uglify-js
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: