Skip to content

Feat: Next.js standalone build support#10

Merged
Meldiron merged 4 commits intomainfrom
feat-next-standalone
Oct 31, 2025
Merged

Feat: Next.js standalone build support#10
Meldiron merged 4 commits intomainfrom
feat-next-standalone

Conversation

@Meldiron
Copy link
Contributor

@Meldiron Meldiron commented Oct 30, 2025

Summary by CodeRabbit

  • Improvements
    • Improved SSR detection for Next.js to recognize additional server entry patterns, reducing missed server-side projects and improving compatibility checks.
  • Tests
    • Added unit tests covering new Next.js server-entry scenarios and several Nuxt rendering cases to increase detection reliability and test coverage.

@coderabbitai
Copy link

coderabbitai bot commented Oct 30, 2025

Walkthrough

Adds './server.js' to the Next.js entry list in FRAMEWORK_FILES inside src/Detection/Rendering/SSR.php. Updates tests in tests/unit/DetectorTest.php: adds a Next.js SSR detection case expecting [".next/some-standalone-files.js", "server.js"] to be detected as Next.js SSR with no fallback, and adds multiple Nuxt-related scenarios (Nuxt SSR and Nuxt static cases with various fallback files). No other framework mappings, public signatures, or runtime detection logic were changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Changes are small and localized: one mapping update and several additional unit test cases.
  • Review focus:
    • src/Detection/Rendering/SSR.php — confirm server.js entry formatting and correct placement under the nextjs key in FRAMEWORK_FILES.
    • tests/unit/DetectorTest.php — verify the new Next.js and Nuxt test cases accurately represent expected detection outcomes (SSR vs static and fallback handling).
    • Run the test suite to ensure no unintended detection precedence or false positives.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "Feat: Next.js standalone build support" directly and accurately reflects the main change in the changeset. The primary code modification adds 'server.js' to the Next.js framework detection logic in SSR.php, which is exactly what "Next.js standalone build support" describes. The title is concise, specific, and uses clear, descriptive language that a reviewer scanning the commit history would immediately understand. While the test changes include some Nuxt-related scenarios, these are secondary to the core functionality improvement for Next.js detection.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat-next-standalone

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd23ea2 and 9833d95.

📒 Files selected for processing (1)
  • tests/unit/DetectorTest.php (1 hunks)
🔇 Additional comments (2)
tests/unit/DetectorTest.php (2)

359-359: LGTM! Next.js standalone build test case added.

The test case correctly verifies that Next.js SSR is detected when server.js is present alongside .next directory files, which aligns with the PR objective of adding standalone build support.


361-364: LGTM! Good isolation testing for Nuxt framework.

The comment clearly explains the intent, and the test cases appropriately verify that adding server.js to Next.js detection doesn't interfere with Nuxt framework identification. The scenarios cover both SSR and static rendering modes for Nuxt, ensuring proper framework disambiguation.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 89f96e8 and 06a0ea7.

📒 Files selected for processing (1)
  • src/Detection/Rendering/SSR.php (1 hunks)

Copy link

@hmacr hmacr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Meldiron Meldiron merged commit 9a41be5 into main Oct 31, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants