diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index e25e855c085e9b..0c64468e1f8116 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2817,13 +2817,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 167f55ab3e9115..1f40fe4f09c438 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -40,7 +40,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, @@ -108,7 +107,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';