mirror of
https://github.com/nodejs/node.git
synced 2025-05-03 00:19:41 +00:00
module: runtime deprecate exports double slash maps
PR-URL: https://github.com/nodejs/node/pull/44495 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
parent
a157e55658
commit
7dd2f41c73
@ -3201,13 +3201,16 @@ The [`--trace-atomics-wait`][] flag is deprecated.
|
|||||||
|
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
changes:
|
changes:
|
||||||
|
- version: REPLACEME
|
||||||
|
pr-url: https://github.com/nodejs/node/pull/44495
|
||||||
|
description: Runtime deprecation.
|
||||||
- version: REPLACEME
|
- version: REPLACEME
|
||||||
pr-url: https://github.com/nodejs/node/pull/44477
|
pr-url: https://github.com/nodejs/node/pull/44477
|
||||||
description: Documentation-only deprecation
|
description: Documentation-only deprecation
|
||||||
with `--pending-deprecation` support.
|
with `--pending-deprecation` support.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Type: Documentation-only (supports [`--pending-deprecation`][])
|
Type: Runtime
|
||||||
|
|
||||||
Package imports and exports targets mapping into paths including a double slash
|
Package imports and exports targets mapping into paths including a double slash
|
||||||
(of _"/"_ or _"\\"_) are deprecated and will fail with a resolution validation
|
(of _"/"_ or _"\\"_) are deprecated and will fail with a resolution validation
|
||||||
|
@ -33,7 +33,6 @@ const {
|
|||||||
Stats,
|
Stats,
|
||||||
} = require('fs');
|
} = require('fs');
|
||||||
const { getOptionValue } = require('internal/options');
|
const { getOptionValue } = require('internal/options');
|
||||||
const pendingDeprecation = getOptionValue('--pending-deprecation');
|
|
||||||
// Do not eagerly grab .manifest, it may be in TDZ
|
// Do not eagerly grab .manifest, it may be in TDZ
|
||||||
const policy = getOptionValue('--experimental-policy') ?
|
const policy = getOptionValue('--experimental-policy') ?
|
||||||
require('internal/process/policy') :
|
require('internal/process/policy') :
|
||||||
@ -102,7 +101,6 @@ function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|||||||
const doubleSlashRegEx = /[/\\][/\\]/;
|
const doubleSlashRegEx = /[/\\][/\\]/;
|
||||||
|
|
||||||
function emitInvalidSegmentDeprecation(target, request, match, pjsonUrl, base) {
|
function emitInvalidSegmentDeprecation(target, request, match, pjsonUrl, base) {
|
||||||
if (!pendingDeprecation) { return; }
|
|
||||||
const pjsonPath = fileURLToPath(pjsonUrl);
|
const pjsonPath = fileURLToPath(pjsonUrl);
|
||||||
const double = RegExpPrototypeExec(doubleSlashRegEx, target) !== null;
|
const double = RegExpPrototypeExec(doubleSlashRegEx, target) !== null;
|
||||||
process.emitWarning(
|
process.emitWarning(
|
||||||
|
Loading…
Reference in New Issue
Block a user