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

[v12 backport] ESM (named exports for CJS, package.json docs, subpath export patterns, warning removal) #35757

Closed
wants to merge 17 commits into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Oct 22, 2020

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/modules

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. esm Issues and PRs related to the ECMAScript Modules implementation. v12.x labels Oct 22, 2020
@aduh95 aduh95 force-pushed the backport-esm-history-to-v12 branch from 3c94340 to 16fcd04 Compare October 22, 2020 16:27
@aduh95 aduh95 changed the title [v12 backport] doc,esm: add history support info [v12 backport] doc: Packages page: package.json fields, esm support info, etc. Oct 22, 2020
@aduh95 aduh95 force-pushed the backport-esm-history-to-v12 branch 2 times, most recently from 6d32a9a to db5cf81 Compare October 22, 2020 17:17
@aduh95
Copy link
Contributor Author

aduh95 commented Oct 22, 2020

@guybedford This PR includes a backport for #34718 and I've also cherry-picked your commit in #35749. Can you have a look to check if I haven't done something odd?

Copy link
Contributor

@guybedford guybedford left a comment

Choose a reason for hiding this comment

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

Thanks for picking this one up!

I had a brief skim through and couldn't see anything out of place.

I've added this to the list at #35749 as well.

@aduh95
Copy link
Contributor Author

aduh95 commented Oct 23, 2020

@guybedford I just realised in #35749 you said that the export pattern support should be backported, but I actually did that in this PR. That's because I cherry-picked all the commits in the packages.md history, so the export pattern one is in there. Maybe I should do that differently?

@nodejs/backporters What should be the process here? Should I split this PR into three (documentation-only commits that landed before the export pattern one, export pattern support, documentation-only after the export pattern commit), or should I keep it all in this PR? I think it makes sense to land all of it in one bulk, but that mixes up semver-minor commits, I wouldn't want to make things difficult for you if that's a problem.

@aduh95 aduh95 marked this pull request as draft October 23, 2020 13:22
@MylesBorins
Copy link
Contributor

@aduh95 a single backport PR to bring the modules implementation in 12.x up to date is preferable imho. Does this include everything that has landed up until now? We might want to bring in more commits, not less :P

PR-URL: nodejs#35249
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
PR-URL: nodejs#35426
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
PR-URL: nodejs#35501
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@aduh95 aduh95 force-pushed the backport-esm-history-to-v12 branch from db5cf81 to 85a2187 Compare October 23, 2020 18:14
aduh95 and others added 12 commits October 23, 2020 20:26
Using a "Modules:" prefix groups all the related pages together when
using alphabetical order.

Refs: nodejs/modules#539

PR-URL: nodejs#34663
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
This part of the docs aims to contain documentation regarding package
configuration that covers both ESM and CJS realms.

* Move Enabling section
* Update Enabling section
* Remove -u flag
* Package scopes do not carry through `node_modules` folders

Refs: nodejs/modules#539

Co-authored-by: Geoffrey Booth <[email protected]>>
Co-authored-by: Guy Bedford <[email protected]>

PR-URL: nodejs#34748
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
Fixes: nodejs#33143

PR-URL: nodejs#34970
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
PR-URL: nodejs#34718
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
* Use parallel construction in the two sentences
* Backticks around _package.json_ to match rest of file
* Add comma for readability
* Own the recommendation ("we recommend")

PR-URL: nodejs#35254
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
PR-URL: nodejs#35370
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Some minor adjustments, mostly moving things to present tense and
avoiding the ambiguity of _may_.

Refs: nodejs#35370 (comment)

PR-URL: nodejs#35427
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#35428
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Documents which versions of Node.js support which ESM-feature.

PR-URL: nodejs#35395
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#31974
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #35370
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Some minor adjustments, mostly moving things to present tense and
avoiding the ambiguity of _may_.

Refs: #35370 (comment)

Backport-PR-URL: #35757
PR-URL: #35427
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #35428
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #35410
Refs: #34718
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Documents which versions of Node.js support which ESM-feature.

Backport-PR-URL: #35757
PR-URL: #35395
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #31974
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #35750
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 3, 2020
Backport-PR-URL: #35757
PR-URL: #35387
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
@MylesBorins
Copy link
Contributor

landed in 7da9da5...9099190

@MylesBorins MylesBorins closed this Nov 3, 2020
@aduh95 aduh95 deleted the backport-esm-history-to-v12 branch November 3, 2020 17:10
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35249
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35426
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35501
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Masashi Hirano <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Using a "Modules:" prefix groups all the related pages together when
using alphabetical order.

Refs: nodejs/modules#539

Backport-PR-URL: #35757
PR-URL: #34663
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
This part of the docs aims to contain documentation regarding package
configuration that covers both ESM and CJS realms.

* Move Enabling section
* Update Enabling section
* Remove -u flag
* Package scopes do not carry through `node_modules` folders

Refs: nodejs/modules#539

Co-authored-by: Geoffrey Booth <[email protected]>>
Co-authored-by: Guy Bedford <[email protected]>

Backport-PR-URL: #35757
PR-URL: #34748
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Fixes: #33143

Backport-PR-URL: #35757
PR-URL: #34970
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #34718
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
* Use parallel construction in the two sentences
* Backticks around _package.json_ to match rest of file
* Add comma for readability
* Own the recommendation ("we recommend")

Backport-PR-URL: #35757
PR-URL: #35254
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35370
Reviewed-By: Derek Lewis <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Some minor adjustments, mostly moving things to present tense and
avoiding the ambiguity of _may_.

Refs: #35370 (comment)

Backport-PR-URL: #35757
PR-URL: #35427
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35428
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35410
Refs: #34718
Reviewed-By: Rich Trott <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Documents which versions of Node.js support which ESM-feature.

Backport-PR-URL: #35757
PR-URL: #35395
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #31974
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35750
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2020
Backport-PR-URL: #35757
PR-URL: #35387
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Bradley Farias <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
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. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants