-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use native node:vm module when available
#10621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: cdd5733 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 |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
vicb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Changes look good to me.
Could you please add to the PR description what this depends on (the PR in workerd) and in what release is first appears.
Also please update the peer dep on workerd in the unenv-preset to that date
node:vm modue when availablenode:vm module when available
165d6ba to
525348a
Compare
vicb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a breaking change for compat date >= 2025-10-01 as some workerd function throws when unenv polyfill would not.
Could you please details all of those difference in the PR description.
IIRC Next.js uses some of those vm APIs so OpenNext might break after updating wrangler past this PR. We should at least run the Open Next e2e test suite with a compat date after October 1st.
|
There are two main differences between the two implementations:
If these two are changed then the rest of the differences go away. |
525348a to
2d6b8cd
Compare
|
Blocked on cloudflare/workerd#5606 |
|
The upstream PR has now landed, so this will be unblocked when it is released tomorrow. |
|
rebased + bump workerd to 1202 where the console implementation has been merged |
97eb9b2 to
cdd5733
Compare
The native code appears in workerd as of https://github.com/cloudflare/workerd/releases/tag/v1.20250910.0.
It was turned on by default (when
nodejs_compatis on) on 2025-10-01.The remote mode tests would fail if we didn't have a version of workerd in prod that supports this.