KEMBAR78
Use the native `node:cluster` module when available by vicb · Pull Request #10954 · cloudflare/workers-sdk · GitHub
Skip to content

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Oct 13, 2025

node:cluster was implemented in workerd in cloudflare/workerd#5035, released in https://github.com/cloudflare/workerd/releases/tag/v1.20250912.0

node:cluster native implementation matches the previous unenv implementation


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: will be documented by the runtime team
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: unenv not backported to v3

/cc @anonrig @jasnell @petebacondarwin

@vicb vicb requested review from a team as code owners October 13, 2025 08:04
@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: 8b0ba2d

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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 13, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 8b0ba2d

@vicb vicb requested a review from petebacondarwin October 13, 2025 12:12
@vicb vicb added skip-v3-pr Skip validation of presence of a v3 backport PR unenv labels Oct 13, 2025
Copy link
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.

Approved with a typo...

Also I note that there is a flaw in the native code, which has no external impact right now:

https://github.com/cloudflare/workerd/blob/main/src/node/cluster.ts#L98

That line should be calling setupMaster() not setupPrimary().
Fixed in cloudflare/workerd#5303

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 14, 2025
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
@vicb vicb merged commit ee7d710 into main Oct 14, 2025
39 of 42 checks passed
@vicb vicb deleted the vicb/node-cluster branch October 14, 2025 19:17
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-v3-pr Skip validation of presence of a v3 backport PR unenv

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants