openjs-foundation / package-json-research

20 stars 3 forks source link

Property: module #12

Closed rotu closed 2 months ago

rotu commented 2 months ago

Documented the top-level module entry point. I stopped short of prescriptive recommendations.

This field has been very confusing to me. On one hand, it's ubiquitous and just works for some tooling. On the other hand, it's undocumented by npm. I stopped short of it, but it would be nice if there were some official normative guidance for how to stop using this field without breaking things, now that exports seems a capable replacement.

wesleytodd commented 2 months ago

Honestly laughed out loud a few times reading this, but this is a GREAT addition. It would be nice if we could get some folks from the bundlers to help with this so we can get a more clear answer on the future of this field.

rotu commented 2 months ago

Honestly laughed out loud a few times reading this, but this is a GREAT addition.

@wesleytodd I'm glad to be helpful, but I'm curious why you found it funny... Neither my wife nor my cat laughed when I forced them to listen to my drafts.

rotu commented 2 months ago

@Ethan-Arrowood

Nit: let's be consistent with using proper spelling and capitalization for names for things (i.e. npm, Node.js, GitHub)

Agreed. Got opinions about what should be a footnote and what should be an inline link? (and what's just excessive and shouldn't even be linked?)

Ethan-Arrowood commented 2 months ago

No opinions on links - i like the idea of this being a living research document. We can make edits over time if patterns start to emerge. Less rules the better to encourage more and more contributions