np [version]

A better npm publish

Arguments

NameDescription
versionVersion to publish

Options

NameDescription
--any-branchAllow publishing from any branch
--branch <branch>Name of the release branch (default: main | master)
--no-cleanupSkips cleanup of node_modules
--no-testsSkips tests
--yoloSkips cleanup and testing
--no-publishSkips publishing
--previewShow tasks without actually executing them
--tag <tag>Publish under a given dist-tag
--no-yarnDon't use Yarn
--contents <directory>Subdirectory to publish
--no-release-draftSkips opening a GitHub release draft
--release-draft-onlyOnly opens a GitHub release draft
--test-script <script>Name of npm run script to run tests before publishing (default: test)
--no-2faDon't enable 2FA on new packages (not recommended)
--message <message>Version bump commit message. `%s` will be replaced with version. (default: '%s' with npm and 'v%s' with yarn)