fix(test): enforce the Node version pin on every test run, not just install#7623
Merged
Conversation
engine-strict (#7613) only fires during npm install/ci, not on a subsequent npm run against already-installed node_modules -- a node_modules built while on the pinned Node, followed by simply switching the active `node` (nvm/homebrew default change) with no reinstall, sails straight past engine-strict on every later npm run. Confirmed directly: npm run engines-nvmrc:check succeeded on Node 26 despite engine-strict=true and a tightened engines.node. Add scripts/check-node-version.mjs, checking process.version against root package.json's engines.node with a clear, actionable message. Wire it as a pretest*/preui:test hook on test, test:ci, test:coverage, test:workers, and ui:test -- the commands that actually run vitest -- so each fails immediately, before doing any real work, regardless of node_modules' install state. Verified directly on Node 26: npm test, npm run test:ci, and npm run ui:test each now fail immediately with the clear message instead of running the full command chain first. Closes #7619
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
loopover-ui | 89f0e8d | Jul 21 2026, 04:23 AM |
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Bundle ReportChanges will increase total bundle size by 106 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: loopover-uiAssets Changed:
|
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.
Closes #7619
Summary
engine-strict(chore(deps): enforce the .nvmrc Node 22 pin locally (engine-strict + engines.node upper bound) #7613) only fires duringnpm install/npm ci, not on a subsequentnpm runagainstalready-installed
node_modules. Confirmed directly:npm run engines-nvmrc:checksucceeded on Node26 despite
engine-strict=true. Addsscripts/check-node-version.mjs, wired as apretest*hook ontest,test:ci,test:coverage,test:workers, andui:test, so each fails immediately with aclear message regardless of
node_modules' install state.Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
scripts/**andtest/**are outside Codecov'ssrc/**-only include glob, so this owes nopatch-coverage number -- but the new script ships its own unit suite (satisfying/failing/no-engines-field
cases, a real-repo-state regression guard, and a subprocess smoke test). Also verified directly on Node
26 (not just asserted):
npm test,npm run test:ci, andnpm run ui:testeach fail immediately withthe clear message, before any real work runs.
Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots arranged as organized, captioned, clickable thumbnails. SVG screenshots are not used as review evidence. Review-only screenshots or recordings are not committed to the repository.UI Evidence
Not applicable — no visible UI/frontend change (tooling only).
Notes