Skip to content

Commit 7dd2f41

Browse files
authored
module: runtime deprecate exports double slash maps
PR-URL: #44495 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent a157e55 commit 7dd2f41

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/api/deprecations.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -3201,13 +3201,16 @@ The [`--trace-atomics-wait`][] flag is deprecated.
32013201

32023202
<!-- YAML
32033203
changes:
3204+
- version: REPLACEME
3205+
pr-url: https://github.com/nodejs/node/pull/44495
3206+
description: Runtime deprecation.
32043207
- version: REPLACEME
32053208
pr-url: https://github.com/nodejs/node/pull/44477
32063209
description: Documentation-only deprecation
32073210
with `--pending-deprecation` support.
32083211
-->
32093212

3210-
Type: Documentation-only (supports [`--pending-deprecation`][])
3213+
Type: Runtime
32113214

32123215
Package imports and exports targets mapping into paths including a double slash
32133216
(of _"/"_ or _"\\"_) are deprecated and will fail with a resolution validation

lib/internal/modules/esm/resolve.js

-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const {
3333
Stats,
3434
} = require('fs');
3535
const { getOptionValue } = require('internal/options');
36-
const pendingDeprecation = getOptionValue('--pending-deprecation');
3736
// Do not eagerly grab .manifest, it may be in TDZ
3837
const policy = getOptionValue('--experimental-policy') ?
3938
require('internal/process/policy') :
@@ -102,7 +101,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
102101
const doubleSlashRegEx = /[/\\][/\\]/;
103102

104103
function emitInvalidSegmentDeprecation(target, request, match, pjsonUrl, base) {
105-
if (!pendingDeprecation) { return; }
106104
const pjsonPath = fileURLToPath(pjsonUrl);
107105
const double = RegExpPrototypeExec(doubleSlashRegEx, target) !== null;
108106
process.emitWarning(

0 commit comments

Comments
 (0)