()
| 8 | const VERSION_CHECK_TAG = 'latest'; |
| 9 | |
| 10 | export function getVersion() { |
| 11 | try { |
| 12 | // isomorphic __dirname |
| 13 | const _dirname = typeof __dirname !== 'undefined' ? __dirname : path.dirname(fileURLToPath(import.meta.url)); |
| 14 | return JSON.parse(fs.readFileSync(path.join(_dirname, '../package.json'), 'utf8')).version; |
| 15 | } catch { |
| 16 | return undefined; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | export async function checkNewVersion() { |
| 21 | const currVersion = getVersion(); |
no outgoing calls
no test coverage detected