Closed mlucool closed 5 years ago
Linking the same idea in a different package: https://github.com/opencollective/opencollective-postinstall/issues/8
The extra dependencies this adds (which are incompatible with other dependency versions) leaves an extremely bad taste in my mouth about this project.
I have made a project that ostensibly allows one to "opt out": https://github.com/ckknight/opencollective-cli
Thank you all for chiming here and offering solutions. Sorry about the trouble this has caused. So many edge cases.
We just published a very lightweight version that doesn't have any dependency: https://github.com/opencollective/opencollective-postinstall
Just replace in your package.json
the opencollective
dependency with opencollective-postinstall
and in scripts.postinstall
section, replace opencollective postinstall
with opencollective-postinstall
Let us know your thoughts and pull requests welcome!
This is a big step forward, especially since it no longer needs to connect home for stats. Still, I don't see how this fixes the ability to opt out or the fact this shown is once per thing that wants to advertise per install (instead of maybe one message that shows every link only at a given frequency).
Given that's it's just two lines in the log, is that really such a big issue? It would be much more complicated to record whether the user has already seen it (and I'd argue not worth it as it adds quite some complexity that could break on different environments as we've learned).
One improvement I could see is to not show it in CI environment. Want to take a stab at it?
@xdamman What do you think about https://github.com/opencollective/opencollective-postinstall/pull/9?
@xdamman This isn't two lines?
> opencollective postinstall
.,:;;:,.
..:;;;rrrrr;;:,.
..:;;rrrrrrrrrrrrrr;;:,.
.,:;;rrrrrrrrrsiisrrrrrrrrr;;:,.
:issrrrrrrsiiSSSSSSiisrrrrrrssi;
;SiiiiiiSSSSSSSSSSSSSSSSiiiSiiS;
;SS5222222255SSSSSS55222222255S;
;222222222222225522222222222222r
;222222222222222222222222222222r
;222222222222222222222222222222r
;222222222222222222222222222222r
;S22222222222222222222222222225r
,rrsi5222222222222222222225isrr:
,;;;;rrsi52222222222225Ssrr;;;;:
,;;;;;;;;rrsi522225Ssrr;;;;;;;;:
.::;;;;;;;;;;rrssrr;;;;;;;;;;::,
..,,::;;;;;;;;;;;;;;;;;;::,,..
..,,::;;;;;;;;;;::,,..
..,,::;;::,,..
..,,,.
Thanks for installing level 🙏
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 40
Number of backers: 5
Annual budget: US$ 216
Current balance: US$ 200
👉 Donate: https://opencollective.com/level/donate
At least obey npm's loglevel
if (["silent", "error", "warn"].indexOf(process.env.npm_config_loglevel) < 0) {
showPostInstall();
}
We recommend everyone to use thew new lightweight postinstall: https://github.com/opencollective/opencollective-postinstall
It does feature "Opt Out" when CI
or DISABLE_OPENCOLLECTIVE
is set.
As opencollective is more widely used, it has created an ethical dilemma. Inspiring people to donate to opensource and help grow their favorite projects is a good thing, but this is being used in ways which cause negative externalities including:
I am opening this thread in hope of finding a meaningful way balance encouraging people to donate and not causing them more pain to use great open source software.
I have proposed a
NODE_NO_SUPPORT_MESSAGE=true
(needs a better name) when seeing projects do this vianode -e
as well (https://github.com/remy/nodemon/issues/1299). In addition, maybe libraries should make use of optionalDependencies instead of dependencies for this tool (example). Any method to allow for opt out would be greatly appreciated.Again, I want to be clear that I think using economics to motivate and fund OSS is a worthwhile idea, but we should be careful about creating pain along the way.