[FEATURE] Add more fields to the `package.json` documentation
Nobody has claimed this yet.
- Dominant language
- MDX
- Stars
- 711
- Forks
- 4.2k
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 3
Description
When creating JS libraries, the package.json documentation on docs.npmjs.com is one of the most helpful resources to me. However it is far from complete, there are many fields that aren't documented there, but they are often needed in order to make a working library. These are for example:
exports– which module should be used when using module requests likeimport "package/sub/path", src: [1], [2]typesandtypesVersions– type declarations for TS, src: [3]module– the main entry point for an ESM project, src: [4], [5], [6]type–whether the main entrypoint iswhether all.jsfiles are a CommonJS or ES Module, src: [7]
While these options aren't directly used by the NPM CLI, I think it would be great to include them, since they are a de-facto standard shared by many different systems. Should I make a PR that adds them?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the package.json documentation page and compare its existing coverage with the linked Node.js, webpack, and TypeScript references. Document the proposed exports, types, typesVersions, module, and type fields, with accurate descriptions and sources; done means these commonly used fields are covered clearly in the page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100