ci: add dependency staleness check to frontend build gate
CI / Go vulnerabilities (push) Successful in 1m3s
CI / Build & Vet (push) Successful in 1m36s
CI / Frontend build (gate) (push) Successful in 1m36s
CI / Frontend QC (audit) (push) Successful in 1m19s
CI / Frontend QC (typecheck) (push) Successful in 1m30s
CI / Tests (prod) (push) Successful in 1m59s
CI / Tests (dev) (push) Successful in 2m14s
CI / Race (prod) (push) Has been cancelled
CI / Race (dev) (push) Has been cancelled
CI / Frontend QC (lint) (push) Has been cancelled

After npm ci, runs npm outdated --json and fails if any in-range (current != wanted) updates exist. Developer must run npm update locally and commit the lockfile.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-07-09 17:46:54 +01:00
co-authored by Sisyphus
parent 96410c9f18
commit 4b5d3640bb
+19
View File
@@ -263,6 +263,25 @@ jobs:
- name: Install dependencies
run: cd frontend && npm ci
- name: Check for in-range dependency updates
run: |
cd frontend && npm outdated --json 2>&1 | node -e "
const chunks = [];
process.stdin.on('data', c => chunks.push(c));
process.stdin.on('end', () => {
const raw = Buffer.concat(chunks).toString().trim();
if (!raw) { console.log('No dependencies to check'); process.exit(0); }
const data = JSON.parse(raw);
const updates = Object.entries(data).filter(([_, v]) => v.current !== v.wanted);
if (updates.length) {
console.log('In-range updates available — run \"npm update\" locally and commit:');
updates.forEach(([k, v]) => console.log(' ' + k + ': ' + v.current + ' -> ' + v.wanted));
process.exit(1);
}
console.log('All dependencies up to date within semver range');
});
"
- name: Build
run: cd frontend && npm run build