[FEATURE] Support `npm version --interactive`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 778
- Forks
- 266
- PR merge metrics
- No merged PRs in 30d
Description
Why
Version bumping in npm currently requires explicitly specifying the version increment (e.g. npm version minor). This makes it challenging to create reusable release scripts in package.json, as the version increment needs to be hardcoded or passed as an argument.
How
Current Behavior
npm version minor # Must specify version increment explicitly
Expected Behavior
Would like to add an interactive mode similar to bumpp:
{
"scripts": {
"release": "npm version --interactive"
}
}
Running npm run release would present an interactive CLI prompt:
? Current version 0.1.0 »
major 1.0.0
minor 0.2.0
patch 0.1.1
> next 0.1.1
pre-patch 0.1.1-beta.0
pre-minor 0.2.0-beta.0
pre-major 1.0.0-beta.0
as-is 0.1.0
custom ...
Benefits:
- More intuitive version selection
- Reusable release scripts without hardcoding versions
This would align npm's version bumping workflow with modern CLI tools while maintaining compatibility with existing npm version commands.
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
The proposal names npm version and the package.json release script but no implementation files or tests. Start by reviewing the existing npm version command and the requested interactive choices; done means npm version --interactive presents the documented options while existing version commands remain compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, release
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100