New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

np

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

np - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

11

cli.js

@@ -9,4 +9,7 @@ #!/usr/bin/env node

Usage
$ np [major | minor | patch | premajor | preminor | prepatch | prerelease | <version>] (Default: patch)
$ np <version>
Version can be:
patch | minor | major | prepatch | preminor | premajor | prerelease | 1.2.3
Options

@@ -19,3 +22,2 @@ --any-branch Allow publishing from any branch

Examples
$ np
$ np patch

@@ -28,2 +30,7 @@ $ np 1.0.2

if (cli.input.length === 0) {
console.error('Specify a version\n\nExample: $ np patch');
process.exit(1);
}
np(cli.input[0], cli.flags)

@@ -30,0 +37,0 @@ .then(pkg => {

2

package.json
{
"name": "np",
"version": "2.4.0",
"version": "2.5.0",
"description": "A better `npm publish`",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -32,4 +32,7 @@ # np [![Build Status](https://travis-ci.org/sindresorhus/np.svg?branch=master)](https://travis-ci.org/sindresorhus/np)

Usage
$ np [major | minor | patch | premajor | preminor | prepatch | prerelease | <version>] (Default: patch)
$ np <version>
Version can be:
patch | minor | major | prepatch | preminor | premajor | prerelease | 1.2.3
Options

@@ -42,4 +45,3 @@ --any-branch Allow publishing from any branch

Examples
$ np
$ np major
$ np patch
$ np 1.0.2

@@ -52,7 +54,18 @@ $ np 1.0.2-beta.3 --tag=beta

You can use any of the test/version/publish related [npm lifecycle hooks](https://docs.npmjs.com/misc/scripts) to add extra behavior.
You can use any of the test/version/publish related [npm lifecycle hooks](https://docs.npmjs.com/misc/scripts) in your package.json to add extra behavior.
For example, here we build the documentation before tagging the release:
```json
{
"name": "my-awesome-package",
"scripts": {
"preversion": "./build-docs"
}
}
```
## License
MIT © [Sindre Sorhus](https://sindresorhus.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc