From 0f9ee5a9dc7da2d7ccab4018e7f59c42c233a2a0 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 2 Sep 2022 18:19:47 +0200 Subject: [PATCH 1/2] module: runtime deprecate exports double slash maps --- lib/internal/modules/esm/resolve.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index bfee280212fc4d..91ac345e96df86 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -33,7 +33,6 @@ const { Stats, } = require('fs'); const { getOptionValue } = require('internal/options'); -const pendingDeprecation = getOptionValue('--pending-deprecation'); // Do not eagerly grab .manifest, it may be in TDZ const policy = getOptionValue('--experimental-policy') ? require('internal/process/policy') : @@ -102,7 +101,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { const doubleSlashRegEx = /[/\\][/\\]/; function emitInvalidSegmentDeprecation(target, request, match, pjsonUrl, base) { - if (!pendingDeprecation) { return; } const pjsonPath = fileURLToPath(pjsonUrl); const double = RegExpPrototypeExec(doubleSlashRegEx, target) !== null; process.emitWarning( From 51ee3e8a09cb630b752dcbcdbf58fc25531cf127 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 2 Sep 2022 18:23:35 +0200 Subject: [PATCH 2/2] update deprecation note --- doc/api/deprecations.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index f19b1cab4f8110..ac42905c7024d1 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3201,13 +3201,16 @@ The [`--trace-atomics-wait`][] flag is deprecated. -Type: Documentation-only (supports [`--pending-deprecation`][]) +Type: Runtime Package imports and exports targets mapping into paths including a double slash (of _"/"_ or _"\\"_) are deprecated and will fail with a resolution validation