(name: string)
| 260 | } |
| 261 | |
| 262 | static getModuleVersion(name: string): string { |
| 263 | try { |
| 264 | const path = `${this.resolveModulePath(name)}/package.json`; |
| 265 | const pkg = fs.readJSONSync(path); |
| 266 | return colors.green(pkg.version); |
| 267 | } catch { |
| 268 | return ''; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Resolve path to a module. |
no test coverage detected