From eca16fc05d26255df3280906c36d7f0e5b05c6e9 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 15 Oct 2020 22:48:52 -0700 Subject: [PATCH] fix(exports): node 13.0 and 13.1 require the dotted object form _with_ a string fallback (#93) 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 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 https://github.com/yargs/yargs/pull/1776 --- package.json | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3e4c421..0b39e22 100644 --- a/package.json +++ b/package.json @@ -3,13 +3,15 @@ "version": "7.0.2", "description": "easily create complex multi-column command-line-interfaces", "main": "build/index.cjs", - "exports": [ - { - "import": "./index.mjs", - "require": "./build/index.cjs" - }, - "./build/index.cjs" - ], + "exports": { + ".": [ + { + "import": "./index.mjs", + "require": "./build/index.cjs" + }, + "./build/index.cjs" + ] + }, "type": "module", "module": "./index.mjs", "scripts": {