99    - v12.20.0 
1010    pr-url: https://github.com/nodejs/node/pull/34718 
1111    description: Add support for `"exports"` patterns. 
12-   - version: v14.6.0 
12+   - version: 
13+     - v14.6.0 
14+     - v12.19.0 
1315    pr-url: https://github.com/nodejs/node/pull/34117 
1416    description: Add package `"imports"` field. 
1517  - version: 
@@ -136,6 +138,9 @@ package:
136138  ` "commonjs" `  package).
137139
138140### ` --input-type `  flag 
141+ <!--  YAML
142+ added: v12.0.0 
143+ --> 
139144
140145Strings passed in as an argument to ` --eval `  (or ` -e ` ), or piped to ` node `  via
141146` STDIN ` , are treated as [ ES modules] [ ]  when the ` --input-type=module `  flag
@@ -253,6 +258,9 @@ absolute subpath of the package such as
253258` require('/path/to/node_modules/pkg/subpath.js') `  will still load ` subpath.js ` .
254259
255260### Subpath exports  
261+ <!--  YAML
262+ added: v12.7.0 
263+ --> 
256264
257265When using the [ ` "exports" ` ] [ ]  field, custom subpaths can be defined along
258266with the main entry point by treating the main entry point as the
@@ -283,6 +291,11 @@ import submodule from 'es-module-package/private-module.js';
283291``` 
284292
285293### Subpath imports  
294+ <!-- YAML
295+ added: 
296+   - v14.6.0 
297+   - v12.19.0 
298+ --> 
286299
287300In addition to the [ ` "exports" ` ] [ ]  field, it is possible to define internal
288301package import maps that only apply to import specifiers from within the package
@@ -320,6 +333,11 @@ The resolution rules for the imports field are otherwise
320333analogous to the exports field.
321334
322335### Subpath patterns  
336+ <!-- YAML
337+ added: 
338+   - v14.13.0 
339+   - v12.19.0 
340+ --> 
323341
324342For packages with a small number of exports or imports, we recommend
325343explicitly listing each exports subpath entry. But for packages that have
@@ -407,6 +425,9 @@ The benefit of patterns over folder exports is that packages can always be
407425imported by consumers without subpath file extensions being necessary.
408426
409427### Exports sugar  
428+ <!-- YAML
429+ added: v12.11.0 
430+ --> 
410431
411432If the ` "." `  export is the only export, the [ ` "exports" ` ] [ ]  field provides sugar
412433for this case being the direct [ ` "exports" ` ] [ ]  field value.
@@ -431,6 +452,17 @@ can be written:
431452``` 
432453
433454### Conditional exports  
455+ <!-- YAML
456+ added: 
457+   - v13.2.0 
458+   - v12.16.0 
459+ changes: 
460+   - version: 
461+     - v13.7.0 
462+     - v12.16.0 
463+     pr-url: https://github.com/nodejs/node/pull/31001 
464+     description: Unflag conditional exports. 
465+ --> 
434466
435467Conditional exports provide a way to map to different paths depending on
436468certain conditions. They are supported for both CommonJS and ES module imports.
@@ -529,6 +561,11 @@ the remaining conditions of the parent condition. In this way nested
529561conditions behave analogously to nested JavaScript ` if `  statements.
530562
531563### Resolving user conditions  
564+ <!--  YAML
565+ added: 
566+   - v14.9.0 
567+   - v12.19.0 
568+ --> 
532569
533570When running Node.js, custom user conditions can be added with the
534571` --conditions `  flag:
@@ -590,6 +627,17 @@ The above definitions may be moved to a dedicated conditions registry in due
590627course.
591628
592629### Self-referencing a package using its name  
630+ <!-- YAML
631+ added: 
632+   - v13.1.0 
633+   - v12.16.0 
634+ changes: 
635+   - version: 
636+     - v13.6.0 
637+     - v12.16.0 
638+     pr-url: https://github.com/nodejs/node/pull/31002 
639+     description: Unflag self-referencing a package using its name. 
640+ --> 
593641
594642Within a package, the values defined in the package’s
595643` package.json `  [ ` "exports" ` ] [ ]  field can be referenced via the package’s name.
0 commit comments