Repository navigation
fix(frontend): reject an @types/node major that differs from the runtime - #270
Merged
Merged
Conversation
verify-node-version.mjs held .nvmrc, the lockfile, the Dockerfile and the docs to engines.node but not the types, so a grouped bump left @types/node on 26 under a Node 24 runtime. It now fails when the @types/node major differs from the engines.node major. Agent-Session: f6561fed-d6d9-4fd1-a9d3-9db9f9613f55
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
🟡 Changes recommended
The Node-version guard checks only the first version in a dependency range, allowing ranges that include mismatched Node 26 typings to pass.
1 open issue
What changed in this PR
Extends the frontend’s Node-version verification script to detect mismatches between the declared @types/node major and the canonical runtime major.
Changes:
- Extracts and compares the typings and runtime majors.
- Adds an error message for mismatches and a comment explaining the compatibility risk.
| File | Description |
|---|---|
frontend/scripts/verify-node-version.mjs |
Adds a typings-major check to the existing Node-version synchronization checks. |
Review effort: Balanced
| throw new Error(`docs/getting-started.md must name ${expectedDocumentationVersion}`); | ||
| } | ||
| // Types from a newer Node major type-check APIs this runtime lacks. | ||
| const nodeTypesMajor = frontendPackage.devDependencies?.["@types/node"]?.replace(/^[\^~]/, "").split(".")[0]; |
oxfmt --check rejected the single-line @types/node lookup added in 4ba3f29, failing Build & Test run 41304637085; this applies the formatter. Agent-Session: f6561fed-d6d9-4fd1-a9d3-9db9f9613f55
WilliamAGH
temporarily deployed
to
development
November 1, 2026 12:16 — with
GitHub Actions
Inactive
WilliamAGH
temporarily deployed
to
development
November 1, 2026 12:16 — with
GitHub Actions
Inactive
WilliamAGH
temporarily deployed
to
development
November 1, 2026 12:19 — with
GitHub Actions
Inactive
WilliamAGH
temporarily deployed
to
development
November 1, 2026 12:19 — with
GitHub Actions
Inactive
This branch was successfully deployed
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.

verify-node-version.mjs now fails when frontend @types/node's major differs from engines.node (Node 24). Probe: a ^26.6.5 pin fails; the current ^24.19.2 passes.