Skip to content

fix(task): support dev worker listening on a unix socket or named pipe - #4797

Merged
pi0 merged 1 commit into
v2from
fix/v2-task-socket-path
Oct 15, 2026
Merged

pi0 merged 1 commit into
v2from
fix/v2-task-socket-path

Conversation

@pi0x

@pi0x pi0x commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Backport of #3268 to v2.

On v2 the dev worker listens on a unix socket (or a named pipe on Windows) by default. Native fetch ignores socketPath, so nitro task list and nitro task run were sent to http://localhost:3000 and failed (#3264). When the build info has a socketPath, the task client now sends requests through a small node:http fetch passed to ofetch's createFetch. The TCP path is unchanged.

This differs from main on purpose. Main replaced ofetch with its own http.request JSON client. Keeping ofetch on v2 means errors are still FetchError with the same message, statusCode and data, and JSON parsing and retries work as before. Added a unit test that runs runTask and listTasks against a socket server.

🤖 Generated with AI assistant

@pi0x
pi0x requested a review from pi0 as a code owner October 15, 2026 09:56
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 15, 2026 9:56am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 15, 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: 9f44cdc7-8ca4-4ba0-aa28-47380c6e9a81

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
  • Autofix · 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 Oct 15, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 05924f8

@pi0
pi0 merged commit 5a7451d into v2 Oct 15, 2026
12 checks passed
@pi0
pi0 deleted the fix/v2-task-socket-path branch October 15, 2026 10:08

This branch was successfully deployed

1 active deployment
Preview — 05924f82 Deployed Oct 15, 2026 by vercel[bot]
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