aboutsummaryrefslogtreecommitdiff
path: root/node_modules/update-notifier
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/update-notifier')
-rw-r--r--node_modules/update-notifier/index.js3
-rw-r--r--node_modules/update-notifier/package.json13
-rw-r--r--node_modules/update-notifier/readme.md14
3 files changed, 20 insertions, 10 deletions
diff --git a/node_modules/update-notifier/index.js b/node_modules/update-notifier/index.js
index a5fff0103..58f245903 100644
--- a/node_modules/update-notifier/index.js
+++ b/node_modules/update-notifier/index.js
@@ -9,6 +9,7 @@ const chalk = importLazy('chalk');
const semverDiff = importLazy('semver-diff');
const latestVersion = importLazy('latest-version');
const isNpm = importLazy('is-npm');
+const isInstalledGlobally = importLazy('is-installed-globally');
const boxen = importLazy('boxen');
const xdgBasedir = importLazy('xdg-basedir');
const ONE_DAY = 1000 * 60 * 60 * 24;
@@ -109,7 +110,7 @@ class UpdateNotifier {
return this;
}
- opts = Object.assign({isGlobal: true}, opts);
+ opts = Object.assign({isGlobal: isInstalledGlobally()}, opts);
opts.message = opts.message || 'Update available ' + chalk().dim(this.update.current) + chalk().reset(' → ') +
chalk().green(this.update.latest) + ' \nRun ' + chalk().cyan('npm i ' + (opts.isGlobal ? '-g ' : '') + this.packageName) + ' to update';
diff --git a/node_modules/update-notifier/package.json b/node_modules/update-notifier/package.json
index 8a122a774..a98164c0f 100644
--- a/node_modules/update-notifier/package.json
+++ b/node_modules/update-notifier/package.json
@@ -1,6 +1,6 @@
{
"name": "update-notifier",
- "version": "2.2.0",
+ "version": "2.3.0",
"description": "Update notifications for your CLI app",
"license": "BSD-2-Clause",
"repository": "yeoman/update-notifier",
@@ -13,7 +13,7 @@
"node": ">=4"
},
"scripts": {
- "test": "xo && mocha --timeout 20000"
+ "test": "xo && ava --timeout=20s"
},
"files": [
"index.js",
@@ -33,20 +33,21 @@
"version"
],
"dependencies": {
- "boxen": "^1.0.0",
- "chalk": "^1.0.0",
+ "boxen": "^1.2.1",
+ "chalk": "^2.0.1",
"configstore": "^3.0.0",
"import-lazy": "^2.1.0",
+ "is-installed-globally": "^0.1.0",
"is-npm": "^1.0.0",
"latest-version": "^3.0.0",
"semver-diff": "^2.0.0",
"xdg-basedir": "^3.0.0"
},
"devDependencies": {
+ "ava": "*",
"clear-module": "^2.1.0",
"fixture-stdout": "^0.2.1",
- "mocha": "*",
- "strip-ansi": "^3.0.1",
+ "strip-ansi": "^4.0.0",
"xo": "^0.18.2"
}
}
diff --git a/node_modules/update-notifier/readme.md b/node_modules/update-notifier/readme.md
index e41d6faf1..99e73976e 100644
--- a/node_modules/update-notifier/readme.md
+++ b/node_modules/update-notifier/readme.md
@@ -8,14 +8,22 @@ Inform users of your package of updates in a non-intrusive way.
#### Contents
-- [Examples](#examples)
+- [Install](#install)
+- [Usage](#usage)
- [How](#how)
- [API](#api)
- [About](#about)
- [Users](#users)
-## Examples
+## Install
+
+```
+$ npm install update-notifier
+```
+
+
+## Usafe
### Simple
@@ -168,7 +176,7 @@ There are a bunch projects using it:
- [Pageres](https://github.com/sindresorhus/pageres) - Capture website screenshots
- [Node GH](http://nodegh.io) - GitHub command line tool
-[And 1200+ more…](https://www.npmjs.org/browse/depended/update-notifier)
+[And 1600+ more…](https://www.npmjs.org/browse/depended/update-notifier)
## License