| | |
| | | value: true |
| | | }); |
| | | exports.clearFsCache = clearFsCache; |
| | | exports.readPackageCached = readPackageCached; |
| | | exports.findClosestPackageJson = findClosestPackageJson; |
| | | exports.isFile = isFile; |
| | | exports.isDirectory = isDirectory; |
| | | exports.isFile = isFile; |
| | | exports.readPackageCached = readPackageCached; |
| | | exports.realpathSync = realpathSync; |
| | | |
| | | function _path() { |
| | |
| | | let stat; |
| | | |
| | | try { |
| | | stat = fs().statSync(path); |
| | | // @ts-expect-error TS2554 - throwIfNoEntry is only available in recent version of node, but inclusion of the option is a backward compatible no-op. |
| | | stat = fs().statSync(path, { |
| | | throwIfNoEntry: false |
| | | }); |
| | | } catch (e) { |
| | | if (!(e && (e.code === 'ENOENT' || e.code === 'ENOTDIR'))) { |
| | | throw e; |