-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use workerd node:console when available
#10606
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: 424e3bd 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: |
b4ff485 to
8d6dc07
Compare
8d6dc07 to
d3e026c
Compare
8827f0c to
5b5443b
Compare
a3cbb67 to
34785fa
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.
We should check all the APIs available in unenv and make sure they have a similar behavior in the native implementation.
I stopped after seeing that _stdoutErrorHandler and _stdoutErrorHandler do not.
Could you please note all the differences in the PR description and then we can decide if we want to integrate that breaking change or not.
Noted, PTAL |
34785fa to
f3c59b8
Compare
f3c59b8 to
52cb85f
Compare
|
Blocked on cloudflare/workerd#5610 |
|
cloudflare/workerd#5610 has landed so this should become unblocked when that is released tomorrow. |
9bad080 to
22d71b3
Compare
|
rebased + bump workerd to 1202 where the console implementation has been merged |
This changes the unenv-preset so that it only applies the unenv polyfills for
consolewhen the native implementation is not turned on (via compat flag or compat date).The native code was merged into workerd at https://github.com/cloudflare/workerd/releases/tag/v1.20250911.0
The tests would fail if the production edgeworker doesn't include the correct native code.
All the members of the console module are the same between the polyfill and native except for the following:
_stderr- in workerd it isprocess.stderr, in unenv it isnew Writable()_stdout- in workerd it isprocess.stdout, in unenv it isnew Writable()_stdoutErrorHandler- in workerd it throws an error, in unenv it is a noop_stderrErrorHandler- in workerd it throws an error, in unenv it is a noopI think the first two are not breaking changes. In fact it provides a more full implementation natively than unenv.
The second two are breaking changes from unenv.