diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index fa2f52c8265c2f..860d5aa749f10d 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2737,13 +2737,16 @@ change the value has been deprecated and will be disabled in the future. ### DEP0151: Main index lookup and extension searching -Type: Documentation-only (supports [`--pending-deprecation`][]) +Type: Runtime Previously, `index.js` and extension searching lookups would apply to `import 'pkg'` main entry point resolution, even when resolving ES modules. diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index 043e31dc2b66f0..d7e22368f90c8f 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -91,8 +91,6 @@ function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) { } function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) { - if (!pendingDeprecation) - return; const { format } = defaultGetFormat(url); if (format !== 'module') return;