2 const findUp = require('find-up');
3 const readPkg = require('read-pkg');
5 module.exports = opts => {
6 return findUp('package.json', opts).then(fp => {
11 return readPkg(fp, opts).then(pkg => ({pkg, path: fp}));
15 module.exports.sync = opts => {
16 const fp = findUp.sync('package.json', opts);
23 pkg: readPkg.sync(fp, opts),