Skip to content

Commit ff5f1fb

Browse files
randy5235jasnell
authored andcommitted
lib: migrate process.binding to getOptions
PR-URL: #23522 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent e9efac6 commit ff5f1fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/modules/cjs/helpers.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const {
99
CHAR_HASH,
1010
} = require('internal/constants');
1111

12+
const { getOptions } = internalBinding('options');
13+
1214
// Invoke with makeRequireFunction(module) where |module| is the Module object
1315
// to use as the context for the require() function.
1416
function makeRequireFunction(mod) {
@@ -105,7 +107,7 @@ const builtinLibs = [
105107
'v8', 'vm', 'zlib'
106108
];
107109

108-
if (process.binding('config').experimentalWorker) {
110+
if (getOptions('--experimental-worker')) {
109111
builtinLibs.push('worker_threads');
110112
builtinLibs.sort();
111113
}

0 commit comments

Comments
 (0)