Skip to content

Commit

Permalink
update: remove deprecation warning on v17.2+ (#393)
Browse files Browse the repository at this point in the history
* update: remove deprecation warning on v17.2+

* update: check if is not undefined asyncWrapProviders
  • Loading branch information
RafaelGSS authored Jan 19, 2022
1 parent 7b90646 commit 93a0324
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion collect/system-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

const path = require('path')
const Module = require('module')
const asyncWrap = process.binding('async_wrap') // eslint-disable-line node/no-deprecated-api
const wrapProviders = require('async_hooks').asyncWrapProviders
let asyncWrap

if (wrapProviders) {
asyncWrap = { Providers: wrapProviders }
} else {
asyncWrap = process.binding('async_wrap') // eslint-disable-line node/no-deprecated-api
}

function getMainDirectory () {
if (process._eval != null) return process.cwd()
Expand Down

0 comments on commit 93a0324

Please sign in to comment.