Skip to content

[unenv-preset] Support native child_process module when experimental flag is enabled#12573

Merged
petebacondarwin merged 1 commit intomainfrom
pbacondarwin/native-child-process
Feb 16, 2026
Merged

[unenv-preset] Support native child_process module when experimental flag is enabled#12573
petebacondarwin merged 1 commit intomainfrom
pbacondarwin/native-child-process

Conversation

@petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Feb 16, 2026

Support the native node:child_process module from workerd when the enable_nodejs_child_process_module and experimental compatibility flags are enabled.

The native child_process module in workerd (like the unenv polyfill) is a stub - all methods throw errors. The key differences:

  • workerd: Throws ERR_METHOD_NOT_IMPLEMENTED (Node.js-style error), validates arguments before throwing
  • unenv: Throws generic Error with "[unenv] ... is not implemented yet!", has __unenv__: true marker

Since both implementations are non-functional stubs that throw errors, the breaking change risk is low.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: This is an experimental feature that follows the existing pattern

Open with Devin

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: 013fe8e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link
Contributor

claude bot commented Feb 16, 2026

Claude finished @petebacondarwin's task —— View job


Changeset Review

Reviewing the changeset for this PR...

  • Read changeset guidelines
  • Review changeset file
  • Validate against criteria

All changesets look good

The changeset .changeset/native-child-process-module.md meets all requirements:

  • Version type: minor is correct for adding a new experimental feature
  • Changelog quality: Clear description with explanation of the experimental nature and required compatibility flags
  • Markdown headers: No h1/h2/h3 headers used
  • Experimental feature note: Includes information on how to opt in (requires both enable_nodejs_child_process_module and experimental compatibility flags)

@petebacondarwin petebacondarwin force-pushed the pbacondarwin/native-child-process branch from e3010fe to 013fe8e Compare February 16, 2026 18:17
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 16, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12573

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12573

miniflare

npm i https://pkg.pr.new/miniflare@12573

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12573

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12573

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12573

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12573

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12573

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12573

wrangler

npm i https://pkg.pr.new/wrangler@12573

commit: 013fe8e

@petebacondarwin petebacondarwin marked this pull request as ready for review February 16, 2026 19:21
@petebacondarwin petebacondarwin requested a review from a team as a code owner February 16, 2026 19:21
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Copy link
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

Thanks

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Feb 16, 2026
@petebacondarwin petebacondarwin merged commit 9a565d5 into main Feb 16, 2026
38 of 39 checks passed
@petebacondarwin petebacondarwin deleted the pbacondarwin/native-child-process branch February 16, 2026 20:42
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants