version.ts (320B)
1 export const version = (() => { 2 try { 3 /* eslint-disable-next-line n/no-restricted-require */ 4 return require('child_process') 5 .execSync('git describe --always --abbrev=0 --dirty') 6 .toString() 7 .trim(); 8 } catch { 9 // Fail gracefully if git is not available. 10 return 'unknown'; 11 } 12 })();