Skip to content

fix(cloudflare): warn only about conflicting asset overrides - #4690

Merged
pi0 merged 5 commits into
nitrojs:v2from
harlan-zw:fix/cloudflare-assets-override-warning
Oct 3, 2026
Merged

pi0 merged 5 commits into
nitrojs:v2from
harlan-zw:fix/cloudflare-assets-override-warning

Conversation

@harlan-zw

Copy link
Copy Markdown
Contributor

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

A valid assets.html_handling setting triggers an override warning even though Nitro retains it in generated Wrangler configuration. Warn only when Nitro replaces the effective asset binding or directory. Respect context configuration precedence for each field.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

@harlan-zw
harlan-zw requested a review from pi0 as a code owner September 30, 2026 06:52
@vercel

vercel Bot commented Sep 30, 2026

Copy link
Copy Markdown

@harlan-zw is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7827601f-d804-43a0-a3fd-8891bd352f1e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitropack@4690

commit: 02345c6

@harlan-zw
harlan-zw marked this pull request as draft September 30, 2026 08:49
@pi0
pi0 marked this pull request as ready for review October 3, 2026 16:45
User wrangler config paths are relative to that file, while context config
paths end up in the generated config. Compare resolved paths instead of
normalized strings, and attribute the warning to the source that conflicts.
@pi0x

pi0x commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

I pushed 02345c6 on top: the directory check was comparing strings from different bases (a root wrangler.json path is relative to that file, the generated one to .output/server), so ./.output/public warned while ../public (outside the project) did not. It now compares resolved paths and the warning names the source that actually conflicts; the tests use root-relative paths and cover both cases.

Triaged with AI assistance.

@pi0
pi0 merged commit 9b45da2 into nitrojs:v2 Oct 3, 2026
10 of 11 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.

3 participants