From 4f85d80dbaae6d2c7899ae394f7ad97805df4886 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 15 Oct 2020 22:49:52 -0700 Subject: [PATCH] fix(exports): node 13.0 and 13.1 require the dotted object form _with_ a string fallback (#105) 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 9854a5bd..5632b4c6 100644 --- a/package.json +++ b/package.json @@ -2,13 +2,15 @@ "name": "y18n", "version": "5.0.3", "description": "the bare-bones internationalization library used by yargs", - "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": "./build/lib/index.js", "keywords": [