Skip to content

Commit

Permalink
expose process.binding('util').getPromiseDetails
Browse files Browse the repository at this point in the history
  • Loading branch information
seanwentzel committed Jan 5, 2024
1 parent 825d91a commit 14e013d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/internal/bootstrap/realm.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,16 @@ const experimentalModuleList = new SafeSet();
'DEP0111');
}
if (legacyWrapperList.has(module)) {
return requireBuiltin('internal/legacy/processbinding')[module]();
const legacy = requireBuiltin('internal/legacy/processbinding')[module]();
if (module === 'util') {
// We need getPromiseDetails and constants.kFulfilled from `internalBinding('util')`
return {
...legacy,
...internalBinding('util'),
};
} else {

Check failure on line 165 in lib/internal/bootstrap/realm.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Unnecessary 'else' after 'return'
return legacy;
}
}
return internalBinding(module);
}
Expand Down

0 comments on commit 14e013d

Please sign in to comment.