From 291aeda06b685b7a015d83bdf2558e180b37388d Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 14 Oct 2020 11:34:05 -0700 Subject: [PATCH] fix(exports): node 13.0-13.6 require a string fallback (#333) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit package.json’s "engines" field claims yargs-parser 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-parser successfully in these versions. See https://github.com/yargs/yargs/pull/1776 --- package.json | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4ddcdf49..39b0575d 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,13 @@ "version": "20.2.1", "description": "the mighty option parser used by yargs", "main": "build/index.cjs", - "exports": { - "import": "./build/lib/index.js", - "require": "./build/index.cjs" - }, + "exports": [ + { + "import": "./build/lib/index.js", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ], "type": "module", "module": "./build/lib/index.js", "scripts": {