diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c0f1d38d555215..d1ed3a23c26d7a 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2820,13 +2820,16 @@ and `'mgf1HashAlgorithm'`. ### DEP0155: Trailing slashes in pattern specifier resolutions -Type: Documentation-only (supports [`--pending-deprecation`][]) +Type: Runtime The remapping of specifiers ending in `"/"` like `import 'pkg/x/'` is deprecated for package `"exports"` and `"imports"` pattern resolutions. diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index b0a7cec5c59a3f..dcb7d10a47961a 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -39,7 +39,6 @@ const { sep, relative, resolve } = require('path'); const preserveSymlinks = getOptionValue('--preserve-symlinks'); const preserveSymlinksMain = getOptionValue('--preserve-symlinks-main'); const typeFlag = getOptionValue('--input-type'); -const pendingDeprecation = getOptionValue('--pending-deprecation'); const { URL, pathToFileURL, fileURLToPath } = require('internal/url'); const { ERR_INPUT_TYPE_NOT_ALLOWED, @@ -107,7 +106,6 @@ function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { } function emitTrailingSlashPatternDeprecation(match, pjsonUrl, isExports, base) { - if (!pendingDeprecation) return; const pjsonPath = fileURLToPath(pjsonUrl); if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return; diff --git a/test/es-module/test-esm-exports-deprecations.mjs b/test/es-module/test-esm-exports-deprecations.mjs index 8c7a07b0204b9a..fd92dd3d78d14e 100644 --- a/test/es-module/test-esm-exports-deprecations.mjs +++ b/test/es-module/test-esm-exports-deprecations.mjs @@ -1,4 +1,3 @@ -// Flags: --pending-deprecation import { mustCall } from '../common/index.mjs'; import assert from 'assert'; diff --git a/test/es-module/test-esm-local-deprecations.mjs b/test/es-module/test-esm-local-deprecations.mjs index 8d946b6650ed3b..a9030b40912ddb 100644 --- a/test/es-module/test-esm-local-deprecations.mjs +++ b/test/es-module/test-esm-local-deprecations.mjs @@ -1,5 +1,3 @@ -// Flags: --pending-deprecation - import '../common/index.mjs'; import assert from 'assert'; import fixtures from '../common/fixtures.js';