-
Notifications
You must be signed in to change notification settings - Fork 27
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
async_hooks.AsyncHook
hooks has extra methods
#403
Comments
async_hooks.AsyncHook
hooks
Can you please provide more context why it is a bug? (is there any library that depends on this behavior) From what I read, the class method calls But also can confirm
|
These are the symbols (not methods) whereas in unenv it is implemented as a method. Node.js used symbols to have "private properties" before |
Here is the node.js implementation: https://github.com/nodejs/node/blob/55cc372b963af76dcbd37994f28f1a663c9298ee/lib/async_hooks.js#L75 |
Yeah got it. They are extra. But what bug it causes currently? |
async_hooks.AsyncHook
hooksasync_hooks.AsyncHook
hooks has extra methods
Removing them will make a breaking change, which means that while removing this polyfill from Cloudflare Workers, we need to implement these methods even though they are not node.js compatible. |
Ah i see it is precaution. If had time do you mind to drop a PR then? 🙏🏼 |
Environment
N/A
Reproduction
unenv/src/runtime/node/async_hooks/internal/async-hook.ts
Line 25 in ada7c40
AsyncHook class should not have functions that should be defined in async hook callbacks. Specifically any methods except enable and disable should be removed.
Describe the bug
async_hook polyfill is wrong.
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: