(cachePath: string, currentVersion: string)
| 138 | } |
| 139 | |
| 140 | function spawnBackgroundUpdateCheck(cachePath: string, currentVersion: string): void { |
| 141 | const modulePath = resolveUpdateCheckEntryModulePath(); |
| 142 | const execArgs = modulePath.endsWith('.ts') ? ['--experimental-strip-types'] : []; |
| 143 | runCmdDetached(process.execPath, [ |
| 144 | ...execArgs, |
| 145 | modulePath, |
| 146 | UPDATE_CHECK_ARG, |
| 147 | cachePath, |
| 148 | currentVersion, |
| 149 | ]); |
| 150 | } |
| 151 | |
| 152 | async function fetchLatestPackageVersion(): Promise<string | undefined> { |
| 153 | const response = await fetch(`https://registry.npmjs.org/${PACKAGE_NAME}/latest`, { |
no test coverage detected