| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,13 +161,6 @@ the ability to import a directory that has an index file. | |||
| 161 | 161 | ||
| 162 | 162 | Please see [customizing esm specifier resolution][] for example usage. | |
| 163 | 163 | ||
| 164 | - ### `--experimental-exports` | ||
| 165 | - <!-- YAML | ||
| 166 | - added: v12.7.0 | ||
| 167 | - --> | ||
| 168 | - | ||
| 169 | - Enable experimental resolution using the `exports` field in `package.json`. | ||
| 170 | - | ||
| 171 | 164 | ### `--experimental-json-modules` | |
| 172 | 165 | <!-- YAML | |
| 173 | 166 | added: v12.9.0 | |
@@ -1042,7 +1035,6 @@ Node.js options that are allowed are: | |||
| 1042 | 1035 | * `--enable-fips` | |
| 1043 | 1036 | * `--enable-source-maps` | |
| 1044 | 1037 | * `--es-module-specifier-resolution` | |
| 1045 | - * `--experimental-exports` | ||
| 1046 | 1038 | * `--experimental-json-modules` | |
| 1047 | 1039 | * `--experimental-loader` | |
| 1048 | 1040 | * `--experimental-modules` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -203,7 +203,7 @@ NODE_MODULES_PATHS(START) | |||
| 203 | 203 | 5. return DIRS | |
| 204 | 204 | ``` | |
| 205 | 205 | ||
| 206 | - If `--experimental-exports` is enabled, Node.js allows packages loaded via | ||
| 206 | + Node.js allows packages loaded via | ||
| 207 | 207 | `LOAD_NODE_MODULES` to explicitly declare which file paths to expose and how | |
| 208 | 208 | they should be interpreted. This expands on the control packages already had | |
| 209 | 209 | using the `main` field. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -71,7 +71,6 @@ const { | |||
| 71 | 71 | } = require('internal/errors').codes; | |
| 72 | 72 | const { validateString } = require('internal/validators'); | |
| 73 | 73 | const pendingDeprecation = getOptionValue('--pending-deprecation'); | |
| 74 | - const experimentalExports = getOptionValue('--experimental-exports'); | ||
| 75 | 74 | ||
| 76 | 75 | module.exports = Module; | |
| 77 | 76 | ||
@@ -373,7 +372,7 @@ function findLongestRegisteredExtension(filename) { | |||
| 373 | 372 | const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/; | |
| 374 | 373 | function resolveExports(nmPath, request, absoluteRequest) { | |
| 375 | 374 | // The implementation's behavior is meant to mirror resolution in ESM. | |
| 376 | - if (experimentalExports && !absoluteRequest) { | ||
| 375 | + if (!absoluteRequest) { | ||
| 377 | 376 | const [, name, expansion = ''] = | |
| 378 | 377 | StringPrototype.match(request, EXPORTS_PATTERN) || []; | |
| 379 | 378 | if (!name) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -651,8 +651,7 @@ Maybe<const PackageConfig*> GetPackageConfig(Environment* env, | |||
| 651 | 651 | } | |
| 652 | 652 | ||
| 653 | 653 | Local<Value> exports_v; | |
| 654 | - if (env->options()->experimental_exports && | ||
| 655 | - pkg_json->Get(env->context(), | ||
| 654 | + if (pkg_json->Get(env->context(), | ||
| 656 | 655 | env->exports_string()).ToLocal(&exports_v) && | |
| 657 | 656 | !exports_v->IsNullOrUndefined()) { | |
| 658 | 657 | Global<Value> exports; | |
@@ -994,7 +993,6 @@ Maybe<URL> PackageExportsResolve(Environment* env, | |||
| 994 | 993 | const std::string& pkg_subpath, | |
| 995 | 994 | const PackageConfig& pcfg, | |
| 996 | 995 | const URL& base) { | |
| 997 | - CHECK(env->options()->experimental_exports); | ||
| 998 | 996 | Isolate* isolate = env->isolate(); | |
| 999 | 997 | Local<Context> context = env->context(); | |
| 1000 | 998 | Local<Value> exports = pcfg.exports.Get(isolate); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -326,10 +326,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
| 326 | 326 | "experimental Source Map V3 support", | |
| 327 | 327 | &EnvironmentOptions::enable_source_maps, | |
| 328 | 328 | kAllowedInEnvironment); | |
| 329 | - AddOption("--experimental-exports", | ||
| 330 | - "experimental support for exports in package.json", | ||
| 331 | - &EnvironmentOptions::experimental_exports, | ||
| 332 | - kAllowedInEnvironment); | ||
| 333 | 329 | AddOption("--experimental-json-modules", | |
| 334 | 330 | "experimental JSON interop support for the ES Module loader", | |
| 335 | 331 | &EnvironmentOptions::experimental_json_modules, | |
@@ -344,7 +340,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
| 344 | 340 | "experimental ES Module support and caching modules", | |
| 345 | 341 | &EnvironmentOptions::experimental_modules, | |
| 346 | 342 | kAllowedInEnvironment); | |
| 347 | - Implies("--experimental-modules", "--experimental-exports"); | ||
| 348 | 343 | AddOption("--experimental-wasm-modules", | |
| 349 | 344 | "experimental ES Module support for webassembly modules", | |
| 350 | 345 | &EnvironmentOptions::experimental_wasm_modules, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,7 +101,6 @@ class EnvironmentOptions : public Options { | |||
| 101 | 101 | public: | |
| 102 | 102 | bool abort_on_uncaught_exception = false; | |
| 103 | 103 | bool enable_source_maps = false; | |
| 104 | - bool experimental_exports = false; | ||
| 105 | 104 | bool experimental_json_modules = false; | |
| 106 | 105 | bool experimental_modules = false; | |
| 107 | 106 | std::string es_module_specifier_resolution; | |
| Back | FazBrowse Home | New Git URL |
0 commit comments