UNPKG

aoc-automation

Version:

Advent of Code tool to automate the repetitive parts of AoC.

21 lines (20 loc) 488 B
import { exec } from "child_process"; const getLatestVersion = () => { return new Promise((resolve) => { exec("npm view aoc-automation versions --json", (err, stdout) => { if (err) { resolve(null); } try { const versions = JSON.parse(stdout); resolve(versions.at(-1) || null); } catch { resolve(null); } }); }); }; var getLatestVersion_default = getLatestVersion; export { getLatestVersion_default as default };