Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: do not modify prototype deprecated asyncResource (encore)
Previous attempt has missed one argument (`useEmitSync`), therefore it
effectively did not work as intended.

This change sets `useEmitSync` to `false` which is equivalent to
previous behaviour of `undefined` and sets `modifyPrototype` to `false`
as expected.

Refs: #58218
Refs: #59195
  • Loading branch information
slagiewka committed Aug 26, 2025
commit f0329933755bb5f935fe00a1d577ebdf412465dc
4 changes: 2 additions & 2 deletions lib/async_hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ class AsyncResource {
enumerable: true,
get: deprecate(function() {
return self;
}, 'The asyncResource property on bound functions is deprecated', 'DEP0172', false),
}, 'The asyncResource property on bound functions is deprecated', 'DEP0172', false, false),
set: deprecate(function(val) {
self = val;
}, 'The asyncResource property on bound functions is deprecated', 'DEP0172', false),
}, 'The asyncResource property on bound functions is deprecated', 'DEP0172', false, false),
},
});
return bound;
Expand Down
Loading