@@ -704,18 +704,17 @@ is provided below to assist with ecosystem coordination. |
704 | 704 |
|
705 | 705 | * `"types"` - can be used by typing systems to resolve the typing file for |
706 | 706 | the given export. _This condition should always be included first._ |
707 | | -* `"deno"` - indicates a variation for the Deno platform. |
708 | 707 | * `"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._ |
712 | 708 | * `"development"` - can be used to define a development-only environment |
713 | 709 | entry point, for example to provide additional debugging context such as |
714 | 710 | better error messages when running in a development mode. _Must always be |
715 | 711 | mutually exclusive with `"production"`._ |
716 | 712 | * `"production"` - can be used to define a production environment entry |
717 | 713 | point. _Must always be mutually exclusive with `"development"`._ |
718 | 714 |
|
| 715 | +For other runtimes, platform-specific condition key definitions are maintained |
| 716 | +by the [WinterCG][] in the [Runtime Keys][] proposal specification. |
| 717 | + |
719 | 718 | New conditions definitions may be added to this list by creating a pull request |
720 | 719 | to the [Node.js documentation for this section][]. The requirements for listing |
721 | 720 | a new condition definition here are that: |
@@ -729,6 +728,10 @@ a new condition definition here are that: |
729 | 728 | benefit to the ecosystem that wouldn't otherwise be possible. For example, |
730 | 729 | this would not necessarily be the case for company-specific or |
731 | 730 | 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. |
732 | 735 |
|
733 | 736 | The above definitions may be moved to a dedicated conditions registry in due |
734 | 737 | course. |
@@ -1325,6 +1328,8 @@ This field defines [subpath imports][] for the current package. |
1325 | 1328 | [ES module]: esm.md |
1326 | 1329 | [ES modules]: esm.md |
1327 | 1330 | [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/ |
1328 | 1333 | [`"exports"`]: #exports |
1329 | 1334 | [`"imports"`]: #imports |
1330 | 1335 | [`"main"`]: #main |
|