Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ language: node_js
node_js:
- '10'
- '8'
- '6'
after_script:
- 'cat ./coverage/lcov.info | ./node_modules/.bin/coveralls'
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"repository": "avajs/find-cache-dir",
"engines": {
"node": ">=6"
"node": ">=8"
},
"scripts": {
"test": "xo && nyc ava"
Expand All @@ -23,8 +23,8 @@
],
"dependencies": {
"commondir": "^1.0.1",
"make-dir": "^2.0.0",
"pkg-dir": "^3.0.0"
"make-dir": "^3.0.0",
"pkg-dir": "^4.1.0"
},
"devDependencies": {
"ava": "^1.3.1",
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ findCacheDir({name: 'unicorns'});

### findCacheDir([options])

Finds the cache directory using the supplied options. The algorithm tries to find a `package.json` file, searching every parent directory of the `cwd` specified (or implied from other options). It returns a `string` containing the absolute path to the cache directory, or `null` if `package.json` was never found.
Finds the cache directory using the supplied options. The algorithm tries to find a `package.json` file, searching every parent directory of the `cwd` specified (or implied from other options). It returns a `string` containing the absolute path to the cache directory, or `undefined` if `package.json` was never found.

#### options

Expand Down
4 changes: 2 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ test('thunk', t => {
t.is(thunk('bar'), path.join(directory, 'bar'));
});

test('returns null if it can\'t find package.json', t => {
test('returns undefined if it can\'t find package.json', t => {
process.chdir(path.join(__dirname, '..'));
t.is(findCacheDir({name: 'foo'}), null);
t.is(findCacheDir({name: 'foo'}), undefined);
});