* Returns the node version of the parent package. * @return {Object} The parent package info.
()
| 139 | * @return {Object} The parent package info. |
| 140 | */ |
| 141 | async getParentVersion() { |
| 142 | // Get parent package.json version |
| 143 | const [version] = await this.getNodeVersion({ files: [ this.packageJsonPath ], clean: true }); |
| 144 | |
| 145 | // If parent node version could not be determined |
| 146 | if (!version) { |
| 147 | throw `Failed to determine node engine version of parent package at ${this.packageJsonPath}`; |
| 148 | } |
| 149 | |
| 150 | return version; |
| 151 | } |
| 152 | } |
| 153 | |
| 154 | async function check() { |