X Tutup
The Wayback Machine - https://web.archive.org/web/20201023141628/https://github.com/nodejs/node/pull/35741
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

doc: update package.json field definitions #35741

Open
wants to merge 2 commits into
base: master
from

Conversation

@MylesBorins
Copy link
Member

@MylesBorins MylesBorins commented Oct 21, 2020

Only imports has the experimental status right now but technically all
ESM related features are currently experimental. The list also doesn't
appear to be in any specific order so I've grouped the experimental
features together.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Only imports has the experimental status right now but technically all
ESM related features are currently experimental. The list also doesn't
appear to be in any specific order so I've grouped the experimental
features together.
@nodejs-github-bot
Copy link

@nodejs-github-bot nodejs-github-bot commented Oct 21, 2020

Review requested:

@guybedford
Copy link
Contributor

@guybedford guybedford commented Oct 21, 2020

Thanks for looking into this. Agreed these are experimental right now.

Whether this lands should depend on whether we are able to move to considering the modules implementation in general as stable at this point, as per discussion at the meeting today.

I just checked my numbers wrt to the usage of these fields, and out of the 1.4 million packages on npm, the numbers for packages using these fields are:

  • "type": 7386 packages
  • "exports": 4815 packages
  • "imports": 3 packages

If we were to consider the modules implementation stable, then given the above I don't think we could also consider exports or type experimental, as this is major stable usage in the wild now.

I don't have usage numbers on exports patterns for example, but I expect it would still be low like imports.

So I feel that only these specific features of "exports" or "imports" might still fit the definition of subfeatures with experimental status if we were to move the entire implementation stable.

@MylesBorins
Copy link
Member Author

@MylesBorins MylesBorins commented Oct 21, 2020

@guybedford #35742 :P

Copy link
Member

@DerekNonGeneric DerekNonGeneric left a comment

👏👏👏

doc/api/packages.md Outdated Show resolved Hide resolved
doc/api/packages.md Show resolved Hide resolved
Co-authored-by: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.
X Tutup