Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module: deprecate "main" index and extension lookups #36918

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
guybedford and aduh95 committed Jan 23, 2021
commit 2ce97400424608cae818d3e40e39b9c73a7dc149
7 changes: 4 additions & 3 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2730,16 +2730,17 @@ change the value has been deprecated and will be disabled in the future.
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/36918
description: Documentation-only deprecation.
description: Documentation-only deprecation
with `--pending-deprecation` support.
-->

Type: Documentation (supports [`--pending-deprecation`][])
Type: Documentation-only (supports [`--pending-deprecation`][])

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

With this deprecation, all ES module main entry point resolutions require
an explicit `"exports"` or `"main"` entry with the exact file extension.
an explicit [`"exports"`][] or [`"main"`][] entry with the exact file extension.


[Legacy URL API]: url.md#url_legacy_url_api
Expand Down