Skip to content

fix(cloudflare): set rolldown platform to node with nodeCompat#4138

Merged
pi0 merged 2 commits intomainfrom
fix/cf-node-compat
Mar 20, 2026
Merged

fix(cloudflare): set rolldown platform to node with nodeCompat#4138
pi0 merged 2 commits intomainfrom
fix/cf-node-compat

Conversation

@pi0
Copy link
Copy Markdown
Member

@pi0 pi0 commented Mar 20, 2026

related to #4137

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nitro.build Ready Ready Preview, Comment Mar 20, 2026 6:20pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ffb5ffac-25a0-4c78-a353-689ff71e1939

📥 Commits

Reviewing files that changed from the base of the PR and between c7245c0 and 90436e9.

📒 Files selected for processing (1)
  • src/presets/cloudflare/utils.ts
✅ Files skipped from review due to trivial changes (1)
  • src/presets/cloudflare/utils.ts

📝 Walkthrough

Walkthrough

When nitro.options.cloudflare.nodeCompat is enabled, enableNodeCompat now ensures nitro.options.rolldownConfig exists and sets its platform to "node" (if unset) before adding the unenvCfNodeCompat entry to nitro.options.unenv.

Changes

Cohort / File(s) Summary
Cloudflare Node Compatibility Configuration
src/presets/cloudflare/utils.ts
When nodeCompat is truthy, initialize nitro.options.rolldownConfig (default {}) and set rolldownConfig.platform = "node" if not already set, then add unenvCfNodeCompat to nitro.options.unenv.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'fix' type and references the cloudflare platform, matching the code changes.
Description check ✅ Passed The description references issue #4137 which is related to the changeset's Cloudflare node compatibility fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cf-node-compat

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.

Tip

CodeRabbit can use oxc to improve the quality of JavaScript and TypeScript code reviews.

Add a configuration file to your project to customize how CodeRabbit runs oxc.

@pi0 pi0 changed the title fix(cloudflare): enable node flag when node compat is on fix(cloudflare): set rolldown platform to node with nodeCompat Mar 20, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Mar 20, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4138

commit: 90436e9

@pi0 pi0 merged commit 2218d45 into main Mar 20, 2026
12 checks passed
@pi0 pi0 deleted the fix/cf-node-compat branch March 20, 2026 18:24
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.

1 participant