So this is not strictly about sinon functionality therefor I am not going to use the template.
I have never seen a package actively ask for donations via a postinstall script, this is not exactly malicious but I don't think this is appropriate use of postinstall either as it also unnecessarily slows down installs...
It slows down your install time by something like a few milliseconds. We think that’s totally reasonable. We‘re not the only ones doing this. We also ask for donations on our website and in the readme.
@mantoni I empathize with the motivation to introduce the postinstall message: y'all deserve to be compensated for the time you spend on the project, and I appreciate the need to find ways to ask users to contribute.
However I'm not sure the impact is as low as you think, especially when you consider scaling. A typical npm tree contains thousands of packages. What if many packages start doing this?
I timed the postinstall script at ~80ms (starting a node process isn't free), which is negligible on its own, but it would only take 10 packages doing this to add ~1s to every local and CI install.
More importantly, npm install currently produces a useful log of lifecycle scripts and a tree summary. Even if _only_ sinon's 14 (incl. transitive) dependencies included similar messages, sinon's own message would be lost in the noise -- defeating the purpose of it -- and it would be way less clear to users what actually happened in the lifecycle stage.
So I feel like this kind of solution, at best, only works briefly for the first few packages that do it, and then results in a worse ecosystem overall. To be clear, I'm not saying that you should work for free, and I'm happy that OSS revenue solutions are starting to pop up (npx thanks, Open Collective, etc.) I just don't think a postinstall script is a good medium. I understand if you disagree. ❤️
The postinstall script was implemented by me as an experiment to try to drive more donations to our Open Collective.
It’s inspired by (imitating) Remy’s strategy for nodemon: https://remysharp.com/2018/01/10/open-source-with-a-cap-in-hand
So far, I am still about €500 out of pocket to pay the costs of bringing the stewards together for the first time, in order to get sinon@2 released. That was a year ago and has changed how we work on Sinon and related projects.
Once we have accelerated the community support, then I am happy to remove it again.
Other strategies to help pay for our (minimal) costs would be most welcome.
I truly do appreciate that you need funding, but polluting the install logs of all consumers with an advertisement really isn't a great way to generate empathy and incentivize donations.
Objections noted, but I think the view of the core team is pretty aligned with regards to pros/cons. We should revise our position in six months time, though. This isn't a biggie.
I fully understand that you're looking for donations, but I strongly agree with @SimonSchick , @billyjanitsch and @ljharb that a postinstall script is the wrong way to advertise this, mainly because log pollution is damaging the ecosystem as whole. npm/node is no longer a playground for a small tech bubble, but an ecosystem used in production at large scale. Looking forward to removal of the message once you reach your funding goal.
Looking forward to removal of the message once you reach your funding goal
I think we all are
@jpike88 It has already been removed 6 weeks ago in https://github.com/sinonjs/sinon/commit/8f344171fa1861aee6ab736fc985bb8fb30dc18b. Thank you for your your support.
Most helpful comment
@mantoni I empathize with the motivation to introduce the postinstall message: y'all deserve to be compensated for the time you spend on the project, and I appreciate the need to find ways to ask users to contribute.
However I'm not sure the impact is as low as you think, especially when you consider scaling. A typical npm tree contains thousands of packages. What if many packages start doing this?
I timed the postinstall script at ~80ms (starting a
nodeprocess isn't free), which is negligible on its own, but it would only take 10 packages doing this to add ~1s to every local and CI install.More importantly,
npm installcurrently produces a useful log of lifecycle scripts and a tree summary. Even if _only_ sinon's 14 (incl. transitive) dependencies included similar messages, sinon's own message would be lost in the noise -- defeating the purpose of it -- and it would be way less clear to users what actually happened in the lifecycle stage.So I feel like this kind of solution, at best, only works briefly for the first few packages that do it, and then results in a worse ecosystem overall. To be clear, I'm not saying that you should work for free, and I'm happy that OSS revenue solutions are starting to pop up (
npx thanks, Open Collective, etc.) I just don't think a postinstall script is a good medium. I understand if you disagree. ❤️