Skip to content

Commit 3ae7242

Browse files
authored
fix(exports): node 13.0 and 13.1 require the dotted object form _with_ a string fallback (#336)
package.json’s "engines" field claims yargs-parser supports node >= 10; node v13.0 and v13.1 are included in this semver range. This change is required to be able to require() from yargs-parser successfully in these versions. See yargs/yargs#1776
1 parent 3fe41fe commit 3ae7242

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
"version": "20.2.2",
44
"description": "the mighty option parser used by yargs",
55
"main": "build/index.cjs",
6-
"exports": [
7-
{
8-
"import": "./build/lib/index.js",
9-
"require": "./build/index.cjs"
10-
},
11-
"./build/index.cjs"
12-
],
6+
"exports": {
7+
".": [
8+
{
9+
"import": "./build/lib/index.js",
10+
"require": "./build/index.cjs"
11+
},
12+
"./build/index.cjs"
13+
]
14+
},
1315
"type": "module",
1416
"module": "./build/lib/index.js",
1517
"scripts": {

0 commit comments

Comments
 (0)