Build robustness + a real test net#7
Open
miguelrisero wants to merge 3 commits into
Open
Conversation
- detectInstallCmd uses `npm ci` for package-lock projects (was `npm install`, which floats deps) — matches build-node-functions.mjs. - run() gains a child 'error' handler + double-settle guard so a failed spawn rejects instead of hanging the build forever. - Bounded build concurrency (mapLimit) instead of unbounded Promise.allSettled. - Assembly, landing index, and config now use only successfully-built projects, so a failed project can't leak partial/empty output into the deployment. - Extract pure buildVercelConfig() (fail-fast on multi-segment dynamic [param] entries that would silently 404), and export pure helpers + guard main() so the orchestrator can be unit-tested.
…ve path Refuse the 'local-dev-cron-secret' fallback when CI/VERCEL/NODE_ENV=production, and report the actual served directory (.vercel/output/static, dist fallback) instead of the stale 'Serving from: dist'.
node --test coverage for escapeHtml, safeHref, slug validation, and buildVercelConfig (static, dynamic [id], catchAll, multi-segment reject, nuxt-server ordering, crons) + collectCronEntries. Adds `npm test` and a CI test step — exercises the routing/cron logic that the example projects don't.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 3 of 5 (base:
fix/build-safety). Council P0/P1 — robustness and the missing safety net.Robustness / correctness (
build.mjs)npm cifor lockfile projects (wasnpm install) → reproducible builds.run()error handler + double-settle guard → a failed spawn rejects instead of hanging.mapLimit) instead of unboundedPromise.allSettled.[param]entries (they silently 404'd before).Dev server (
dev.mjs)Tests (new)
node --test(11 tests) covering escaping, slug validation, andbuildVercelConfig(static /[id]/ catchAll / multi-segment reject / nuxt-server ordering / crons) +collectCronEntries. Wired into CI via a newnpm teststep. This exercises the routing/cron logic the two example projects never hit.npm test+npm run buildboth green locally.