( currentVersion: string, latestVersion: string, )
| 167 | } |
| 168 | |
| 169 | function writeUpdateNotice( |
| 170 | currentVersion: string, |
| 171 | latestVersion: string, |
| 172 | ): void { |
| 173 | process.stderr.write( |
| 174 | [ |
| 175 | `Update available: ${currentVersion} -> ${latestVersion}.`, |
| 176 | "Run:", |
| 177 | ` npm i -g ${CLI_PACKAGE_NAME}@latest`, |
| 178 | "", |
| 179 | ].join("\n"), |
| 180 | ); |
| 181 | } |
| 182 | |
| 183 | async function fetchLatestCliVersion(): Promise<string | null> { |
| 184 | const controller = new AbortController(); |
no test coverage detected