Updating NPM dependencies
This commit is contained in:
13
node_modules/pkg-dir/index.js
generated
vendored
13
node_modules/pkg-dir/index.js
generated
vendored
@@ -2,9 +2,16 @@
|
||||
const path = require('path');
|
||||
const findUp = require('find-up');
|
||||
|
||||
module.exports = cwd => findUp('package.json', {cwd}).then(fp => fp ? path.dirname(fp) : null);
|
||||
const pkgDir = async cwd => {
|
||||
const filePath = await findUp('package.json', {cwd});
|
||||
return filePath && path.dirname(filePath);
|
||||
};
|
||||
|
||||
module.exports = pkgDir;
|
||||
// TODO: Remove this for the next major release
|
||||
module.exports.default = pkgDir;
|
||||
|
||||
module.exports.sync = cwd => {
|
||||
const fp = findUp.sync('package.json', {cwd});
|
||||
return fp ? path.dirname(fp) : null;
|
||||
const filePath = findUp.sync('package.json', {cwd});
|
||||
return filePath && path.dirname(filePath);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user