From 7f07e9de9f56c148569befe82546c4332be39e77 Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Fri, 31 May 2024 11:36:55 +0100 Subject: [PATCH] feat: restore typesVersions (#2878) --- package.json | 2 +- packages/abi-ts/package.json | 7 ++++++ packages/block-logs-stream/package.json | 7 ++++++ packages/cli/package.json | 7 ++++++ packages/common/package.json | 31 ++++++++++++++++++++++++ packages/common/tsconfig.base.json | 1 + packages/config/package.json | 19 +++++++++++++++ packages/dev-tools/package.json | 7 ++++++ packages/faucet/package.json | 7 ++++++ packages/gas-report/package.json | 10 ++++++-- packages/protocol-parser/package.json | 10 ++++++++ packages/query/package.json | 10 ++++++++ packages/react/package.json | 7 ++++++ packages/recs/package.json | 10 ++++++++ packages/schema-type/package.json | 14 ++++++++++- packages/solhint-config-mud/package.json | 7 ++++++ packages/solhint-plugin-mud/package.json | 7 ++++++ packages/store-indexer/package.json | 7 ++++++ packages/store-sync/package.json | 28 +++++++++++++++++++++ packages/store/package.json | 26 +++++++++++++++++++- packages/utils/package.json | 7 ++++++ packages/world-modules/package.json | 8 +++++- packages/world/package.json | 23 +++++++++++++++++- 23 files changed, 255 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 3a8ffd4a0a..2259fa8451 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "release:check": "changeset status --verbose --since=origin/main", "release:publish": "pnpm install && pnpm build && changeset publish", "release:version": "changeset version && pnpm install --lockfile-only && pnpm run changelog:generate", - "sort-package-json": "npx sort-package-json package.json 'packages/*/package.json' 'templates/*/package.json' 'templates/*/packages/*/package.json' 'examples/*/package.json' 'examples/*/packages/*/package.json' 'e2e/*/package.json' 'e2e/*/packages/*/package.json' 'docs/package.json'", + "sort-package-json": "npx sort-package-json package.json 'packages/*/package.json' 'templates/*/package.json' 'templates/*/packages/*/package.json' 'examples/*/package.json' 'examples/*/packages/*/package.json' 'e2e/*/package.json' 'e2e/*/packages/*/package.json' 'docs/package.json' 'test/*/package.json'", "test": "pnpm run --recursive test", "test:ci": "pnpm run --recursive --parallel test:ci", "type-stats-repo": "attest stats packages/*" diff --git a/packages/abi-ts/package.json b/packages/abi-ts/package.json index 48af478034..246f62cbfa 100644 --- a/packages/abi-ts/package.json +++ b/packages/abi-ts/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "bin": { "abi-ts": "./dist/abi-ts.js" }, diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 2797212cca..0f41ddffbf 100644 --- a/packages/block-logs-stream/package.json +++ b/packages/block-logs-stream/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/cli/package.json b/packages/cli/package.json index a1d32a9430..bedcc90bce 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "bin": { "mud": "./dist/mud.js" }, diff --git a/packages/common/package.json b/packages/common/package.json index 2c9ace8c1f..95aeca5e08 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -21,6 +21,37 @@ "./kms": "./dist/kms.js", "./tsconfig.base.json": "./tsconfig.base.json" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "actions": [ + "./dist/actions.d.ts" + ], + "chains": [ + "./dist/chains.d.ts" + ], + "codegen": [ + "./dist/codegen.d.ts" + ], + "errors": [ + "./dist/errors.d.ts" + ], + "foundry": [ + "./dist/foundry.d.ts" + ], + "type-utils": [ + "./dist/type-utils.d.ts" + ], + "utils": [ + "./dist/utils.d.ts" + ], + "kms": [ + "./dist/kms.d.ts" + ] + } + }, "files": [ "dist", "tsconfig.base.json" diff --git a/packages/common/tsconfig.base.json b/packages/common/tsconfig.base.json index 240ac282c3..1c1554782e 100644 --- a/packages/common/tsconfig.base.json +++ b/packages/common/tsconfig.base.json @@ -1,3 +1,4 @@ +// Please take care editing this! All of our packages and templates extend this base config. { "compilerOptions": { "module": "esnext", diff --git a/packages/config/package.json b/packages/config/package.json index 62ea3e6964..b64bac1836 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -16,6 +16,25 @@ "./register": "./dist/deprecated/register.js", "./node": "./dist/deprecated/node.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ], + "library": [ + "./dist/deprecated/library.d.ts" + ], + "register": [ + "./dist/deprecated/register.d.ts" + ], + "node": [ + "./dist/deprecated/node.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index f59d4bf947..34aa0ff99a 100644 --- a/packages/dev-tools/package.json +++ b/packages/dev-tools/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/faucet/package.json b/packages/faucet/package.json index 5126366eff..ae47e2556d 100644 --- a/packages/faucet/package.json +++ b/packages/faucet/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/src/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/src/index.d.ts" + ] + } + }, "bin": { "faucet-server": "./dist/bin/faucet-server.js" }, diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index ac158b4970..55a9455567 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -12,14 +12,20 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "bin": { "gas-report": "./dist/gas-report.js" }, "files": [ "dist", "out", - "src", - "foundry.toml" + "src" ], "scripts": { "build": "tsup", diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index 2704e2e68e..4d4c79d8f1 100644 --- a/packages/protocol-parser/package.json +++ b/packages/protocol-parser/package.json @@ -13,6 +13,16 @@ ".": "./dist/index.js", "./internal": "./dist/internal.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/query/package.json b/packages/query/package.json index 664f068530..9e8e2012bf 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -13,6 +13,16 @@ ".": "./dist/index.js", "./internal": "./dist/internal.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/react/package.json b/packages/react/package.json index 64717b69f2..d6dfea49e6 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/recs/package.json b/packages/recs/package.json index 27eb6efa35..5b3f4c77d6 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -12,6 +12,16 @@ ".": "./dist/index.js", "./deprecated": "./dist/deprecated/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "deprecated": [ + "./dist/deprecated/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index f8b87fb93e..c831832106 100644 --- a/packages/schema-type/package.json +++ b/packages/schema-type/package.json @@ -14,10 +14,22 @@ "./internal": "./dist/internal.js", "./deprecated": "./dist/deprecated.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ], + "deprecated": [ + "./dist/deprecated.d.ts" + ] + } + }, "files": [ "dist", "out", - "foundry.toml", "src" ], "scripts": { diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index 76349815e2..79c1a8d930 100644 --- a/packages/solhint-config-mud/package.json +++ b/packages/solhint-config-mud/package.json @@ -10,6 +10,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index 9c46a0e1da..9f6b024897 100644 --- a/packages/solhint-plugin-mud/package.json +++ b/packages/solhint-plugin-mud/package.json @@ -10,6 +10,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index 1cff60659e..83bbe9ec40 100644 --- a/packages/store-indexer/package.json +++ b/packages/store-indexer/package.json @@ -12,6 +12,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/src/index.d.ts" + ] + } + }, "bin": { "postgres-decoded-indexer": "./dist/bin/postgres-decoded-indexer.js", "postgres-frontend": "./dist/bin/postgres-frontend.js", diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index d2e58123b4..9ac64ce1fb 100644 --- a/packages/store-sync/package.json +++ b/packages/store-sync/package.json @@ -19,6 +19,34 @@ "./trpc-indexer": "./dist/trpc-indexer/index.js", "./zustand": "./dist/zustand/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "indexer-client": [ + "./dist/indexer-client/index.d.ts" + ], + "postgres": [ + "./dist/postgres/index.d.ts" + ], + "postgres-decoded": [ + "./dist/postgres-decoded/index.d.ts" + ], + "recs": [ + "./dist/recs/index.d.ts" + ], + "sqlite": [ + "./dist/sqlite/index.d.ts" + ], + "trpc-indexer": [ + "./dist/trpc-indexer/index.d.ts" + ], + "zustand": [ + "./dist/zustand/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/store/package.json b/packages/store/package.json index 6bd8fe23ef..84d7d9ac69 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -19,10 +19,34 @@ "./register": "./dist/register.js", "./out/*": "./out/*" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ], + "mud.config": [ + "./dist/mud.config.d.ts" + ], + "codegen": [ + "./dist/codegen.d.ts" + ], + "config": [ + "./dist/config.d.ts" + ], + "config/v2": [ + "./dist/config/v2.d.ts" + ], + "register": [ + "./dist/register.d.ts" + ] + } + }, "files": [ "dist", "out", - "foundry.toml", "src" ], "scripts": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 4e5cce6d19..b0d7c22dad 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -11,6 +11,13 @@ "exports": { ".": "./dist/index.js" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ] + } + }, "files": [ "dist" ], diff --git a/packages/world-modules/package.json b/packages/world-modules/package.json index 985446959b..f2e1a70d95 100644 --- a/packages/world-modules/package.json +++ b/packages/world-modules/package.json @@ -13,10 +13,16 @@ "./internal/mud.config": "./dist/mud.config.js", "./out/*": "./out/*" }, + "typesVersions": { + "*": { + "internal/mud.config": [ + "./dist/mud.config.d.ts" + ] + } + }, "files": [ "dist", "out", - "foundry.toml", "src" ], "scripts": { diff --git a/packages/world/package.json b/packages/world/package.json index 6a12e9efd7..7dafd961cb 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -18,10 +18,31 @@ "./node": "./dist/node.js", "./out/*": "./out/*" }, + "typesVersions": { + "*": { + "index": [ + "./dist/index.d.ts" + ], + "internal": [ + "./dist/internal.d.ts" + ], + "mud.config": [ + "./dist/mud.config.d.ts" + ], + "config/v2": [ + "./dist/config/v2.d.ts" + ], + "register": [ + "./dist/register.d.ts" + ], + "node": [ + "./dist/node.d.ts" + ] + } + }, "files": [ "dist", "out", - "foundry.toml", "src", "test/MudTest.t.sol" ],