From bc2f082fcaf12d0d5ac78ebe4ed46514283ca133 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 12:45:56 +0000 Subject: [PATCH] Fix: Enable build on Node 20 and harden version injection - Relaxed `engines.node` in `package.json` from `>=22` to `>=20` to match the hosting environment (Node 20.x), resolving strict engine failures during install. - Modified `scripts/build-dist.mjs` to throw an error (instead of warning) if version injection fails, preventing silent failures. - Updated `npm run build` to include `verify:dist:deploy-artifact` as a mandatory post-build step, ensuring the final artifact contains the expected version markup. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- package.json | 4 ++-- scripts/build-dist.mjs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0889d107..5dc6ca3a 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,12 @@ "type": "module", "version": "1.0.0", "engines": { - "node": ">=22" + "node": ">=20" }, "scripts": { "start": "npm run build && npx serve dist", "serve": "npx serve", - "build": "node scripts/build-dist.mjs", + "build": "node scripts/build-dist.mjs && npm run verify:dist:deploy-artifact", "build:css": "postcss css/tailwind.source.css -o css/tailwind.generated.css", "build:beacon:bundle": "node scripts/build-beacon.mjs", "build:beacon": "npm run build:beacon:bundle && npm run lint:inline-styles", diff --git a/scripts/build-dist.mjs b/scripts/build-dist.mjs index 947f83cb..6e5d84ac 100644 --- a/scripts/build-dist.mjs +++ b/scripts/build-dist.mjs @@ -185,7 +185,7 @@ function injectVersionInfo() { fs.writeFileSync(indexHtmlPath, content); console.log(`Injected version (via fallback regex): ${hash.slice(0, 8)} • ${date}`); } else { - console.warn('Could not find placeholder or tagline to inject version info.'); + throw new Error('Could not find placeholder or tagline to inject version info.'); } } }