Skip to content

Commit 373f4d6

Browse files
ofrobotsrvagg
authored andcommitted
async_hooks: remove runtime deprecation
As part of the backport to 8.x, this change removes the runtime deprecation making this a docs-only deprecation for 8.x. PR-URL: #19517 Reviewed-By: mcollina - Matteo Collina <[email protected]>
1 parent 7e23946 commit 373f4d6

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

lib/async_hooks.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,6 @@ function triggerAsyncId() {
143143

144144
const destroyedSymbol = Symbol('destroyed');
145145

146-
let emitBeforeAfterWarning = true;
147-
function showEmitBeforeAfterWarning() {
148-
if (emitBeforeAfterWarning) {
149-
process.emitWarning(
150-
'asyncResource.emitBefore and emitAfter are deprecated. Please use ' +
151-
'asyncResource.runInAsyncScope instead',
152-
'DeprecationWarning', 'DEP0098');
153-
emitBeforeAfterWarning = false;
154-
}
155-
}
156-
157146
class AsyncResource {
158147
constructor(type, opts = {}) {
159148
if (typeof type !== 'string')
@@ -189,13 +178,11 @@ class AsyncResource {
189178
}
190179

191180
emitBefore() {
192-
showEmitBeforeAfterWarning();
193181
emitBefore(this[async_id_symbol], this[trigger_async_id_symbol]);
194182
return this;
195183
}
196184

197185
emitAfter() {
198-
showEmitBeforeAfterWarning();
199186
emitAfter(this[async_id_symbol]);
200187
return this;
201188
}

0 commit comments

Comments
 (0)