My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Amir.H Ebrahimi

10 likes

·

238 reads

3 comments

Masoud Salehi
Masoud Salehi
May 2, 2022

About the last part of this article, I'm pretty sure that no one can use this package without installing react, thus it's not "optional" and must not be marked as so.

For example, you could do that if your package would work with both react and preact. In this case neither of them are necessary and the developer might have installed only one of them and shouldn't see any warning.

·
·2 replies
Amir.H Ebrahimi
Amir.H Ebrahimi
Author
·May 2, 2022

Haha, good point. Actually, the installation procedure is not skipped; npm will install the package in the 'dependencies' section; if you're interested, you can look at 'package-lock.json'.

However, the issue is whether to make a selection at the package level or as an end-developer persona.

IMHO, every non-tightly dependent output dependence should be treated as optional but should make the installation more controlled for end developers.

·
Amir.H Ebrahimi
Amir.H Ebrahimi
Author
·May 2, 2022

Haha, good point. Actually, the installation procedure is not skipped; npm will install the package in the 'dependencies' section; if you're interested, you can look at 'package-lock.json'.

However, the issue is whether to make a selection at the package level or as an end-developer persona.

IMHO, every non-tightly dependent output dependence should be treated as optional but should make the installation more controlled for end developers.

·