[RRFC] npm init add a new question: type => "commonjs/module"
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 777
- Forks
- 267
- PR merge metrics
- No merged PRs in 30d
Description
Motivation ("The Why")
As more devs are going to use esm, while the default is commonjs. users have to manually add the field after creating.
Example
How
Current Behaviour
package name: (xxx)
version: (1.0.0)
description:
entry point: (index.js)
test command:
git repository:
keywords:
license: (ISC)
Desired Behaviour
package name: (xxx)
version: (1.0.0)
description:
type: commonjs/module ----- new added item.
entry point: (index.js)
test command:
git repository:
keywords:
license: (ISC)
References
- n/a
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 by reviewing the current and desired npm init prompt examples in this issue, then read the discussion for the unresolved behavior around the new type question. Done means the agreed design adds a commonjs/module choice to npm init and produces the corresponding package configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100