Returns a new project based on the first package.json that is found in `pathName`, or the nullProject. The nullProject signifies no-project, but abides by the null object pattern @private @static @method projectOrnullProject @param {UI} _ui The UI instance to provide to th
(_ui, _cli)
| 698 | @return {Project} Project instance |
| 699 | */ |
| 700 | static projectOrnullProject(_ui, _cli) { |
| 701 | try { |
| 702 | return Project.closestSync(process.cwd(), _ui, _cli); |
| 703 | } catch (reason) { |
| 704 | if (reason instanceof Project.NotFoundError) { |
| 705 | return Project.nullProject(_ui, _cli); |
| 706 | } else { |
| 707 | throw reason; |
| 708 | } |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | /** |
| 713 | Returns the project root based on the first package.json that is found |
no test coverage detected