(binPath)
| 62 | } |
| 63 | |
| 64 | function getInstalledVersion(binPath) { |
| 65 | try { |
| 66 | const result = spawnSync(binPath, ["version"], { |
| 67 | encoding: "utf8", |
| 68 | timeout: 3000, |
| 69 | windowsHide: true, |
| 70 | }); |
| 71 | return parseVersionOutput(result.stdout); |
| 72 | } catch (_) { |
| 73 | return null; |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | function fetchLatestVersion(pkg) { |
| 78 | const registry = (pkg.publishConfig && pkg.publishConfig.registry) || DEFAULT_REGISTRY; |
no test coverage detected