()
| 214 | } |
| 215 | |
| 216 | function getVersions() { |
| 217 | const v = { node: process.version }; |
| 218 | try { v.ceCurrent = JSON.parse(readFileSync(join(ROOT, 'package.json'), 'utf8')).version; } catch {} |
| 219 | try { v.ceCurrentSha = execFileSync('git', ['rev-parse', '--short', 'HEAD'], { cwd: ROOT, encoding: 'utf8' }).trim(); } catch {} |
| 220 | v.cePublished = PUBLISHED_VERSION; |
| 221 | try { v.python = execFileSync(PYTHON, ['--version'], { encoding: 'utf8' }).trim().replace('Python ', ''); } catch {} |
| 222 | try { v.sympy = execFileSync(PYTHON, ['-c', 'import sympy;print(sympy.__version__)'], { encoding: 'utf8' }).trim(); } catch {} |
| 223 | try { v.numpy = execFileSync(PYTHON, ['-c', 'import numpy;print(numpy.__version__)'], { encoding: 'utf8' }).trim(); } catch {} |
| 224 | try { |
| 225 | v.mathjs = execFileSync(NODE, ['--input-type=module', '-e', |
| 226 | `import * as m from '${join(__dirname, '.competitors', 'mathjs-host', 'node_modules', 'mathjs', 'lib', 'esm', 'index.js')}';process.stdout.write(m.version)`], |
| 227 | { encoding: 'utf8' }).trim(); |
| 228 | } catch {} |
| 229 | // Wolfram Language kernel version ($VersionNumber side); one kernel launch. |
| 230 | try { v.wolfram = execFileSync('wolframscript', ['-code', '$Version'], { encoding: 'utf8' }).trim().replace(/\s*\(.*$/, ''); } catch {} |
| 231 | return v; |
| 232 | } |
| 233 | |
| 234 | // The warm batch runner measures ALL THREE Compute Engine columns back-to-back |
| 235 | // in ONE node process: `ce-current` (base CE, current bundle), `ce-pub` (base |
no test coverage detected