-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
chore: update node version to 20 #6363
Conversation
WalkthroughThe pull request involves updating the base Node.js image from version 18 to version 20 across three different Dockerfiles: Changes
Poem
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
admin/Dockerfile.admin
(1 hunks)space/Dockerfile.space
(1 hunks)web/Dockerfile.web
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
web/Dockerfile.web (1)
Line range hint
4-4
: Verify package.json compatibility with Node.js 20While upgrading to Node.js 20, please ensure:
- The
engines
field in package.json is updated to reflect the new Node.js version- All dependencies are compatible with Node.js 20
- Breaking changes in Node.js 20 are addressed
Run this script to check package.json files and dependencies:
Also applies to: 18-18
✅ Verification successful
Node.js 20 upgrade is safe to proceed
The codebase analysis shows no compatibility issues with Node.js 20:
- No explicit Node.js version constraints in any package.json
- All dependencies, including Next.js 14.x and React 18.x, are compatible with Node.js 20
- Modern dependency versions are used throughout the project
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check package.json files for Node.js version and dependencies echo "Checking package.json files..." fd package.json --type f --exec cat {} \; | jq -r '. | select(.engines != null) | .engines' # List direct dependencies to verify compatibility echo "Listing dependencies for compatibility check..." fd package.json --type f --exec jq -r '.dependencies // {} | keys[]' {} \;Length of output: 8120
Script:
#!/bin/bash # First, check package.json files content echo "=== Package.json files content ===" fd package.json --type f --exec sh -c 'echo "\n=== {} ==="; cat {}' \;Length of output: 18877
@@ -1,7 +1,7 @@ | |||
# ***************************************************************************** | |||
# STAGE 1: Build the project | |||
# ***************************************************************************** | |||
FROM node:18-alpine AS builder | |||
FROM node:20-alpine AS builder |
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.
Ensure consistent Node.js versions across all stages
While the builder stage has been updated to node:20-alpine
, the installer and runner stages are still using node:18-alpine
. This inconsistency could potentially lead to compatibility issues during the build process.
Apply this diff to maintain version consistency:
# Stage 1
FROM node:20-alpine AS builder
# Stage 2
-FROM node:18-alpine AS installer
+FROM node:20-alpine AS installer
# Stage 3
-FROM node:18-alpine AS runner
+FROM node:20-alpine AS runner
Committable suggestion skipped: line range outside the PR's diff.
@@ -1,7 +1,7 @@ | |||
# ***************************************************************************** | |||
# STAGE 1: Build the project | |||
# ***************************************************************************** | |||
FROM node:18-alpine AS builder | |||
FROM node:20-alpine AS builder |
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.
Ensure consistent Node.js versions across all stages
Similar to space/Dockerfile.space, there's an inconsistency in Node.js versions across stages. The builder stage uses node:20-alpine
while installer and runner stages use node:18-alpine
.
Apply this diff to maintain version consistency:
# Stage 1
FROM node:20-alpine AS builder
# Stage 2
-FROM node:18-alpine AS installer
+FROM node:20-alpine AS installer
# Stage 3
-FROM node:18-alpine AS runner
+FROM node:20-alpine AS runner
Committable suggestion skipped: line range outside the PR's diff.
@@ -15,7 +15,7 @@ RUN turbo prune --scope=web --docker | |||
# STAGE 2: Install dependencies & build the project | |||
# ***************************************************************************** | |||
# Add lockfile and package.json's of isolated subworkspace | |||
FROM node:18-alpine AS installer | |||
FROM node:20-alpine AS installer |
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.
Ensure consistent Node.js versions across all stages and update builder stage
The Node.js version update is inconsistent:
- Builder stage still uses
node:18-alpine
(missed update) - Installer stage uses
node:20-alpine
- Runner stage uses
node:18-alpine
Apply this diff to maintain version consistency and update all stages:
# Stage 1
-FROM node:18-alpine AS builder
+FROM node:20-alpine AS builder
# Stage 2
FROM node:20-alpine AS installer
# Stage 3
-FROM node:18-alpine AS runner
+FROM node:20-alpine AS runner
Committable suggestion skipped: line range outside the PR's diff.
Description
This PR updates the node version to 20 for web, space and admin apps.
Summary by CodeRabbit