diff --git a/scripts/check-env.mjs b/scripts/check-env.mjs index 6768cc5..f8d06dc 100644 --- a/scripts/check-env.mjs +++ b/scripts/check-env.mjs @@ -21,7 +21,7 @@ // // Linux only — the fix commands below are bash. -import { readFileSync, readdirSync } from "node:fs"; +import { readFileSync } from "node:fs"; import { join } from "node:path"; import { execFileSync } from "node:child_process"; @@ -79,7 +79,7 @@ function nixpkgsVersion(attr) { function localVersion(name, flag = "--version") { const out = sh(name, [flag]); if (!out) return null; - const m = out.match(/v?(\d+\.\d+(?:\.\d+)?(?:[-+][0-9A-Za-z.\-]+)?)/); + const m = out.match(/v?(\d+\.\d+(?:\.\d+)?(?:[-+][0-9A-Za-z.-]+)?)/); return m ? m[1] : null; } diff --git a/scripts/check-versions.mjs b/scripts/check-versions.mjs index 22bf011..bc79baf 100644 --- a/scripts/check-versions.mjs +++ b/scripts/check-versions.mjs @@ -80,7 +80,7 @@ function npmLatest(name) { console.log("Checking direct dependencies against npm...\n"); let outdated = 0; -for (const [name, range] of [...directDeps.entries()].sort()) { +for (const [name, range] of [...directDeps.entries()].sort((a, b) => a[0].localeCompare(b[0]))) { const locked = resolved.get(name) ?? "(absent from bun.lock)"; const latest = npmLatest(name); if (!latest) {