read-pkg-up
Advanced tools
Comparing version 3.0.0 to 4.0.0
12
index.js
@@ -5,4 +5,4 @@ 'use strict'; | ||
module.exports = opts => { | ||
return findUp('package.json', opts).then(fp => { | ||
module.exports = options => { | ||
return findUp('package.json', options).then(fp => { | ||
if (!fp) { | ||
@@ -12,8 +12,8 @@ return {}; | ||
return readPkg(fp, opts).then(pkg => ({pkg, path: fp})); | ||
return readPkg(fp, options).then(pkg => ({pkg, path: fp})); | ||
}); | ||
}; | ||
module.exports.sync = opts => { | ||
const fp = findUp.sync('package.json', opts); | ||
module.exports.sync = options => { | ||
const fp = findUp.sync('package.json', options); | ||
@@ -25,5 +25,5 @@ if (!fp) { | ||
return { | ||
pkg: readPkg.sync(fp, opts), | ||
pkg: readPkg.sync(fp, options), | ||
path: fp | ||
}; | ||
}; |
110
package.json
{ | ||
"name": "read-pkg-up", | ||
"version": "3.0.0", | ||
"description": "Read the closest package.json file", | ||
"license": "MIT", | ||
"repository": "sindresorhus/read-pkg-up", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"json", | ||
"read", | ||
"parse", | ||
"file", | ||
"fs", | ||
"graceful", | ||
"load", | ||
"pkg", | ||
"package", | ||
"find", | ||
"up", | ||
"find-up", | ||
"findup", | ||
"look-up", | ||
"look", | ||
"search", | ||
"match", | ||
"resolve", | ||
"parent", | ||
"parents", | ||
"folder", | ||
"directory", | ||
"dir", | ||
"walk", | ||
"walking", | ||
"path" | ||
], | ||
"dependencies": { | ||
"find-up": "^2.0.0", | ||
"read-pkg": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
"name": "read-pkg-up", | ||
"version": "4.0.0", | ||
"description": "Read the closest package.json file", | ||
"license": "MIT", | ||
"repository": "sindresorhus/read-pkg-up", | ||
"author": { | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
"engines": { | ||
"node": ">=6" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"json", | ||
"read", | ||
"parse", | ||
"file", | ||
"fs", | ||
"graceful", | ||
"load", | ||
"pkg", | ||
"package", | ||
"find", | ||
"up", | ||
"find-up", | ||
"findup", | ||
"look-up", | ||
"look", | ||
"search", | ||
"match", | ||
"resolve", | ||
"parent", | ||
"parents", | ||
"folder", | ||
"directory", | ||
"dir", | ||
"walk", | ||
"walking", | ||
"path" | ||
], | ||
"dependencies": { | ||
"find-up": "^3.0.0", | ||
"read-pkg": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
} |
@@ -27,4 +27,4 @@ # read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up) | ||
readPkgUp().then(result => { | ||
console.log(result); | ||
(async () => { | ||
console.log(await readPkgUp()); | ||
/* | ||
@@ -40,3 +40,3 @@ { | ||
*/ | ||
}); | ||
})(); | ||
``` | ||
@@ -57,2 +57,4 @@ | ||
Type: `Object` | ||
##### cwd | ||
@@ -59,0 +61,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
83
4188
+ Addedfind-up@3.0.0(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
- Removedfind-up@2.1.0(transitive)
- Removedlocate-path@2.0.0(transitive)
- Removedp-limit@1.3.0(transitive)
- Removedp-locate@2.0.0(transitive)
- Removedp-try@1.0.0(transitive)
Updatedfind-up@^3.0.0