np
np copied to clipboard
`np prerelease` should default to `--tag next`
Running np
lets you choose the release type and tag interactively, but np prerelease
requires to pre-specify the tag via flag, erroring if it doesn't have it:
❯ np premajor
❯ Prerequisite check
✔ Ping npm registry
✔ Verify user is authenticated
✔ Check git remote
✔ Validate version
✖ Check for pre-release version
→ You must specify a dist-tag using --tag when publishing a pre-release ve
…
Check git tag existence
Git
Cleanup
Installing dependencies using npm
Running tests using npm
Bumping version using npm
Publishing package using npm
Pushing tags
✖ You must specify a dist-tag using --tag when publishing a pre-release version. This prevents accidentally tagging unstable versions as "latest". https://docs.npmjs.com/cli/dist-tag
Steps to reproduce
-
$ np premajor
Expected behavior
$ np premajor
should be the same as $ np premajor --tag next
or let you choose interactively.
Environment
np 4.0.2 node v11.6.0 npm 6.9.0 git 2.19.1 OS: macOS 10.14.3
You should really prefer just using $ np
, but yes, we should probably let you choose interactively here too.
See https://github.com/sindresorhus/np/pull/378 as a starting point to solve this.