From ced393eb6605af6090d433e59cbca7d5d3018f71 Mon Sep 17 00:00:00 2001 From: Will Stott Date: Fri, 11 Mar 2022 11:06:05 +0000 Subject: [PATCH 1/2] Specify type definitions for tsc node12 imports --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4b3b695..ba48610 100644 --- a/package.json +++ b/package.json @@ -30,11 +30,13 @@ "exports": { ".": { "import": "./dist/index.mjs", - "require": "./dist/index.js" + "require": "./dist/index.js", + "types": "./index.d.ts" }, "./lite": { "import": "./lite/index.mjs", - "require": "./lite/index.js" + "require": "./lite/index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, From c18bb9f48a362e30ff61fda3f4d48d732fd10b50 Mon Sep 17 00:00:00 2001 From: Will Stott Date: Mon, 11 Jul 2022 09:50:52 +0100 Subject: [PATCH 2/2] Re-order exports keys to keep "types" first. --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ba48610..361c5e6 100644 --- a/package.json +++ b/package.json @@ -29,14 +29,14 @@ ], "exports": { ".": { + "types": "./index.d.ts", "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./index.d.ts" + "require": "./dist/index.js" }, "./lite": { + "types": "./index.d.ts", "import": "./lite/index.mjs", - "require": "./lite/index.js", - "types": "./index.d.ts" + "require": "./lite/index.js" }, "./package.json": "./package.json" },