GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: link to Runtime Keys in export conditions · nodejs/node@2a403cd

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • packages.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/packages.md‎

Copy file name to clipboardExpand all lines: doc/api/packages.md
+9-4Lines changed: 9 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -704,18 +704,17 @@ is provided below to assist with ecosystem coordination.
704704

705705
* `"types"` - can be used by typing systems to resolve the typing file for
706706
the given export. _This condition should always be included first._
707-
* `"deno"` - indicates a variation for the Deno platform.
708707
* `"browser"` - any web browser environment.
709-
* `"react-native"` - will be matched by the React Native framework (all
710-
platforms). _To target React Native for Web, `"browser"` should be specified
711-
before this condition._
712708
* `"development"` - can be used to define a development-only environment
713709
entry point, for example to provide additional debugging context such as
714710
better error messages when running in a development mode. _Must always be
715711
mutually exclusive with `"production"`._
716712
* `"production"` - can be used to define a production environment entry
717713
point. _Must always be mutually exclusive with `"development"`._
718714

715+
For other runtimes, platform-specific condition key definitions are maintained
716+
by the [WinterCG][] in the [Runtime Keys][] proposal specification.
717+
719718
New conditions definitions may be added to this list by creating a pull request
720719
to the [Node.js documentation for this section][]. The requirements for listing
721720
a new condition definition here are that:
@@ -729,6 +728,10 @@ a new condition definition here are that:
729728
benefit to the ecosystem that wouldn't otherwise be possible. For example,
730729
this would not necessarily be the case for company-specific or
731730
application-specific conditions.
731+
* The condition should be such that a Node.js user would expect it to be in
732+
Node.js core documentation. The `"types"` condition is a good example: It
733+
doesn't really belong in the [Runtime Keys][] proposal but is a good fit
734+
here in the Node.js docs.
732735

733736
The above definitions may be moved to a dedicated conditions registry in due
734737
course.
@@ -1325,6 +1328,8 @@ This field defines [subpath imports][] for the current package.
13251328
[ES module]: esm.md
13261329
[ES modules]: esm.md
13271330
[Node.js documentation for this section]: https://github.com/nodejs/node/blob/HEAD/doc/api/packages.md#conditions-definitions
1331+
[Runtime Keys]: https://runtime-keys.proposal.wintercg.org/
1332+
[WinterCG]: https://wintercg.org/
13281333
[`"exports"`]: #exports
13291334
[`"imports"`]: #imports
13301335
[`"main"`]: #main

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.