Skip to content

Drop node:process polyfill when v2 is available#12377

Merged
vicb merged 14 commits intomainfrom
vicb/process-v2
Feb 5, 2026
Merged

Drop node:process polyfill when v2 is available#12377
vicb merged 14 commits intomainfrom
vicb/process-v2

Conversation

@vicb
Copy link
Copy Markdown
Contributor

@vicb vicb commented Feb 3, 2026

Closes #12379

When we first enabled process v2 (#10805) it broke Astro.

The workerd runtime was consequently fixed with 2 different compatibility.

This PR drop the unenv polyfill when the native node:process v2 is enabled AND both fixes are also enabled.

The linked issue has more details.

/cc @petebacondarwin @guybedford @jasnell @danlapid


  • 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: no user facing change

A picture of a cute animal (not mandatory, but encouraged)

@vicb vicb requested a review from a team as a code owner February 3, 2026 06:28
@vicb vicb added skip-pr-description-validation Skip validation of the required PR description format no-changeset-required labels Feb 3, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: ef3bde7

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
Copy Markdown
Contributor

claude bot commented Feb 3, 2026

Claude finished @vicb's task —— View job


Changeset Review

All changesets look good

The changeset .changeset/mean-numbers-unite.md meets all requirements:

  1. Version Type: patch is appropriate for this change (switching from polyfill to native implementation with minimal breaking changes)
  2. Changelog Quality: Clear description with detailed conditions and a helpful example showing the breaking change
  3. Markdown Headers: No h1/h2/h3 headers used ✓
  4. Analytics: Not applicable - no analytics changes
  5. Dependabot: Not applicable
  6. Experimental Features: Not applicable

The changeset provides:

  • Clear title explaining what's changing
  • Specific conditions for when the native v2 is used
  • Important note about the EventEmitter API behavior change with a code example

The description is well-structured and will be helpful in the changelog.


Copy link
Copy Markdown
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 found 1 potential issue.

View issue and 4 additional flags in Devin Review.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Feb 3, 2026

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: ef3bde7

@vicb vicb removed skip-pr-description-validation Skip validation of the required PR description format no-changeset-required labels Feb 4, 2026
@vicb vicb changed the title [IGNORE - for pre-release] Drop node:process polyfill when v2 is available (#10805) Drop node:process polyfill when v2 is available (#10805) Feb 4, 2026
@vicb vicb changed the title Drop node:process polyfill when v2 is available (#10805) Drop node:process polyfill when v2 is available Feb 4, 2026
Copy link
Copy Markdown
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 found 1 new potential issue.

View issue and 7 additional flags in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
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 found 1 new potential issue.

View issue and 10 additional flags in Devin Review.

Open in Devin Review

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Minor documentation nits. Thanks for seeing this one through. Very exciting to finally ditch the process global polyfill!

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Feb 5, 2026
vicb and others added 5 commits February 5, 2026 22:07
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
@vicb
Copy link
Copy Markdown
Contributor Author

vicb commented Feb 5, 2026

Thanks Pete and Guy for the reviews!

I have integrated the feedback and will merge on the Ci is happy !

@vicb vicb merged commit 312b5eb into main Feb 5, 2026
35 checks passed
@vicb vicb deleted the vicb/process-v2 branch February 5, 2026 21:40
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Feb 5, 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.

[unenv-preset] Plan to enable workerd native node:process v2

4 participants