Skip to content

Commit

Permalink
fix(exports): node 13.0-13.6 require a string fallback (#1776)
Browse files Browse the repository at this point in the history
package.json’s "engines" field claims yargs supports node >= 10; node v13.0-v13.6 are included in this semver range. This change is required to be able to require() from yargs successfully in these versions.
  • Loading branch information
ljharb committed Oct 11, 2020
1 parent 00153f8 commit b45c43a
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions package.json
Expand Up @@ -4,16 +4,22 @@
"description": "yargs the modern, pirate-themed, successor to optimist.",
"main": "./index.cjs",
"exports": {
".": {
"import": "./index.mjs",
"require": "./index.cjs"
},
".": [
{
"import": "./index.mjs",
"require": "./index.cjs"
},
"./index.cjs"
],
"./helpers": {
"import": "./helpers.mjs"
},
"./yargs": {
"require": "./yargs"
}
"./yargs": [
{
"require": "./yargs"
},
"./yargs"
]
},
"type": "module",
"module": "./index.mjs",
Expand Down

0 comments on commit b45c43a

Please sign in to comment.