diff options
author | Guy Bedford <guybedford@gmail.com> | 2021-09-08 20:36:52 +0300 |
---|---|---|
committer | Guy Bedford <guybedford@gmail.com> | 2021-09-15 09:58:56 +0300 |
commit | 7216fb118df228699457a5510646bf2b61a9ca88 (patch) | |
tree | 957dccd121592830ee260bce8c1c4f68d67305a5 /doc | |
parent | 798c0cb6bca7ad0ac7e2ac6f84fe8aed10545ed5 (diff) |
module: deprecate trailing slash pattern mappings
PR-URL: https://github.com/nodejs/node/pull/40039
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webmaster@geoffreybooth.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/deprecations.md | 14 | ||||
-rw-r--r-- | doc/api/esm.md | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index aa4d0d024a4..e25e855c085 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2814,6 +2814,20 @@ Type: Documentation-only (supports [`--pending-deprecation`][]) The `'hash'` and `'mgf1Hash'` options are replaced with `'hashAlgorithm'` and `'mgf1HashAlgorithm'`. +### DEP0155: Trailing slashes in pattern specifier resolutions +<!-- YAML +changes: + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/40039 + description: Documentation-only deprecation + with `--pending-deprecation` support. +--> + +Type: Documentation-only (supports [`--pending-deprecation`][]) + +The remapping of specifiers ending in `"/"` like `import 'pkg/x/'` is deprecated +for package `"exports"` and `"imports"` pattern resolutions. + [Legacy URL API]: url.md#legacy-url-api [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 diff --git a/doc/api/esm.md b/doc/api/esm.md index 9d7792441ca..a3aa832e7c8 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -1205,6 +1205,8 @@ _isImports_, _conditions_) > _expansionKey_ up to but excluding the first _"*"_ character. > 1. If _patternBase_ is not **null** and _matchKey_ starts with but is not > equal to _patternBase_, then +> 1. If _matchKey_ ends with _"/"_, throw an _Invalid Module Specifier_ +> error. > 1. Let _patternTrailer_ be the substring of _expansionKey_ from the > index after the first _"*"_ character. > 1. If _patternTrailer_ has zero length, or if _matchKey_ ends with |