| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent de719fc commit 53b3984
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -168,9 +168,9 @@ The default is `explicit`, which requires providing the full path to a | |||
| 168 | 168 | module. The `node` mode will enable support for optional file extensions and | |
| 169 | 169 | the ability to import a directory that has an index file. | |
| 170 | 170 | ||
| 171 | - Please see [customizing esm specifier resolution][] for example usage. | ||
| 171 | + Please see [customizing ESM specifier resolution][] for example usage. | ||
| 172 | 172 | ||
| 173 | - ### `--experimental-conditional-exports | ||
| 173 | + ### `--experimental-conditional-exports` | ||
| 174 | 174 | <!-- YAML | |
| 175 | 175 | added: REPLACEME | |
| 176 | 176 | --> | |
@@ -1366,17 +1366,17 @@ greater than `4` (its current default value). For more information, see the | |||
| 1366 | 1366 | [`tls.DEFAULT_MIN_VERSION`]: tls.html#tls_tls_default_min_version | |
| 1367 | 1367 | [`unhandledRejection`]: process.html#process_event_unhandledrejection | |
| 1368 | 1368 | [Chrome DevTools Protocol]: https://chromedevtools.github.io/devtools-protocol/ | |
| 1369 | + [Conditional Exports]: esm.html#esm_conditional_exports | ||
| 1369 | 1370 | [REPL]: repl.html | |
| 1370 | 1371 | [ScriptCoverage]: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage | |
| 1371 | 1372 | [Source Map]: https://sourcemaps.info/spec.html | |
| 1372 | 1373 | [Subresource Integrity]: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity | |
| 1373 | 1374 | [V8 JavaScript code coverage]: https://v8project.blogspot.com/2017/12/javascript-code-coverage.html | |
| 1374 | - [customizing esm specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm | ||
| 1375 | + [context-aware]: addons.html#addons_context_aware_addons | ||
| 1376 | + [customizing ESM specifier resolution]: esm.html#esm_customizing_esm_specifier_resolution_algorithm | ||
| 1375 | 1377 | [debugger]: debugger.html | |
| 1376 | 1378 | [debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications | |
| 1377 | 1379 | [emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor | |
| 1378 | 1380 | [experimental ECMAScript Module]: esm.html#esm_resolve_hook | |
| 1379 | 1381 | [libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html | |
| 1380 | 1382 | [remote code execution]: https://www.owasp.org/index.php/Code_Injection | |
| 1381 | - [context-aware]: addons.html#addons_context_aware_addons | ||
| 1382 | - [Conditional Exports]: esm.html#esm_conditional_exports | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -628,9 +628,9 @@ CommonJS and ES module instances of the package: | |||
| 628 | 628 | package, it would be used like this: | |
| 629 | 629 | ||
| 630 | 630 | ```js | |
| 631 | - import date from 'date'; | ||
| 632 | - const someDate = new date(); | ||
| 633 | - // someDate contains state; date does not | ||
| 631 | + import Date from 'date'; | ||
| 632 | + const someDate = new Date(); | ||
| 633 | + // someDate contains state; Date does not | ||
| 634 | 634 | ``` | |
| 635 | 635 | ||
| 636 | 636 | The `new` keyword isn’t required; a package’s function can return a new | |
@@ -1221,7 +1221,7 @@ _defaultEnv_ is the conditional environment name priority array, | |||
| 1221 | 1221 | > 1. Throw a _Module Not Found_ error. | |
| 1222 | 1222 | > 1. If _pjson.exports_ is not **null** or **undefined**, then | |
| 1223 | 1223 | > 1. If _exports_ is an Object with both a key starting with _"."_ and a key | |
| 1224 | - > not starting with _"."_, throw a "Invalid Package Configuration" error. | ||
| 1224 | + > not starting with _"."_, throw an "Invalid Package Configuration" error. | ||
| 1225 | 1225 | > 1. If _pjson.exports_ is a String or Array, or an Object containing no | |
| 1226 | 1226 | > keys starting with _"."_, then | |
| 1227 | 1227 | > 1. Return **PACKAGE_EXPORTS_TARGET_RESOLVE**(_packageURL_, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -234,15 +234,15 @@ RESOLVE_BARE_SPECIFIER(DIR, X) | |||
| 234 | 234 | b. If "exports" is null or undefined, GOTO 3. | |
| 235 | 235 | c. If "exports" is an object with some keys starting with "." and some keys | |
| 236 | 236 | not starting with ".", throw "invalid config". | |
| 237 | - c. If "exports" is a string, or object with no keys starting with ".", treat | ||
| 237 | + d. If "exports" is a string, or object with no keys starting with ".", treat | ||
| 238 | 238 | it as having that value as its "." object property. | |
| 239 | - d. If subpath is "." and "exports" does not have a "." entry, GOTO 3. | ||
| 240 | - e. Find the longest key in "exports" that the subpath starts with. | ||
| 241 | - f. If no such key can be found, throw "not found". | ||
| 242 | - g. let RESOLVED_URL = | ||
| 239 | + e. If subpath is "." and "exports" does not have a "." entry, GOTO 3. | ||
| 240 | + f. Find the longest key in "exports" that the subpath starts with. | ||
| 241 | + g. If no such key can be found, throw "not found". | ||
| 242 | + h. let RESOLVED_URL = | ||
| 243 | 243 | PACKAGE_EXPORTS_TARGET_RESOLVE(pathToFileURL(DIR/name), exports[key], | |
| 244 | - subpath.slice(key.length)), as defined in the esm resolver. | ||
| 245 | - h. return fileURLToPath(RESOLVED_URL) | ||
| 244 | + subpath.slice(key.length)), as defined in the ESM resolver. | ||
| 245 | + i. return fileURLToPath(RESOLVED_URL) | ||
| 246 | 246 | 3. return DIR/X | |
| 247 | 247 | ``` | |
| 248 | 248 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -122,9 +122,6 @@ Enable experimental JSON interop support for the ES Module loader. | |||
| 122 | 122 | .It Fl -experimental-modules | |
| 123 | 123 | Enable experimental ES module support and caching modules. | |
| 124 | 124 | . | |
| 125 | - .It Fl -experimental-resolve-self | ||
| 126 | - Enable experimental support for a package to load itself. | ||
| 127 | - . | ||
| 128 | 125 | .It Fl -experimental-policy | |
| 129 | 126 | Use the specified file as a security policy. | |
| 130 | 127 | . | |
@@ -138,6 +135,9 @@ Enable experimental | |||
| 138 | 135 | .Sy diagnostic report | |
| 139 | 136 | feature. | |
| 140 | 137 | . | |
| 138 | + .It Fl -experimental-resolve-self | ||
| 139 | + Enable experimental support for a package to load itself. | ||
| 140 | + . | ||
| 141 | 141 | .It Fl -experimental-vm-modules | |
| 142 | 142 | Enable experimental ES module support in VM module. | |
| 143 | 143 | . | |
| Back | FazBrowse Home | New Git URL |
0 commit comments