FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

doc: esm resolver spec refactoring for deprecations by guybedford · Pull Request #40314 · nodejs/node · GitHub

/ node Public

doc: esm resolver spec refactoring for deprecations - #40314

Closed
guybedford wants to merge 1 commit into
nodejs:masterfrom
guybedford:full-trailing-slash-deprecation
Closed

doc: esm resolver spec refactoring for deprecations#40314
guybedford wants to merge 1 commit into
nodejs:masterfrom
guybedford:full-trailing-slash-deprecation

Conversation

guybedford commented Oct 4, 2021
edited by aduh95
Loading

Copy link
Copy Markdown
Contributor

This PR integrates the current ES module resolver deprecations into the specification assuming those deprecations have all been runtime deprecated.

Specifically:

  1. Removes the reference to the CJS module resolver when there is no "exports" field. This assumes the runtime deprecation of the index lookups deprecation, such that the main can just be resolved directly as a subpath without any statting when the exports fields is not declared by a package.
  2. Since we now have trailing slash deprecations in patterns module: runtime deprecate trailing slash patterns #40117 as well as former folder deprecations for trailing slashes as well, when combined with (1) above the result is that trailing slashes never ever resolve for packages. As such when all of the above become runtime deprecations, it is possible to instead throw early as a resolution failure for package resolutions with a trailing slash. The refactoring is made now in the spec to indicate this, even though these runtime deprecations haven't happened yet. The goal being to ensure that the current spec reflects the current state with all deprecations enabled.

In the process I also spotted two simple spec editorial changes included here as well.

@nodejs/modules

Refs: #37206
Refs: #40117

nodejs-github-bot added doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. labels Oct 4, 2021
guybedford changed the title docs: esm resolver spec refactoring for deprecations doc: esm resolver spec refactoring for deprecations Oct 4, 2021
guybedford force-pushed the full-trailing-slash-deprecation branch from 3bb3298 to 0a40695 Compare October 4, 2021 16:18
guybedford requested a review from aduh95 October 5, 2021 16:00

aduh95 commented Oct 5, 2021

Copy link
Copy Markdown
Contributor

Could you add the refs to the PR that added the runtime deprecations please? That would help reviewing this. Also we should probably add dont-land labels as I think those deprecations haven't land on LTS release lines.

Copy link
Copy Markdown
Contributor Author

@aduh95 the one reference is in the description, the other reference is the PR you did for the index deprecations I believe, is that the one you are after?

aduh95 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for reminding me, I've added Refs: to the OP so it's added to the commit message on landing.

Copy link
Copy Markdown
Contributor Author

Landed in ccee352.

guybedford closed this Oct 8, 2021
guybedford added a commit that referenced this pull request Oct 8, 2021
PR-URL: #40314
Refs: #37206
Refs: #40117
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL