mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-05-23 14:24:46 +00:00
.
This commit is contained in:
parent
fc725ba36b
commit
422b9fdb15
7395 changed files with 1786235 additions and 3476 deletions
17
node_modules/pkg-dir/index.js
generated
vendored
Normal file
17
node_modules/pkg-dir/index.js
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
'use strict';
|
||||
const path = require('path');
|
||||
const findUp = require('find-up');
|
||||
|
||||
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 filePath = findUp.sync('package.json', {cwd});
|
||||
return filePath && path.dirname(filePath);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue