Skip to content

fix(cloudflare,proxy): fetcher missing globalThis context - #890

Open
harlan-zw wants to merge 2 commits into
mainfrom
fix/issue-889
Open

fix(cloudflare,proxy): fetcher missing globalThis context#890
harlan-zw wants to merge 2 commits into
mainfrom
fix/issue-889

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

📚 Description

Closes #889.

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

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
scripts-playground Ready Ready Preview Sep 7, 2026 3:21pm UTC

Request Review

@socket-security

socket-security Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedminiflare@​4.20260730.09910010096100

View full report

@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: d428ab5f-f28a-4955-a640-cdbb74588c39

📥 Commits

Reviewing files that changed from the base of the PR and between cc309b5 and fad6cfd.

📒 Files selected for processing (1)
  • pnpm-workspace.yaml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The platform network dispatcher now binds globalThis.fetch to globalThis and returns a PublicNetworkDispatcher. The workspace adds Miniflare and workerd build configuration. Tests cover detached dispatcher calls in Node and workerd for GET, streamed POST, and string POST requests.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to fad6c

This change fixes Cloudflare Worker proxy forwarding by binding fetch to its global context and adds coverage for forwarded requests. No concrete current-head merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Cloudflare proxy fetch context fix and matches the main code change.
Description check ✅ Passed The description links the pull request to issue #889, which covers the Cloudflare Umami proxy failure addressed by the changes.
Linked Issues check ✅ Passed The changes bind the dispatcher fetch function to globalThis and add Workerd integration tests for GET and POST requests. These changes address the 502 proxy failure and preserve forwarding to the con…
Out of Scope Changes check ✅ Passed The dependency, workspace build configuration, implementation change, and integration tests all support the Cloudflare Workerd proxy fix. No unrelated code changes are evident.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 3 files. (1 skipped: 1 …
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-889

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.

@harlan-zw harlan-zw added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 6, 2026
@harlan-zw

harlan-zw commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 READY · 94/100

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. A person still decides the merge.

  • Merge gate: Passed.
  • Review gate: Passed. No material issues.
  • CI gate: Passed.

@harlan-zw harlan-zw added harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 6, 2026
@harlan-zw harlan-zw changed the title fix: resolve issue #889 fix: handle proxy 503s Sep 7, 2026
@harlan-zw harlan-zw changed the title fix: handle proxy 503s fix: proxy fetcher missing globalThis context Sep 7, 2026
@harlan-zw harlan-zw changed the title fix: proxy fetcher missing globalThis context fix(cloudflare,proxy): fetcher missing globalThis context Sep 7, 2026
@harlan-zw harlan-zw added harlan-agent-pending The automated Review is waiting on a gate for this head commit. harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-pending The automated Review is waiting on a gate for this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 7, 2026
@harlan-zw harlan-zw added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 7, 2026
@harlan-zw harlan-zw removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

📦 Package Size

⚠️ 3 size metrics grew

📚 22 runtime dependencies (no change)

Package output Gzipped Δ
@nuxt/scripts · dist/runtime 98 kB → 98 kB 🔴 +130 B (+0.1%)
@nuxt/scripts · published payload 208 kB → 208 kB 🔴 +130 B (+0.1%)
@nuxt/scripts · server runtime 28 kB → 28 kB 🔴 +130 B (+0.5%)
All tracked output (27)
Package output Gzipped Raw
@nuxt/scripts-cli · runtime dependencies 72 kB 355 kB
@nuxt/scripts-cli · dependency magicast 72 kB 355 kB
@nuxt/scripts-cli · export . 3.4 kB 12 kB
@nuxt/scripts-cli · published payload 3.4 kB 12 kB
@nuxt/scripts · runtime dependencies 451 kB 2.00 MB
@nuxt/scripts · dependency @nuxt/devtools-kit 2.9 kB 7.7 kB
@nuxt/scripts · dependency @oxc-project/types 0 B 0 B
@nuxt/scripts · dependency @vueuse/core 174 kB 707 kB
@nuxt/scripts · dependency @vueuse/shared 39 kB 154 kB
@nuxt/scripts · dependency h3 34 kB 146 kB
@nuxt/scripts · dependency magic-string 9.4 kB 42 kB
@nuxt/scripts · dependency oxc-walker 7.6 kB 31 kB
@nuxt/scripts · dependency semver 25 kB 72 kB
@nuxt/scripts · dependency sirv 8.8 kB 21 kB
@nuxt/scripts · dependency unstorage 70 kB 225 kB
@nuxt/scripts · dependency valibot 80 kB 592 kB
@nuxt/scripts · dist/runtime 98 kB 285 kB 🔴
@nuxt/scripts · export . 25 kB 106 kB
@nuxt/scripts · export ./registry 28 kB 89 kB
@nuxt/scripts · export ./stats 13 kB 89 kB
@nuxt/scripts · export ./types-source 43 kB 222 kB
@nuxt/scripts · published payload 208 kB 791 kB 🔴
@nuxt/scripts · components runtime 2.4 kB 6.2 kB
@nuxt/scripts · composables runtime 7.5 kB 24 kB
@nuxt/scripts · registry runtime 42 kB 123 kB
@nuxt/scripts · server runtime 28 kB 84 kB 🔴
@nuxt/scripts · utils runtime 2.5 kB 7.4 kB
Runtime dependencies (22)
Package Dependency Requested Resolved Cost
@nuxt/scripts-cli magicast ^0.5.4 0.5.4 📦 72 kB gzip
@nuxt/scripts-cli pathe ^2.0.3 2.0.3 ♻️ free via Nuxt 4.5.1
@nuxt/scripts @nuxt/devtools-kit ^3.4.1 3.4.1 📦 2.9 kB gzip
@nuxt/scripts @oxc-project/types ^0.143.0 0.143.0 📦 0 B gzip
@nuxt/scripts @vueuse/core ^14.4.0 14.4.0 📦 174 kB gzip
@nuxt/scripts @vueuse/shared ^14.4.0 14.4.0 📦 39 kB gzip
@nuxt/scripts consola ^3.4.2 3.4.2 ♻️ free via Nuxt 4.5.1
@nuxt/scripts defu ^6.1.7 6.1.7 ♻️ free via Nuxt 4.5.1
@nuxt/scripts h3 ^1.15.11 1.15.11 📦 34 kB gzip
@nuxt/scripts magic-string ^1.1.0 1.1.0 📦 9.4 kB gzip, Nuxt has 1.0.0
@nuxt/scripts ofetch ^1.5.1 1.5.1 ♻️ free via Nuxt 4.5.1
@nuxt/scripts ohash ^2.0.11 2.0.11 ♻️ free via Nuxt 4.5.1
@nuxt/scripts oxc-walker ^1.1.1 1.1.1 📦 7.6 kB gzip, Nuxt has 1.0.0
@nuxt/scripts pathe ^2.0.3 2.0.3 ♻️ free via Nuxt 4.5.1
@nuxt/scripts semver ^7.8.5 7.8.5 📦 25 kB gzip
@nuxt/scripts sirv ^3.0.2 3.0.2 📦 8.8 kB gzip
@nuxt/scripts std-env ^4.2.0 4.2.0 ♻️ free via Nuxt 4.5.1
@nuxt/scripts ufo ^1.6.4 1.6.4 ♻️ free via Nuxt 4.5.1
@nuxt/scripts ultrahtml ^1.7.0 1.7.0 ♻️ free via Nuxt 4.5.1
@nuxt/scripts unplugin ^3.3.0 3.3.0 ♻️ free via Nuxt 4.5.1
@nuxt/scripts unstorage ^1.17.5 1.17.5 📦 70 kB gzip
@nuxt/scripts valibot ^1.4.2 1.4.2 📦 80 kB gzip

Baseline: main_@_9368f012___2026-08-24 · gzip is the comparison metric · changes below 16 B gzip are ignored

@pkg-pr-new

pkg-pr-new Bot commented Sep 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@890

commit: fad6cfd

@harlan-zw harlan-zw added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-ready The automated Review passed every gate on this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

harlan-agent-ready The automated Review passed every gate on this head commit.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Umami first-party proxy returns 502 on Cloudflare Workers with @nuxt/scripts 1.3.5+

1 participant