| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 827d3fe commit 72c6460
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -178,7 +178,7 @@ added: v8.5.0 | |||
| 178 | 178 | --> | |
| 179 | 179 | ||
| 180 | 180 | Enable latest experimental modules features (currently | |
| 181 | - `--experimental-conditional-exports` and `--experimental-resolve-self`). | ||
| 181 | + `--experimental-conditional-exports`). | ||
| 182 | 182 | ||
| 183 | 183 | ### `--experimental-policy` | |
| 184 | 184 | <!-- YAML | |
@@ -201,14 +201,6 @@ added: v11.8.0 | |||
| 201 | 201 | ||
| 202 | 202 | Enable experimental diagnostic report feature. | |
| 203 | 203 | ||
| 204 | - ### `--experimental-resolve-self` | ||
| 205 | - <!-- YAML | ||
| 206 | - added: v13.1.0 | ||
| 207 | - --> | ||
| 208 | - | ||
| 209 | - Enable experimental support for a package using `require` or `import` to load | ||
| 210 | - itself. | ||
| 211 | - | ||
| 212 | 204 | ### `--experimental-specifier-resolution=mode` | |
| 213 | 205 | <!-- YAML | |
| 214 | 206 | added: v13.4.0 | |
@@ -1091,7 +1083,6 @@ Node.js options that are allowed are: | |||
| 1091 | 1083 | * `--experimental-policy` | |
| 1092 | 1084 | * `--experimental-repl-await` | |
| 1093 | 1085 | * `--experimental-report` | |
| 1094 | - * `--experimental-resolve-self` | ||
| 1095 | 1086 | * `--experimental-specifier-resolution` | |
| 1096 | 1087 | * `--experimental-vm-modules` | |
| 1097 | 1088 | * `--experimental-wasi-unstable-preview1` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,9 +138,6 @@ Enable experimental | |||
| 138 | 138 | .Sy diagnostic report | |
| 139 | 139 | feature. | |
| 140 | 140 | . | |
| 141 | - .It Fl -experimental-resolve-self | ||
| 142 | - Enable experimental support for a package to load itself. | ||
| 143 | - . | ||
| 144 | 141 | .It Fl -experimental-vm-modules | |
| 145 | 142 | Enable experimental ES module support in VM module. | |
| 146 | 143 | . | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -64,7 +64,6 @@ const { getOptionValue } = require('internal/options'); | |||
| 64 | 64 | const enableSourceMaps = getOptionValue('--enable-source-maps'); | |
| 65 | 65 | const preserveSymlinks = getOptionValue('--preserve-symlinks'); | |
| 66 | 66 | const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); | |
| 67 | - const experimentalSelf = getOptionValue('--experimental-resolve-self'); | ||
| 68 | 67 | const experimentalConditionalExports = | |
| 69 | 68 | getOptionValue('--experimental-conditional-exports'); | |
| 70 | 69 | const manifest = getOptionValue('--experimental-policy') ? | |
@@ -429,10 +428,9 @@ function resolveBasePath(basePath, exts, isMain, trailingSlash, request) { | |||
| 429 | 428 | } | |
| 430 | 429 | ||
| 431 | 430 | function trySelf(parentPath, isMain, request) { | |
| 432 | - if (!experimentalSelf) { | ||
| 431 | + if (!experimentalConditionalExports) { | ||
| 433 | 432 | return false; | |
| 434 | 433 | } | |
| 435 | - | ||
| 436 | 434 | const { data: pkg, path: basePath } = readPackageScope(parentPath) || {}; | |
| 437 | 435 | if (!pkg || 'exports' in pkg === false) return false; | |
| 438 | 436 | if (typeof pkg.name !== 'string') return false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1153,9 +1153,6 @@ Maybe<URL> ResolveSelf(Environment* env, | |||
| 1153 | 1153 | const std::string& pkg_name, | |
| 1154 | 1154 | const std::string& pkg_subpath, | |
| 1155 | 1155 | const URL& base) { | |
| 1156 | - if (!env->options()->experimental_resolve_self) { | ||
| 1157 | - return Nothing<URL>(); | ||
| 1158 | - } | ||
| 1159 | 1156 | const PackageConfig* pcfg; | |
| 1160 | 1157 | if (GetPackageScopeConfig(env, base, base).To(&pcfg) && | |
| 1161 | 1158 | pcfg->exists == Exists::Yes) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -325,16 +325,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { | |||
| 325 | 325 | &EnvironmentOptions::userland_loader, | |
| 326 | 326 | kAllowedInEnvironment); | |
| 327 | 327 | AddAlias("--loader", "--experimental-loader"); | |
| 328 | - AddAlias("--experimental-modules", { "--experimental-conditional-exports", | ||
| 329 | - "--experimental-resolve-self" }); | ||
| 328 | + AddAlias("--experimental-modules", { "--experimental-conditional-exports" }); | ||
| 330 | 329 | AddOption("--experimental-conditional-exports", | |
| 331 | 330 | "experimental support for conditional exports targets", | |
| 332 | 331 | &EnvironmentOptions::experimental_conditional_exports, | |
| 333 | 332 | kAllowedInEnvironment); | |
| 334 | - AddOption("--experimental-resolve-self", | ||
| 335 | - "experimental support for require/import of the current package", | ||
| 336 | - &EnvironmentOptions::experimental_resolve_self, | ||
| 337 | - kAllowedInEnvironment); | ||
| 338 | 333 | AddOption("--experimental-wasm-modules", | |
| 339 | 334 | "experimental ES Module support for webassembly modules", | |
| 340 | 335 | &EnvironmentOptions::experimental_wasm_modules, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -103,7 +103,6 @@ class EnvironmentOptions : public Options { | |||
| 103 | 103 | bool enable_source_maps = false; | |
| 104 | 104 | bool experimental_conditional_exports = false; | |
| 105 | 105 | bool experimental_json_modules = false; | |
| 106 | - bool experimental_resolve_self = false; | ||
| 107 | 106 | std::string experimental_specifier_resolution; | |
| 108 | 107 | std::string es_module_specifier_resolution; | |
| 109 | 108 | bool experimental_wasm_modules = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -170,12 +170,7 @@ function assertIncludes(actual, expected) { | |||
| 170 | 170 | '--experimental-conditional-exports', | |
| 171 | 171 | '/es-modules/conditional-exports.js', | |
| 172 | 172 | 'Conditional exports', | |
| 173 | - ], | ||
| 174 | - [ | ||
| 175 | - '--experimental-resolve-self', | ||
| 176 | - '/node_modules/pkgexports/resolve-self.js', | ||
| 177 | - 'Package name self resolution', | ||
| 178 | - ], | ||
| 173 | + ] | ||
| 179 | 174 | ].forEach(([flag, file, message]) => { | |
| 180 | 175 | const child = spawn(process.execPath, [flag, path(file)]); | |
| 181 | 176 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments