diff options
author | Guy Bedford <guybedford@gmail.com> | 2019-10-11 17:57:13 -0400 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2019-11-12 14:04:55 -0800 |
commit | 796f3d0af49164314868c4778af90eca356f1fef (patch) | |
tree | f1b8d619df36917b03ba035630f389e1da305712 /lib/internal/modules/cjs/helpers.js | |
parent | cc6f99de449beb0993db3647de4ef979bead804d (diff) | |
download | android-node-v8-796f3d0af49164314868c4778af90eca356f1fef.tar.gz android-node-v8-796f3d0af49164314868c4778af90eca356f1fef.tar.bz2 android-node-v8-796f3d0af49164314868c4778af90eca356f1fef.zip |
esm: unflag --experimental-modules
PR-URL: https://github.com/nodejs/node/pull/29866
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'lib/internal/modules/cjs/helpers.js')
-rw-r--r-- | lib/internal/modules/cjs/helpers.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/internal/modules/cjs/helpers.js b/lib/internal/modules/cjs/helpers.js index 7a98700245..b75f67c0a4 100644 --- a/lib/internal/modules/cjs/helpers.js +++ b/lib/internal/modules/cjs/helpers.js @@ -6,8 +6,6 @@ const { ERR_UNKNOWN_BUILTIN_MODULE } = require('internal/errors').codes; const { NativeModule } = require('internal/bootstrap/loaders'); -const { getOptionValue } = require('internal/options'); -const experimentalModules = getOptionValue('--experimental-modules'); const { validateString } = require('internal/validators'); const path = require('path'); @@ -16,11 +14,11 @@ const { URL } = require('url'); const debug = require('internal/util/debuglog').debuglog('module'); -function loadNativeModule(filename, request, experimentalModules) { +function loadNativeModule(filename, request) { const mod = NativeModule.map.get(filename); if (mod) { debug('load native module %s', request); - mod.compileForPublicLoader(experimentalModules); + mod.compileForPublicLoader(); return mod; } } @@ -45,10 +43,7 @@ function makeRequireFunction(mod, redirects) { const href = destination.href; if (destination.protocol === 'node:') { const specifier = destination.pathname; - const mod = loadNativeModule( - specifier, - href, - experimentalModules); + const mod = loadNativeModule(specifier, href); if (mod && mod.canBeRequiredByUsers) { return mod.exports; } |