update-notifier
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -43,2 +43,3 @@ 'use strict'; | ||
isCi(); | ||
this.shouldNotifyInNpmScript = options.shouldNotifyInNpmScript; | ||
@@ -112,3 +113,4 @@ if (!this.disabled && !this.hasCallback) { | ||
notify(opts) { | ||
if (!process.stdout.isTTY || isNpm() || !this.update) { | ||
const suppressForNpm = !this.shouldNotifyInNpmScript && isNpm(); | ||
if (!process.stdout.isTTY || suppressForNpm || !this.update) { | ||
return this; | ||
@@ -115,0 +117,0 @@ } |
{ | ||
"name": "update-notifier", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Update notifications for your CLI app", | ||
@@ -5,0 +5,0 @@ "license": "BSD-2-Clause", |
@@ -156,2 +156,9 @@ # update-notifier [![Build Status](https://travis-ci.org/yeoman/update-notifier.svg?branch=master)](https://travis-ci.org/yeoman/update-notifier) | ||
##### shouldNotifyInNpmScript | ||
Type: `boolean`<br> | ||
Default: `false` | ||
Allows notification to be shown when running as an npm script. | ||
### User settings | ||
@@ -158,0 +165,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13492
151
194