From 279b41702162280199c46740e094c650c5d70e91 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Sun, 30 Jul 2023 21:37:03 +0200 Subject: [PATCH 1/4] fix: exports types Makes sure that the correct Typescript definitions is exported when exports property in package.json is used. --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index dc18257..137ed56 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,12 @@ "exports": { "./package.json": "./package.json", ".": { + "types": "./types/single-spa-react.d.ts", "import": "./lib/esm/single-spa-react.js", "require": "./lib/cjs/single-spa-react.cjs" }, "./parcel": { + "types": "./types/parcel/index.d.ts", "import": "./lib/esm/parcel.js", "require": "./lib/cjs/parcel.cjs" } From fdfe40af0e79f984c81ef3ffba5dacdd8f8f0515 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Sun, 30 Jul 2023 21:39:32 +0200 Subject: [PATCH 2/4] chore: bump version --- .changeset/large-queens-poke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/large-queens-poke.md diff --git a/.changeset/large-queens-poke.md b/.changeset/large-queens-poke.md new file mode 100644 index 0000000..f3aeef1 --- /dev/null +++ b/.changeset/large-queens-poke.md @@ -0,0 +1,5 @@ +--- +"single-spa-react": minor +--- + +Exports Typescript definitions using the exports property in package.json From b8ea46ba6d87f72d99ebe378bd68cdb2e0f06687 Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Sun, 30 Jul 2023 21:43:20 +0200 Subject: [PATCH 3/4] fix: use correct parcel type definitions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 137ed56..e4b5230 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "require": "./lib/cjs/single-spa-react.cjs" }, "./parcel": { - "types": "./types/parcel/index.d.ts", + "types": "./parcel/index.d.ts", "import": "./lib/esm/parcel.js", "require": "./lib/cjs/parcel.cjs" } From 71f18b94fd4a8f38beab85c47f904bf6ebf5c499 Mon Sep 17 00:00:00 2001 From: Jake Hayes Date: Fri, 13 Oct 2023 09:36:04 -0400 Subject: [PATCH 4/4] Update exports in the package.json --- .changeset/hot-hornets-call.md | 5 +++++ package.json | 22 ++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 .changeset/hot-hornets-call.md diff --git a/.changeset/hot-hornets-call.md b/.changeset/hot-hornets-call.md new file mode 100644 index 0000000..d8dc290 --- /dev/null +++ b/.changeset/hot-hornets-call.md @@ -0,0 +1,5 @@ +--- +"single-spa-react": patch +--- + +Update the exports in package.json diff --git a/package.json b/package.json index e4b5230..f71d330 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,24 @@ "exports": { "./package.json": "./package.json", ".": { - "types": "./types/single-spa-react.d.ts", - "import": "./lib/esm/single-spa-react.js", - "require": "./lib/cjs/single-spa-react.cjs" + "import": { + "types": "./types/single-spa-react.d.ts", + "default": "./lib/esm/single-spa-react.js" + }, + "require": { + "types": "./types/single-spa-react.d.ts", + "default": "./lib/cjs/single-spa-react.cjs" + } }, "./parcel": { - "types": "./parcel/index.d.ts", - "import": "./lib/esm/parcel.js", - "require": "./lib/cjs/parcel.cjs" + "import": { + "types": "./parcel/index.d.ts", + "default": "./lib/esm/parcel.js" + }, + "require": { + "types": "./parcel/index.d.ts", + "default": "./lib/cjs/parcel.cjs" + } } }, "files": [