From cefa68a8f26df97fe6aef5f289e89c4379d7c9d8 Mon Sep 17 00:00:00 2001 From: lishimin Date: Sat, 11 Jun 2022 10:50:23 +0800 Subject: [PATCH 1/2] feat: exports types to support typescript >= 4.5 nodenext module --- package.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9703330c52f3..3a679d92b90d 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,13 @@ "exports": { ".": { "import": "./lib/index.mjs", - "require": "./lib/index.js" + "require": "./lib/index.js", + "types": "./types/index.d.ts" + }, + "./_non-semver-use-at-your-own-risk_/*": { + "default": "./lib/*", + "types": "./types/*.d.ts" }, - "./_non-semver-use-at-your-own-risk_/*": "./lib/*", "./package.json": "./package.json" }, "engines": { From 7ab260d52a11a3f55267af99d9bd7692700ff503 Mon Sep 17 00:00:00 2001 From: ephys Date: Sun, 3 Jul 2022 13:10:05 +0200 Subject: [PATCH 2/2] fix: update _non-semver-use-at-your-own-risk_ export --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 37310aed2ce1..7e7f468d0bcd 100644 --- a/package.json +++ b/package.json @@ -26,8 +26,8 @@ "types": "./types/index.d.ts" }, "./_non-semver-use-at-your-own-risk_/*": { - "default": "./lib/*", - "types": "./types/*.d.ts" + "types": "./types/*", + "default": "./lib/*" }, "./package.json": "./package.json" },