From 05e4f9ffa4e73d9db8442b26cd32577dc32075c2 Mon Sep 17 00:00:00 2001
From: Loris Leiva <loris.leiva@gmail.com>
Date: Thu, 31 Aug 2023 10:52:28 +0100
Subject: [PATCH] Add types file to package.json exports (#86)

---
 .changeset/lemon-humans-hammer.md             | 30 +++++++++++++++++++
 .../new-package-template/package.json.stub    |  1 +
 packages/umi-bundle-defaults/package.json     |  1 +
 packages/umi-bundle-tests/package.json        |  1 +
 packages/umi-downloader-http/package.json     |  1 +
 packages/umi-eddsa-web3js/package.json        |  1 +
 packages/umi-http-fetch/package.json          |  1 +
 packages/umi-options/package.json             |  1 +
 packages/umi-program-repository/package.json  |  1 +
 packages/umi-public-keys/package.json         |  1 +
 .../umi-rpc-chunk-get-accounts/package.json   |  1 +
 packages/umi-rpc-web3js/package.json          |  1 +
 packages/umi-serializer-beet/package.json     |  1 +
 .../umi-serializer-data-view/package.json     |  1 +
 packages/umi-serializers-core/package.json    |  1 +
 .../umi-serializers-encodings/package.json    |  1 +
 packages/umi-serializers-numbers/package.json |  1 +
 packages/umi-serializers/package.json         |  1 +
 packages/umi-signer-derived/package.json      |  1 +
 .../umi-signer-wallet-adapters/package.json   |  1 +
 packages/umi-storage-mock/package.json        |  1 +
 packages/umi-tasks/package.json               |  1 +
 .../package.json                              |  1 +
 packages/umi-uploader-aws/package.json        |  1 +
 packages/umi-uploader-bundlr/package.json     |  1 +
 .../umi-uploader-nft-storage/package.json     |  1 +
 packages/umi-web3js-adapters/package.json     |  1 +
 packages/umi/package.json                     |  1 +
 28 files changed, 57 insertions(+)
 create mode 100644 .changeset/lemon-humans-hammer.md

diff --git a/.changeset/lemon-humans-hammer.md b/.changeset/lemon-humans-hammer.md
new file mode 100644
index 00000000..04e00f61
--- /dev/null
+++ b/.changeset/lemon-humans-hammer.md
@@ -0,0 +1,30 @@
+---
+'@metaplex-foundation/umi-transaction-factory-web3js': patch
+'@metaplex-foundation/umi-rpc-chunk-get-accounts': patch
+'@metaplex-foundation/umi-signer-wallet-adapters': patch
+'@metaplex-foundation/umi-serializers-encodings': patch
+'@metaplex-foundation/umi-serializer-data-view': patch
+'@metaplex-foundation/umi-uploader-nft-storage': patch
+'@metaplex-foundation/umi-serializers-numbers': patch
+'@metaplex-foundation/umi-program-repository': patch
+'@metaplex-foundation/umi-serializers-core': patch
+'@metaplex-foundation/umi-bundle-defaults': patch
+'@metaplex-foundation/umi-downloader-http': patch
+'@metaplex-foundation/umi-serializer-beet': patch
+'@metaplex-foundation/umi-uploader-bundlr': patch
+'@metaplex-foundation/umi-web3js-adapters': patch
+'@metaplex-foundation/umi-signer-derived': patch
+'@metaplex-foundation/umi-bundle-tests': patch
+'@metaplex-foundation/umi-eddsa-web3js': patch
+'@metaplex-foundation/umi-storage-mock': patch
+'@metaplex-foundation/umi-uploader-aws': patch
+'@metaplex-foundation/umi-public-keys': patch
+'@metaplex-foundation/umi-serializers': patch
+'@metaplex-foundation/umi-http-fetch': patch
+'@metaplex-foundation/umi-rpc-web3js': patch
+'@metaplex-foundation/umi-options': patch
+'@metaplex-foundation/umi-tasks': patch
+'@metaplex-foundation/umi': patch
+---
+
+Add types file to package.json exports
diff --git a/configs/new-package-template/package.json.stub b/configs/new-package-template/package.json.stub
index 1944a7b1..d20ad1c1 100644
--- a/configs/new-package-template/package.json.stub
+++ b/configs/new-package-template/package.json.stub
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-bundle-defaults/package.json b/packages/umi-bundle-defaults/package.json
index 41f1bc78..01f5f2af 100644
--- a/packages/umi-bundle-defaults/package.json
+++ b/packages/umi-bundle-defaults/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-bundle-tests/package.json b/packages/umi-bundle-tests/package.json
index 6918987b..9fd093df 100644
--- a/packages/umi-bundle-tests/package.json
+++ b/packages/umi-bundle-tests/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-downloader-http/package.json b/packages/umi-downloader-http/package.json
index e1631de8..a5ef5297 100644
--- a/packages/umi-downloader-http/package.json
+++ b/packages/umi-downloader-http/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-eddsa-web3js/package.json b/packages/umi-eddsa-web3js/package.json
index 002fc37f..449aec01 100644
--- a/packages/umi-eddsa-web3js/package.json
+++ b/packages/umi-eddsa-web3js/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-http-fetch/package.json b/packages/umi-http-fetch/package.json
index 0d6dda05..45e4d9ea 100644
--- a/packages/umi-http-fetch/package.json
+++ b/packages/umi-http-fetch/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-options/package.json b/packages/umi-options/package.json
index 832f7667..fbd01a4d 100644
--- a/packages/umi-options/package.json
+++ b/packages/umi-options/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-program-repository/package.json b/packages/umi-program-repository/package.json
index bcaf4eee..77a0ad12 100644
--- a/packages/umi-program-repository/package.json
+++ b/packages/umi-program-repository/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-public-keys/package.json b/packages/umi-public-keys/package.json
index d7ef50fc..cabd2ae0 100644
--- a/packages/umi-public-keys/package.json
+++ b/packages/umi-public-keys/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-rpc-chunk-get-accounts/package.json b/packages/umi-rpc-chunk-get-accounts/package.json
index 04a5b20f..13a72661 100644
--- a/packages/umi-rpc-chunk-get-accounts/package.json
+++ b/packages/umi-rpc-chunk-get-accounts/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-rpc-web3js/package.json b/packages/umi-rpc-web3js/package.json
index 5c6fac15..6e0d8b63 100644
--- a/packages/umi-rpc-web3js/package.json
+++ b/packages/umi-rpc-web3js/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializer-beet/package.json b/packages/umi-serializer-beet/package.json
index 99ecdadc..2326cf53 100644
--- a/packages/umi-serializer-beet/package.json
+++ b/packages/umi-serializer-beet/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializer-data-view/package.json b/packages/umi-serializer-data-view/package.json
index dff09243..20fbe319 100644
--- a/packages/umi-serializer-data-view/package.json
+++ b/packages/umi-serializer-data-view/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializers-core/package.json b/packages/umi-serializers-core/package.json
index 7d0e8a2a..10e177f2 100644
--- a/packages/umi-serializers-core/package.json
+++ b/packages/umi-serializers-core/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializers-encodings/package.json b/packages/umi-serializers-encodings/package.json
index 503298be..383675ee 100644
--- a/packages/umi-serializers-encodings/package.json
+++ b/packages/umi-serializers-encodings/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializers-numbers/package.json b/packages/umi-serializers-numbers/package.json
index ca5f5636..ac05b77b 100644
--- a/packages/umi-serializers-numbers/package.json
+++ b/packages/umi-serializers-numbers/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-serializers/package.json b/packages/umi-serializers/package.json
index 69a27250..921e4f0a 100644
--- a/packages/umi-serializers/package.json
+++ b/packages/umi-serializers/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-signer-derived/package.json b/packages/umi-signer-derived/package.json
index 08316904..44c0553b 100644
--- a/packages/umi-signer-derived/package.json
+++ b/packages/umi-signer-derived/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-signer-wallet-adapters/package.json b/packages/umi-signer-wallet-adapters/package.json
index 423f7124..29dedafc 100644
--- a/packages/umi-signer-wallet-adapters/package.json
+++ b/packages/umi-signer-wallet-adapters/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-storage-mock/package.json b/packages/umi-storage-mock/package.json
index 27df1342..ebff50fd 100644
--- a/packages/umi-storage-mock/package.json
+++ b/packages/umi-storage-mock/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-tasks/package.json b/packages/umi-tasks/package.json
index 5aabdbe9..d7cbb5af 100644
--- a/packages/umi-tasks/package.json
+++ b/packages/umi-tasks/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-transaction-factory-web3js/package.json b/packages/umi-transaction-factory-web3js/package.json
index 4d03c5f0..0a826f6c 100644
--- a/packages/umi-transaction-factory-web3js/package.json
+++ b/packages/umi-transaction-factory-web3js/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-uploader-aws/package.json b/packages/umi-uploader-aws/package.json
index 0aff07b9..fe6d0c1c 100644
--- a/packages/umi-uploader-aws/package.json
+++ b/packages/umi-uploader-aws/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-uploader-bundlr/package.json b/packages/umi-uploader-bundlr/package.json
index 34e27a45..6a2f9642 100644
--- a/packages/umi-uploader-bundlr/package.json
+++ b/packages/umi-uploader-bundlr/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-uploader-nft-storage/package.json b/packages/umi-uploader-nft-storage/package.json
index ba64ec1b..97dba721 100644
--- a/packages/umi-uploader-nft-storage/package.json
+++ b/packages/umi-uploader-nft-storage/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi-web3js-adapters/package.json b/packages/umi-web3js-adapters/package.json
index 3485d3d0..50b6f707 100644
--- a/packages/umi-web3js-adapters/package.json
+++ b/packages/umi-web3js-adapters/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     }
diff --git a/packages/umi/package.json b/packages/umi/package.json
index e9217531..b80a6461 100644
--- a/packages/umi/package.json
+++ b/packages/umi/package.json
@@ -9,6 +9,7 @@
   "types": "dist/types/index.d.ts",
   "exports": {
     ".": {
+      "types": "./dist/types/index.d.ts",
       "import": "./dist/esm/index.mjs",
       "require": "./dist/cjs/index.cjs"
     },