From 3cc9aec988a47beda8eb9b93398f9ab7c5caabad Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 3 Feb 2021 18:55:15 +0100 Subject: [PATCH] module: runtime deprecate subpath folder mappings PR-URL: https://github.com/nodejs/node/pull/37215 Reviewed-By: Guy Bedford Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Myles Borins --- doc/api/deprecations.md | 16 +++++++--------- doc/api/packages.md | 7 +++++-- lib/internal/modules/esm/resolve.js | 16 +--------------- test/es-module/test-esm-local-deprecations.mjs | 3 ++- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index bd92a3b32e17b6..18574f5e0a6227 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2697,24 +2697,22 @@ Use `fs.rm(path, { recursive: true, force: true })`, ### DEP0148: Folder mappings in `"exports"` (trailing `"/"`) -Type: Runtime (supports [`--pending-deprecation`][]) +Type: Runtime -Prior to [subpath patterns][] support, it was possible to define +Using a trailing `"/"` to define [subpath folder mappings][] in the [subpath exports][] or -[subpath imports][] fields using a trailing `"/"`. - -Without `--pending-deprecation`, runtime warnings occur only for exports -resolutions not in `node_modules`. This means there will not be deprecation -warnings for `"exports"` in dependencies. With `--pending-deprecation`, a -runtime warning results no matter where the `"exports"` usage occurs. +[subpath imports][] fields is deprecated. Use [subpath patterns][] instead. ### DEP0149: `http.IncomingMessage#connection`