Skip to content

Commit 41a201e

Browse files
committed
module: runtime deprecate "main" index and extension lookups
1 parent bc396c8 commit 41a201e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/api/deprecations.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2729,13 +2729,16 @@ change the value has been deprecated and will be disabled in the future.
27292729
### DEP0151: Main index lookup and extension searching
27302730
<!-- YAML
27312731
changes:
2732+
- version: REPLACEME
2733+
pr-url: https://github.com/nodejs/node/pull/
2734+
description: Runtime deprecation.
27322735
- version: v15.8.0
27332736
pr-url: https://github.com/nodejs/node/pull/36918
27342737
description: Documentation-only deprecation
27352738
with `--pending-deprecation` support.
27362739
-->
27372740

2738-
Type: Documentation-only (supports [`--pending-deprecation`][])
2741+
Type: Runtime
27392742

27402743
Previously, `index.js` and extension searching lookups would apply to
27412744
`import 'pkg'` main entry point resolution, even when resolving ES modules.

lib/internal/modules/esm/resolve.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ function emitFolderMapDeprecation(match, pjsonUrl, isExports, base) {
9191
}
9292

9393
function emitLegacyIndexDeprecation(url, packageJSONUrl, base, main) {
94-
if (!pendingDeprecation)
95-
return;
9694
const { format } = defaultGetFormat(url);
9795
if (format !== 'module')
9896
return;

0 commit comments

Comments
 (0)