Preact: Suggestion: Don't show the donate message unless I'm directly installing preact

Created on 18 Sep 2019  路  3Comments  路  Source: preactjs/preact

I've just seen the following message from preact when installing a completely unrelated npm package:

Terminal_025

I've no idea what preact is, I've never installed it - so I'm a bit confused why I'm being asked to donate.

I suggest that this message is only shown when someone is _directly_ installing preact. If preact is being installed by dependency, then it should not show the message.

discussion

Most helpful comment

You may not have directly installed preact, but you're using a package that depends on preact, and so are benefiting from preact, no?

All 3 comments

You may not have directly installed preact, but you're using a package that depends on preact, and so are benefiting from preact, no?

Hey @sbrl as @gilbert nicely put it, you're using shepherd.js which has preact as a dependency. So, you actually _are_ using preact through shepherd.js.
https://www.npmjs.com/package/shepherd.js?activeTab=dependencies

Also, I don't think the _postinstall_ hook is aware whether the current package is a dependency or not.

Ah, I see. I'm just trying to point out that to the end developer, it's not always obvious why I'm using a particular dependency, so to see a donation message for a package I haven't used directly can be confusing.

Hrm, that's a shame. It would have been a good solution if it did know.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nopantsmonkey picture nopantsmonkey  路  3Comments

matuscongrady picture matuscongrady  路  3Comments

paulkatich picture paulkatich  路  3Comments

KnisterPeter picture KnisterPeter  路  3Comments

philipwalton picture philipwalton  路  3Comments