Skip to content

Commit 6008ccf

Browse files
committedSep 29, 2017
Meta tweaks
1 parent 6f2b074 commit 6008ccf

File tree

7 files changed

+31
-23
lines changed

7 files changed

+31
-23
lines changed
 

‎.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
node_modules
1+
node_modules
2+
yarn.lock

‎.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"ava": "*",
4747
"clear-module": "^2.1.0",
4848
"fixture-stdout": "^0.2.1",
49-
"strip-ansi": "^3.0.1",
49+
"strip-ansi": "^4.0.0",
5050
"xo": "^0.18.2"
5151
}
5252
}

‎readme.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,22 @@ Inform users of your package of updates in a non-intrusive way.
88

99
#### Contents
1010

11-
- [Examples](#examples)
11+
- [Install](#install)
12+
- [Usage](#usage)
1213
- [How](#how)
1314
- [API](#api)
1415
- [About](#about)
1516
- [Users](#users)
1617

1718

18-
## Examples
19+
## Install
20+
21+
```
22+
$ npm install update-notifier
23+
```
24+
25+
26+
## Usafe
1927

2028
### Simple
2129

@@ -168,7 +176,7 @@ There are a bunch projects using it:
168176
- [Pageres](https://github.com/sindresorhus/pageres) - Capture website screenshots
169177
- [Node GH](http://nodegh.io) - GitHub command line tool
170178

171-
[And 1200+ more…](https://www.npmjs.org/browse/depended/update-notifier)
179+
[And 1600+ more…](https://www.npmjs.org/browse/depended/update-notifier)
172180

173181

174182
## License

‎test/fs-error.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ test.before(() => {
88
// Set configstore.config to something
99
// that requires root access
1010
process.env.XDG_CONFIG_HOME = '/usr';
11-
updateNotifier = require('../');
11+
updateNotifier = require('..');
1212
});
1313

1414
test('fail gracefully', t => {

‎test/notify.js

+14-16
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import test from 'ava';
77
const stderr = new FixtureStdout({
88
stream: process.stderr
99
});
10-
let updateNotifier = require('../');
10+
let updateNotifier = require('..');
1111

1212
test.before(() => {
1313
['.', 'is-npm'].forEach(clearModule);
1414
['npm_config_username', 'npm_package_name', 'npm_config_heading'].forEach(name => {
1515
delete process.env[name];
1616
});
1717
process.stdout.isTTY = true;
18-
updateNotifier = require('../');
18+
updateNotifier = require('..');
1919
});
2020

2121
function Control() {
@@ -44,23 +44,21 @@ test.afterEach(() => {
4444
test('use pretty boxen message by default', t => {
4545
const notifier = new Control();
4646
notifier.notify({defer: false});
47-
t.is(stripAnsi(errorLogs), [
48-
'',
49-
'',
50-
' ╭───────────────────────────────────────────────────╮',
51-
' │ │',
52-
' │ Update available 0.0.2 → 1.0.0 │',
53-
' │ Run npm i -g update-notifier-tester to update │',
54-
' │ │',
55-
' ╰───────────────────────────────────────────────────╯',
56-
'',
57-
''
58-
].join('\n'));
47+
48+
t.is(stripAnsi(errorLogs), `
49+
50+
╭───────────────────────────────────────────────────╮
51+
│ │
52+
│ Update available 0.0.2 → 1.0.0 │
53+
│ Run npm i -g update-notifier-tester to update │
54+
│ │
55+
╰───────────────────────────────────────────────────╯
56+
57+
`);
5958
});
6059

6160
test('exclude -g argument when `isGlobal` option is `false`', t => {
6261
const notifier = new Control();
6362
notifier.notify({defer: false, isGlobal: false});
64-
t.not(-1, stripAnsi(errorLogs)
65-
.indexOf('Run npm i update-notifier-tester to update'));
63+
t.not(stripAnsi(errorLogs).indexOf('Run npm i update-notifier-tester to update'), -1);
6664
});

‎test/update-notifier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import fs from 'fs';
22
import test from 'ava';
3-
import updateNotifier from '../';
3+
import updateNotifier from '..';
44

55
const generateSettings = options => {
66
options = options || {};

0 commit comments

Comments
 (0)
Please sign in to comment.