Closed cztomsik closed 2 years ago
We use npmlog
so that our logs cleanly interweave with npm's own logs, and to respect npm's log level.
If there's an alternative, lighter package that does the same, I wouldn't mind swapping npmlog
. Although personally I have no problem with the number of dependencies (note btw that 20 of the 80 above are deduped).
Good point with deduping but there's still a lot of other deps.
And I see your reasoning but it feels hard to swallow. Testing process.env.npm_config_loglevel
is super easy and you don't seem to use any of the advanced npmlog
functionality - and I'd generally advise against as I'm not interested in colors, progress bars and whatever, I just want this to download prebuilt binary and that's it.
This has potential to be one of the most depended pkgs and it's important to keep deps low because otherwise the current situation is only going to get worse (npm i jest
is 1k pkgs now)
So, I don't have any drop-in replacement but I personally think you don't need it.
I'm not interested in a discussion about the merits of npm packages atm.
You are right that it's not actually doing that much. A PR is welcome to replace it, provided that you don't strip it down too much because re: "I just want this to download prebuilt binary and that's it", logs have proven themselves to be useful many times.
Sorry if that was offensive, it was not intentional. The whole point of this issue is that this project is advised as minimal and so I was very surprised by the actual number of deps.
That's fair. We called it "minimal" because prebuild-install
was split off from the larger prebuild
cli.
This has potential to be one of the most depended pkgs
I'm actually hoping it eventually dies out because there is a better alternative (zero deps).
Oh wow, that looks great! I will definitely have a better look.
But I'm not sure I can use it for my project - my extension is in rust and I'm building it myself, using custom node.js script (I need some codegen too) - and then the result is put into /target/
and I need this to be built on different platforms - so I've started experimenting with github actions which looks promising and I'm able to build all the binaries and the original idea was to put it into github releases but this indeed look better - I'm just not sure how to combine it. At first look it seems to be too much coupled to the C++ and gyp
(but the idea is very interesting!)
At first look it seems to be too much coupled to the C++ and gyp
Yeah, it is. Keeps the scope small and the code clean. You might be interested in this idea: https://github.com/prebuild/prebuildify/pull/7
@cztomsik You might want to take a peek at https://github.com/deltachat/deltachat-node , it's a node module for native code, but based on a lib that comes from the rust core module.
Hey, I love this effort but maybe we could replace
npmlog
with something lighter?And maybe we could improve it even further, I've just installed
keytar
and this is mynpm ls
(I only have one other dependency which is dep-free)BTW: I'd love to use
prebuild-install
myself (for various OSS projects) but there's no way I'd just splat there extra 80 deps. I'm currently usingnode-fetch
and so far it's enough for my case (it's just one dep and it can follow redirects and save to file stream) - just saying as something to think about.BTW2: I'm willing to help if you want to.