Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 100ed74

Browse filesBrowse files
randy5235MylesBorins
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 b7d4404 commit 100ed74
Copy full SHA for 100ed74

File tree

Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/modules/cjs/helpers.js‎

Copy file name to clipboardExpand all lines: lib/internal/modules/cjs/helpers.js
+3-1Lines changed: 3 additions & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.