Repository navigation
Conversation
Emit DEP0212 when async_hooks.createHook() is called, as the first step before putting it behind a flag. The inspector and the node.async_hooks trace event category use an internal createHook() and do not emit the warning. Refs: nodejs#61030 Signed-off-by: Matteo Collina <[email protected]>
Collaborator
|
Review requested:
|
Signed-off-by: Matteo Collina <[email protected]>
Signed-off-by: Matteo Collina <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #67271 +/- ##
==========================================
- Coverage 92.99% 90.71% -2.29%
==========================================
Files 428 802 +374
Lines 195754 282173 +86419
Branches 30292 54356 +24064
==========================================
+ Hits 182049 255964 +73915
- Misses 13378 16325 +2947
- Partials 327 9884 +9557
🚀 New features to boost your workflow:
|
joyeecheung
reviewed
Nov 5, 2026
bjohansebas
approved these changes
Nov 5, 2026
Co-authored-by: Joyee Cheung <[email protected]>
Co-authored-by: Joyee Cheung <[email protected]>
joyeecheung
reviewed
Nov 6, 2026
joyeecheung
reviewed
Nov 6, 2026
Signed-off-by: Matteo Collina <[email protected]>
joyeecheung
reviewed
Nov 9, 2026
joyeecheung
left a comment
Member
There was a problem hiding this comment.
Code LGTM, thanks, with a comment on an unnecessary test
legendecas
approved these changes
Nov 9, 2026
Signed-off-by: Matteo Collina <[email protected]>
legendecas
approved these changes
Nov 13, 2026
joyeecheung
approved these changes
Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
async_hooks.createHook()now emits a DEP0212 deprecation warning. This is the first step of the deprecation cycle suggested in #61030 (comment): warn in the 27 alpha, then require--enable-async-hooksin 27 current.The public
AsyncHookclass is unchanged. The inspector and thenode.async_hookstrace event category switch to a minimalInternalAsyncHookininternal/async_hooks, so enabling them does not emit the warning. Trace events still track promises (it emits thePROMISEevents from JavaScript), so that is now covered intest-trace-events-async-hooks.js.Printing the warning schedules a tick that a freshly enabled hook sees without a matching
init, so the tests that check exact hook invocations now run with--no-deprecation.Refs: #61030