-
Notifications
You must be signed in to change notification settings - Fork 5
Update package.json's engine requirements #1532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughNode.js engine constraints were raised from >=20.17.0 to >=24.1.0 in the root and two app package.json files. No other fields or scripts were modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/cyberstorm-remix/package.json
(1 hunks)apps/cyberstorm-storybook/package.json
(1 hunks)package.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: CodeQL
🔇 Additional comments (2)
apps/cyberstorm-storybook/package.json (1)
27-28
: Storybook on Node 24 — verify CI runners and add‑ons
- Automated check failed ("No files were searched"); I couldn't locate CI scripts or Dockerfiles to confirm Node images. Manually confirm Storybook (v8.3.x) and all addons/chromatic run on Node >=24.1.0 and that CI runner images use Node 24.1+.
- Location: apps/cyberstorm-storybook/package.json (engines: node >=24.1.0).
Optional guard (cap engines to avoid Node 25 surprises):
"engines": { - "node": ">=24.1.0" + "node": ">=24.1.0 <25" },apps/cyberstorm-remix/package.json (1)
48-49
: Production runtime pinned to Node 24.1 — no change required.apps/cyberstorm-remix/Dockerfile and Dockerfile.development both use FROM node:24.1.0-alpine3.21 and apps/cyberstorm-remix/package.json declares "engines": { "node": ">=24.1.0" } — production runtime matches the requirement.
Optional: cap the engine range to avoid automatic Node 25 rollups:
"engines": { - "node": ">=24.1.0" + "node": ">=24.1.0 <25" }
"node": ">=24.1.0" | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Node >=24.1.0: verify CI/deploy parity and consider range cap; align Node types.
- Please confirm all runners and deploy targets use Node 24.1+ (GitHub Actions setup-node, Docker base images, Vercel/Netlify/Cloudflare Pages, any self-hosted builders). Otherwise installs will warn/fail depending on engine enforcement.
- Optional: cap the upper bound to avoid unexpected major bumps later.
- Align TypeScript node types with the new runtime to avoid subtle typing gaps.
Suggestions:
"engines": {
- "node": ">=24.1.0"
+ "node": ">=24.1.0 <25"
},
- "@types/node": "^20.16.0",
+ "@types/node": "^24.0.0",
Run to find and review all Node version pin points and package manager config:
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== Engine declarations ==="
rg -nP '"engines"\s*:\s*\{[^}]*\}' -g '!**/node_modules/**' -C2
echo "=== Node version references (CI, Docker, env) ==="
rg -nP '(setup-node|node-version|NODE_VERSION|\.nvmrc|\.node-version|\.tool-versions|volta|FROM\s+node:)' -g '!**/node_modules/**' -C3
echo "=== Package manager lock ==="
rg -n '^packageManager\b' package.json || true
fd -H -a .nvmrc .node-version .tool-versions || true
Length of output: 176
🏁 Script executed:
#!/bin/bash
set -euo pipefail
HAS_RG=0
if command -v rg >/dev/null 2>&1; then HAS_RG=1; fi
echo "=== repo root ==="
pwd 2>/dev/null || true
echo "=== git branch ==="
git rev-parse --abbrev-ref HEAD 2>/dev/null || true
echo "=== Top-level package.json (first 200 lines) ==="
if [ -f package.json ]; then
sed -n '1,200p' package.json || true
else
echo "no package.json at repo root"
fi
echo "=== Search for 'engines' across repo ==="
if [ $HAS_RG -eq 1 ]; then
rg --hidden -uu -nP '"engines"\s*:' -g '!**/node_modules/**' -S || true
else
grep -RInE '"engines"\s*:' --exclude-dir=node_modules . || true
fi
echo "=== Search for packageManager field ==="
if [ $HAS_RG -eq 1 ]; then
rg --hidden -uu -nP '"packageManager"\s*:' -g '!**/node_modules/**' -S || true
else
grep -RInE '"packageManager"\s*:' --exclude-dir=node_modules . || true
fi
echo "=== Check for node version files (.nvmrc, .node-version, .tool-versions) ==="
for f in .nvmrc .node-version .tool-versions; do
if [ -f "$f" ]; then
echo "----- $f -----"
sed -n '1,50p' "$f" || true
fi
done
echo "=== Search CI workflows for actions/setup-node or node-version ==="
if [ -d .github/workflows ]; then
if [ $HAS_RG -eq 1 ]; then
rg --hidden -uu -nP 'actions/setup-node|node-version|setup-node' .github/workflows -S || true
else
grep -RInE 'actions/setup-node|node-version|setup-node' .github/workflows || true
fi
for wf in .github/workflows/*.{yml,yaml}; do
[ -f "$wf" ] && echo "----- $wf -----" && sed -n '1,200p' "$wf" || true
done
else
echo "no .github/workflows directory"
fi
echo "=== Search Dockerfiles for FROM node ==="
if [ $HAS_RG -eq 1 ]; then
rg --hidden -uu -nP '^FROM\s+node:' -g '!**/node_modules/**' -S || true
else
grep -RInE '^FROM\s+node:' --exclude-dir=node_modules . || true
fi
find . -maxdepth 4 -type f \( -iname 'Dockerfile' -o -iname 'Dockerfile.*' -o -iname '*Dockerfile*' \) -print -exec sed -n '1,120p' {} \; || true
echo "=== Other references to node versions/volta/NODE_VERSION ==="
if [ $HAS_RG -eq 1 ]; then
rg --hidden -uu -n 'NODE_VERSION|node-version|nvmrc|\.nvmrc|\.node-version|volta' -g '!**/node_modules/**' -S || true
else
grep -RInE 'NODE_VERSION|node-version|nvmrc|\.nvmrc|\.node-version|volta' --exclude-dir=node_modules . || true
fi
Length of output: 21350
Node >=24.1.0 — CI/deploy mismatch: fix runners/containers or relax engines; bump @types/node.
- package.json (top-level) sets "engines.node" = ">=24.1.0".
- Conflicting CI/containers found:
- .github/actions/get-node-version/Dockerfile — FROM node:20-alpine
- .github/workflows/test.yml — pre-commit uses actions/setup-node@v2 with node-version: "20"
- Many workflows (visual-diff/static-analysis/test) call the get-node-version action and thus inherit its Node image.
- Apps Dockerfiles already use Node 24.1.0 (apps/cyberstorm-remix, apps/cyberstorm-storybook).
- Action: either (A) update CI/action Dockerfiles and workflow setup-node steps to Node 24.1+ (recommended) — e.g. change .github/actions/get-node-version/Dockerfile to FROM node:24.1.0-alpine3.21 and update pre-commit workflow node-version to 24.1+, or (B) relax package.json engines to accept Node 20 if you must support older runners.
Suggested package changes (still relevant):
"engines": {
- "node": ">=24.1.0"
+ "node": ">=24.1.0 <25"
},
- "@types/node": "^20.16.0",
+ "@types/node": "^24.0.0",
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
"node": ">=24.1.0" | |
}, | |
"node": ">=24.1.0 <25" | |
}, |
"node": ">=24.1.0" | |
}, | |
"@types/node": "^24.0.0", |
🤖 Prompt for AI Agents
In package.json around lines 15-16, engines.node is set to ">=24.1.0" but
CI/workflows/Dockerfiles use Node 20 causing a mismatch; either (A) update CI
and action images to Node 24.1+ (recommended) by changing
.github/actions/get-node-version/Dockerfile base image to node:24.1.0-alpine (or
equivalent), update any workflows using actions/setup-node to node-version:
"24.1" (including pre-commit and workflows that call get-node-version), and bump
@types/node in devDependencies to a matching version; or (B) relax package.json
engines to ">=20" and update/bump @types/node to a version compatible with Node
20—apply only one of these two options consistently across package.json,
Dockerfiles, and all workflow files.
Summary by CodeRabbit
Chores
Impact