From 5e744f29500f82d09a603216d7423916ce524834 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Aug 2023 09:49:06 -0700 Subject: [PATCH] Version Packages (next) (#1285) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 12 ++ CHANGELOG.md | 151 +++++++++++++++++++++++ packages/block-logs-stream/CHANGELOG.md | 17 +++ packages/block-logs-stream/package.json | 2 +- packages/cli/CHANGELOG.md | 36 ++++++ packages/cli/package.json | 2 +- packages/common/CHANGELOG.md | 27 ++++ packages/common/package.json | 2 +- packages/config/CHANGELOG.md | 8 ++ packages/config/package.json | 2 +- packages/create-mud/CHANGELOG.md | 55 +++++++++ packages/create-mud/package.json | 2 +- packages/dev-tools/CHANGELOG.md | 52 ++++++++ packages/dev-tools/package.json | 14 +-- packages/ecs-browser/CHANGELOG.md | 9 ++ packages/ecs-browser/package.json | 2 +- packages/gas-report/CHANGELOG.md | 2 + packages/gas-report/package.json | 2 +- packages/network/CHANGELOG.md | 16 +++ packages/network/package.json | 2 +- packages/noise/CHANGELOG.md | 2 + packages/noise/package.json | 2 +- packages/phaserx/CHANGELOG.md | 7 ++ packages/phaserx/package.json | 2 +- packages/protocol-parser/CHANGELOG.md | 10 ++ packages/protocol-parser/package.json | 2 +- packages/react/CHANGELOG.md | 30 +++++ packages/react/package.json | 2 +- packages/recs/CHANGELOG.md | 8 ++ packages/recs/package.json | 2 +- packages/schema-type/CHANGELOG.md | 6 + packages/schema-type/package.json | 2 +- packages/services/CHANGELOG.md | 2 + packages/services/package.json | 2 +- packages/solecs/CHANGELOG.md | 2 + packages/solecs/package.json | 2 +- packages/solhint-config-mud/CHANGELOG.md | 2 + packages/solhint-config-mud/package.json | 2 +- packages/solhint-plugin-mud/CHANGELOG.md | 2 + packages/solhint-plugin-mud/package.json | 2 +- packages/std-client/CHANGELOG.md | 38 ++++++ packages/std-client/package.json | 2 +- packages/std-contracts/CHANGELOG.md | 2 + packages/std-contracts/package.json | 2 +- packages/store-cache/CHANGELOG.md | 10 ++ packages/store-cache/package.json | 2 +- packages/store-indexer/CHANGELOG.md | 39 ++++++ packages/store-indexer/package.json | 2 +- packages/store-sync/CHANGELOG.md | 45 +++++++ packages/store-sync/package.json | 2 +- packages/store/CHANGELOG.md | 32 +++++ packages/store/package.json | 2 +- packages/utils/CHANGELOG.md | 2 + packages/utils/package.json | 2 +- packages/world/CHANGELOG.md | 29 +++++ packages/world/package.json | 2 +- 56 files changed, 686 insertions(+), 33 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 69137299d8..91c2d60115 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -38,12 +38,16 @@ "eighty-tigers-argue", "fast-ears-hug", "fifty-squids-eat", + "fifty-suits-shout", "fluffy-moles-march", + "four-coats-pull", "giant-masks-carry", "great-cooks-dream", "itchy-kids-relax", "itchy-shoes-appear", "large-hats-walk", + "large-sloths-camp", + "lazy-ladybugs-return", "many-phones-study", "mean-pans-study", "metal-cats-double", @@ -54,10 +58,17 @@ "olive-parrots-move", "perfect-mangos-cry", "pink-horses-deny", + "pretty-hotels-drop", "quick-numbers-flash", "rare-planes-draw", + "red-turkeys-develop", "selfish-cycles-retire", + "sharp-worms-kneel", + "smooth-elephants-wave", + "smooth-pots-nail", "soft-boxes-smile", + "soft-dryers-invite", + "spotty-cups-destroy", "spotty-sheep-warn", "stale-cooks-reflect", "strange-candles-shout", @@ -68,6 +79,7 @@ "tricky-kangaroos-love", "tricky-olives-stare", "tricky-oranges-pump", + "twenty-birds-scream", "weak-mails-cross", "witty-jokes-serve" ] diff --git a/CHANGELOG.md b/CHANGELOG.md index 19f32ab19a..bff065482c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,154 @@ +# Version 2.0.0-next.2 + +## Major changes + +**[feat(store-indexer): use fastify, move trpc to /trpc (#1232)](https://github.com/latticexyz/mud/commit/b621fb97731a0ceed9b67d741f40648a8aa64817)** (@latticexyz/store-indexer) + +Adds a [Fastify](https://fastify.dev/) server in front of tRPC and puts tRPC endpoints under `/trpc` to make way for other top-level endpoints (e.g. [tRPC panel](https://github.com/iway1/trpc-panel) or other API frontends like REST or gRPC). + +If you're using `@latticexyz/store-sync` packages with an indexer (either `createIndexerClient` or `indexerUrl` argument of `syncToRecs`), then you'll want to update your indexer URL: + +```diff + createIndexerClient({ +- url: "https://indexer.dev.linfra.xyz", ++ url: "https://indexer.dev.linfra.xyz/trpc", + }); +``` + +```diff + syncToRecs({ + ... +- indexerUrl: "https://indexer.dev.linfra.xyz", ++ indexerUrl: "https://indexer.dev.linfra.xyz/trpc", + }); +``` + +**[refactor(store): remove TableId library (#1279)](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062)** (@latticexyz/store) + +Remove `TableId` library to simplify `store` package + +**[feat(create-mud): infer recs components from config (#1278)](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473)** (@latticexyz/cli, @latticexyz/std-client, @latticexyz/store-sync, @latticexyz/store, @latticexyz/world, create-mud) + +RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + +To migrate existing projects after upgrading to this MUD version: + +1. Remove `contractComponents.ts` from `client/src/mud` +2. Remove `components` argument from `syncToRecs` +3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +**[feat: bump viem to 1.6.0 (#1308)](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)** (@latticexyz/block-logs-stream) + +- removes our own `getLogs` function now that viem's `getLogs` supports using multiple `events` per RPC call. +- removes `isNonPendingBlock` and `isNonPendingLog` helpers now that viem narrows `Block` and `Log` types based on inputs +- simplifies `groupLogsByBlockNumber` types and tests + +**[feat(dev-tools): use new sync stack (#1284)](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)** (@latticexyz/dev-tools, create-mud) + +MUD dev tools is updated to latest sync stack. You must now pass in all of its data requirements rather than relying on magic globals. + +```diff +import { mount as mountDevTools } from "@latticexyz/dev-tools"; + +- mountDevTools(); ++ mountDevTools({ ++ config, ++ publicClient, ++ walletClient, ++ latestBlock$, ++ blockStorageOperations$, ++ worldAddress, ++ worldAbi, ++ write$, ++ // if you're using recs ++ recsWorld, ++ }); +``` + +It's also advised to wrap dev tools so that it is only mounted during development mode. Here's how you do this with Vite: + +```ts +// https://vitejs.dev/guide/env-and-mode.html +if (import.meta.env.DEV) { + mountDevTools({ ... }); +} +``` + +## Minor changes + +**[feat(dev-tools): use new sync stack (#1284)](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)** (@latticexyz/common) + +`createContract` now has an `onWrite` callback so you can observe writes. This is useful for wiring up the transanction log in MUD dev tools. + +```ts +import { createContract, ContractWrite } from "@latticexyz/common"; +import { Subject } from "rxjs"; + +const write$ = new Subject(); +creactContract({ + ... + onWrite: (write) => write$.next(write), +}); +``` + +**[feat: bump viem to 1.6.0 (#1308)](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)** (@latticexyz/common) + +- adds `defaultPriorityFee` to `mudFoundry` for better support with MUD's default anvil config and removes workaround in `createContract` +- improves nonce error detection using viem's custom errors + +**[feat(store-sync,store-indexer): consolidate sync logic, add syncToSqlite (#1240)](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e)** (@latticexyz/dev-tools, @latticexyz/store-indexer, @latticexyz/store-sync) + +Store sync logic is now consolidated into a `createStoreSync` function exported from `@latticexyz/store-sync`. This simplifies each storage sync strategy to just a simple wrapper around the storage adapter. You can now sync to RECS with `syncToRecs` or SQLite with `syncToSqlite` and PostgreSQL support coming soon. + +There are no breaking changes if you were just using `syncToRecs` from `@latticexyz/store-sync` or running the `sqlite-indexer` binary from `@latticexyz/store-indexer`. + +**[feat(dev-tools): use new sync stack (#1284)](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)** (@latticexyz/react) + +Adds a `usePromise` hook that returns a [native `PromiseSettledResult` object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled). + +```tsx +const promise = fetch(url); +const result = usePromise(promise); + +if (result.status === "idle" || result.status === "pending") { + return <>fetching; +} + +if (result.status === "rejected") { + return <>error fetching: {String(result.reason)}; +} + +if (result.status === "fulfilled") { + return <>fetch status: {result.value.status}; +} +``` + +## Patch changes + +**[feat: bump viem to 1.6.0 (#1308)](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)** (@latticexyz/block-logs-stream, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/network, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/std-client, @latticexyz/store-indexer, @latticexyz/store-sync, create-mud) + +bump viem to 1.6.0 + +**[feat(dev-tools): improve support for non-store recs components (#1302)](https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb)** (@latticexyz/dev-tools, @latticexyz/store-sync) + +Improves support for internal/client-only RECS components + +**[feat: bump viem to 1.6.0 (#1308)](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)** (@latticexyz/store-sync) + +remove usages of `isNonPendingBlock` and `isNonPendingLog` (fixed with more specific viem types) + +--- + # Version 2.0.0-next.1 ## Major changes diff --git a/packages/block-logs-stream/CHANGELOG.md b/packages/block-logs-stream/CHANGELOG.md index 6ce48139d4..9aa9b7a141 100644 --- a/packages/block-logs-stream/CHANGELOG.md +++ b/packages/block-logs-stream/CHANGELOG.md @@ -1,5 +1,22 @@ # @latticexyz/block-logs-stream +## 2.0.0-next.2 + +### Major Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - - removes our own `getLogs` function now that viem's `getLogs` supports using multiple `events` per RPC call. + - removes `isNonPendingBlock` and `isNonPendingLog` helpers now that viem narrows `Block` and `Log` types based on inputs + - simplifies `groupLogsByBlockNumber` types and tests + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/block-logs-stream/package.json b/packages/block-logs-stream/package.json index 9f8f5e8407..2b11af11d6 100644 --- a/packages/block-logs-stream/package.json +++ b/packages/block-logs-stream/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/block-logs-stream", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Create a stream of EVM block logs for events", "repository": { "type": "git", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index c4a0afdcac..916abff732 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,41 @@ # Change Log +## 2.0.0-next.2 + +### Major Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +### Patch Changes + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/world@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + - @latticexyz/gas-report@2.0.0-next.2 + - @latticexyz/services@2.0.0-next.2 + - @latticexyz/solecs@2.0.0-next.2 + - @latticexyz/std-contracts@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index 9fea153713..976b2b80c2 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/cli", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Command line interface for mud", "repository": { "type": "git", diff --git a/packages/common/CHANGELOG.md b/packages/common/CHANGELOG.md index a0be1889a3..d2bf018ce7 100644 --- a/packages/common/CHANGELOG.md +++ b/packages/common/CHANGELOG.md @@ -1,5 +1,32 @@ # Change Log +## 2.0.0-next.2 + +### Minor Changes + +- [#1284](https://github.com/latticexyz/mud/pull/1284) [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad) Thanks [@holic](https://github.com/holic)! - `createContract` now has an `onWrite` callback so you can observe writes. This is useful for wiring up the transanction log in MUD dev tools. + + ```ts + import { createContract, ContractWrite } from "@latticexyz/common"; + import { Subject } from "rxjs"; + + const write$ = new Subject(); + creactContract({ + ... + onWrite: (write) => write$.next(write), + }); + ``` + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - - adds `defaultPriorityFee` to `mudFoundry` for better support with MUD's default anvil config and removes workaround in `createContract` + - improves nonce error detection using viem's custom errors + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/schema-type@2.0.0-next.2 + ## 2.0.0-next.1 ### Major Changes diff --git a/packages/common/package.json b/packages/common/package.json index c3dd94e3b4..e7df95c6e0 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/common", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Common low level logic shared between packages", "repository": { "type": "git", diff --git a/packages/config/CHANGELOG.md b/packages/config/CHANGELOG.md index d16e698b78..b71ab4369e 100644 --- a/packages/config/CHANGELOG.md +++ b/packages/config/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/config/package.json b/packages/config/package.json index 25c16ecf4d..b846fc5425 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/config", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Config for Store and World", "repository": { "type": "git", diff --git a/packages/create-mud/CHANGELOG.md b/packages/create-mud/CHANGELOG.md index 5928630bcd..a97f25d2a3 100644 --- a/packages/create-mud/CHANGELOG.md +++ b/packages/create-mud/CHANGELOG.md @@ -1,5 +1,60 @@ # Change Log +## 2.0.0-next.2 + +### Major Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +- [#1284](https://github.com/latticexyz/mud/pull/1284) [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad) Thanks [@holic](https://github.com/holic)! - MUD dev tools is updated to latest sync stack. You must now pass in all of its data requirements rather than relying on magic globals. + + ```diff + import { mount as mountDevTools } from "@latticexyz/dev-tools"; + + - mountDevTools(); + + mountDevTools({ + + config, + + publicClient, + + walletClient, + + latestBlock$, + + blockStorageOperations$, + + worldAddress, + + worldAbi, + + write$, + + // if you're using recs + + recsWorld, + + }); + ``` + + It's also advised to wrap dev tools so that it is only mounted during development mode. Here's how you do this with Vite: + + ```ts + // https://vitejs.dev/guide/env-and-mode.html + if (import.meta.env.DEV) { + mountDevTools({ ... }); + } + ``` + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + ## 2.0.0-next.1 ### Major Changes diff --git a/packages/create-mud/package.json b/packages/create-mud/package.json index df39dea0d5..da8d21dfc0 100644 --- a/packages/create-mud/package.json +++ b/packages/create-mud/package.json @@ -1,6 +1,6 @@ { "name": "create-mud", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Create a new MUD project", "license": "MIT", "author": "Lattice ", diff --git a/packages/dev-tools/CHANGELOG.md b/packages/dev-tools/CHANGELOG.md index ec704cca98..1948c9ab7f 100644 --- a/packages/dev-tools/CHANGELOG.md +++ b/packages/dev-tools/CHANGELOG.md @@ -1,5 +1,57 @@ # @latticexyz/dev-tools +## 2.0.0-next.2 + +### Major Changes + +- [#1284](https://github.com/latticexyz/mud/pull/1284) [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad) Thanks [@holic](https://github.com/holic)! - MUD dev tools is updated to latest sync stack. You must now pass in all of its data requirements rather than relying on magic globals. + + ```diff + import { mount as mountDevTools } from "@latticexyz/dev-tools"; + + - mountDevTools(); + + mountDevTools({ + + config, + + publicClient, + + walletClient, + + latestBlock$, + + blockStorageOperations$, + + worldAddress, + + worldAbi, + + write$, + + // if you're using recs + + recsWorld, + + }); + ``` + + It's also advised to wrap dev tools so that it is only mounted during development mode. Here's how you do this with Vite: + + ```ts + // https://vitejs.dev/guide/env-and-mode.html + if (import.meta.env.DEV) { + mountDevTools({ ... }); + } + ``` + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- [#1240](https://github.com/latticexyz/mud/pull/1240) [`753bdce4`](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e) Thanks [@holic](https://github.com/holic)! - Store sync logic is now consolidated into a `createStoreSync` function exported from `@latticexyz/store-sync`. This simplifies each storage sync strategy to just a simple wrapper around the storage adapter. You can now sync to RECS with `syncToRecs` or SQLite with `syncToSqlite` and PostgreSQL support coming soon. + + There are no breaking changes if you were just using `syncToRecs` from `@latticexyz/store-sync` or running the `sqlite-indexer` binary from `@latticexyz/store-indexer`. + +- [#1302](https://github.com/latticexyz/mud/pull/1302) [`5294a7d5`](https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb) Thanks [@holic](https://github.com/holic)! - Improves support for internal/client-only RECS components + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`753bdce4`](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e), [`5294a7d5`](https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/store-sync@2.0.0-next.2 + - @latticexyz/world@2.0.0-next.2 + - @latticexyz/react@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/dev-tools/package.json b/packages/dev-tools/package.json index 022dd74099..70c91e9067 100644 --- a/packages/dev-tools/package.json +++ b/packages/dev-tools/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/dev-tools", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "MUD developer tools", "repository": { "type": "git", @@ -50,12 +50,12 @@ "vitest": "0.31.4" }, "peerDependencies": { - "@latticexyz/common": "*", - "@latticexyz/recs": "*", - "@latticexyz/store": "*", - "@latticexyz/store-sync": "*", - "@latticexyz/utils": "*", - "@latticexyz/world": "*" + "@latticexyz/common": "2.0.0-next.2", + "@latticexyz/recs": "2.0.0-next.2", + "@latticexyz/store": "2.0.0-next.2", + "@latticexyz/store-sync": "2.0.0-next.2", + "@latticexyz/utils": "2.0.0-next.2", + "@latticexyz/world": "2.0.0-next.2" }, "publishConfig": { "access": "public" diff --git a/packages/ecs-browser/CHANGELOG.md b/packages/ecs-browser/CHANGELOG.md index a6c7300901..0076c626db 100644 --- a/packages/ecs-browser/CHANGELOG.md +++ b/packages/ecs-browser/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/std-client@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/ecs-browser/package.json b/packages/ecs-browser/package.json index 1cb7b53a42..3fb29f08da 100644 --- a/packages/ecs-browser/package.json +++ b/packages/ecs-browser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/ecs-browser", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Component Browser for RECS", "repository": { "type": "git", diff --git a/packages/gas-report/CHANGELOG.md b/packages/gas-report/CHANGELOG.md index 552b0de501..2b137254f8 100644 --- a/packages/gas-report/CHANGELOG.md +++ b/packages/gas-report/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/gas-report/package.json b/packages/gas-report/package.json index afe9c8d17d..3b797fcfc4 100644 --- a/packages/gas-report/package.json +++ b/packages/gas-report/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/gas-report", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Gas reporter for specific lines within forge tests", "repository": { "type": "git", diff --git a/packages/network/CHANGELOG.md b/packages/network/CHANGELOG.md index 76967eec03..703efcdd65 100644 --- a/packages/network/CHANGELOG.md +++ b/packages/network/CHANGELOG.md @@ -1,5 +1,21 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/world@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + - @latticexyz/services@2.0.0-next.2 + - @latticexyz/solecs@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/network/package.json b/packages/network/package.json index b66814f66a..57769e4f93 100644 --- a/packages/network/package.json +++ b/packages/network/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/network", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/noise/CHANGELOG.md b/packages/noise/CHANGELOG.md index 885f03e4c1..8668e9b17e 100644 --- a/packages/noise/CHANGELOG.md +++ b/packages/noise/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/noise/package.json b/packages/noise/package.json index 3f06771e55..fdc33e98f0 100644 --- a/packages/noise/package.json +++ b/packages/noise/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/noise", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "license": "MIT", "type": "module", "exports": { diff --git a/packages/phaserx/CHANGELOG.md b/packages/phaserx/CHANGELOG.md index 3008ff8e78..cfe97612f3 100644 --- a/packages/phaserx/CHANGELOG.md +++ b/packages/phaserx/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- Updated dependencies []: + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/phaserx/package.json b/packages/phaserx/package.json index 4af5e4914b..2a57eec7d3 100644 --- a/packages/phaserx/package.json +++ b/packages/phaserx/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/phaserx", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/protocol-parser/CHANGELOG.md b/packages/protocol-parser/CHANGELOG.md index 7d37840360..8fd989ac9a 100644 --- a/packages/protocol-parser/CHANGELOG.md +++ b/packages/protocol-parser/CHANGELOG.md @@ -1,5 +1,15 @@ # @latticexyz/protocol-parser +## 2.0.0-next.2 + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/protocol-parser/package.json b/packages/protocol-parser/package.json index da17fb5ff4..e80e137483 100644 --- a/packages/protocol-parser/package.json +++ b/packages/protocol-parser/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/protocol-parser", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Parser utilities for the MUD protocol", "repository": { "type": "git", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 9c11baf31f..52f6f5239f 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,35 @@ # Change Log +## 2.0.0-next.2 + +### Minor Changes + +- [#1284](https://github.com/latticexyz/mud/pull/1284) [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad) Thanks [@holic](https://github.com/holic)! - Adds a `usePromise` hook that returns a [native `PromiseSettledResult` object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled). + + ```tsx + const promise = fetch(url); + const result = usePromise(promise); + + if (result.status === "idle" || result.status === "pending") { + return <>fetching; + } + + if (result.status === "rejected") { + return <>error fetching: {String(result.reason)}; + } + + if (result.status === "fulfilled") { + return <>fetch status: {result.value.status}; + } + ``` + +### Patch Changes + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/store-cache@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index f3ba944dbc..4986df0104 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/react", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "React tools for MUD client.", "repository": { "type": "git", diff --git a/packages/recs/CHANGELOG.md b/packages/recs/CHANGELOG.md index 2e8466186c..1a4f8a0b47 100644 --- a/packages/recs/CHANGELOG.md +++ b/packages/recs/CHANGELOG.md @@ -1,5 +1,13 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/recs/package.json b/packages/recs/package.json index f1016cfdce..96ca596afb 100644 --- a/packages/recs/package.json +++ b/packages/recs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/recs", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/schema-type/CHANGELOG.md b/packages/schema-type/CHANGELOG.md index 07f3bdee33..1324458eb1 100644 --- a/packages/schema-type/CHANGELOG.md +++ b/packages/schema-type/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + ## 2.0.0-next.1 ### Minor Changes diff --git a/packages/schema-type/package.json b/packages/schema-type/package.json index e87b61fbc1..064c0f3a28 100644 --- a/packages/schema-type/package.json +++ b/packages/schema-type/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/schema-type", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "SchemaType enum for various languages", "repository": { "type": "git", diff --git a/packages/services/CHANGELOG.md b/packages/services/CHANGELOG.md index 5e1cb9198b..3fd2d67a8e 100644 --- a/packages/services/CHANGELOG.md +++ b/packages/services/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/services/package.json b/packages/services/package.json index 68172e8f6f..de0a50bfc0 100644 --- a/packages/services/package.json +++ b/packages/services/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/services", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "MUD services for enhanced interactions with on-chain ECS state", "repository": { "type": "git", diff --git a/packages/solecs/CHANGELOG.md b/packages/solecs/CHANGELOG.md index 302792aeb7..ca50905623 100644 --- a/packages/solecs/CHANGELOG.md +++ b/packages/solecs/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/solecs/package.json b/packages/solecs/package.json index 32b0ffd8e4..9a8f42d97b 100644 --- a/packages/solecs/package.json +++ b/packages/solecs/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/solecs", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Solidity Entity Component System", "repository": { "type": "git", diff --git a/packages/solhint-config-mud/CHANGELOG.md b/packages/solhint-config-mud/CHANGELOG.md index c804e256a5..8652a1109c 100644 --- a/packages/solhint-config-mud/CHANGELOG.md +++ b/packages/solhint-config-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/solhint-config-mud/package.json b/packages/solhint-config-mud/package.json index a2ee399c42..0c2010f061 100644 --- a/packages/solhint-config-mud/package.json +++ b/packages/solhint-config-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-config-mud", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/solhint-plugin-mud/CHANGELOG.md b/packages/solhint-plugin-mud/CHANGELOG.md index c804e256a5..8652a1109c 100644 --- a/packages/solhint-plugin-mud/CHANGELOG.md +++ b/packages/solhint-plugin-mud/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/solhint-plugin-mud/package.json b/packages/solhint-plugin-mud/package.json index 909da43ef5..a2fa61b10d 100644 --- a/packages/solhint-plugin-mud/package.json +++ b/packages/solhint-plugin-mud/package.json @@ -1,6 +1,6 @@ { "name": "solhint-plugin-mud", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/std-client/CHANGELOG.md b/packages/std-client/CHANGELOG.md index c2981b6645..e76fe4fb88 100644 --- a/packages/std-client/CHANGELOG.md +++ b/packages/std-client/CHANGELOG.md @@ -1,5 +1,43 @@ # Change Log +## 2.0.0-next.2 + +### Major Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/cli@2.0.0-next.2 + - @latticexyz/world@2.0.0-next.2 + - @latticexyz/network@2.0.0-next.2 + - @latticexyz/store-cache@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + - @latticexyz/solecs@2.0.0-next.2 + - @latticexyz/utils@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/std-client/package.json b/packages/std-client/package.json index 6719631898..08aed526af 100644 --- a/packages/std-client/package.json +++ b/packages/std-client/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/std-client", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Standard library for MUD client.", "repository": { "type": "git", diff --git a/packages/std-contracts/CHANGELOG.md b/packages/std-contracts/CHANGELOG.md index 61e2c56abe..e159a0a02b 100644 --- a/packages/std-contracts/CHANGELOG.md +++ b/packages/std-contracts/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/std-contracts/package.json b/packages/std-contracts/package.json index b70ccc72e7..05a51c8cff 100644 --- a/packages/std-contracts/package.json +++ b/packages/std-contracts/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/std-contracts", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "MUD Contracts Standard Library", "repository": { "type": "git", diff --git a/packages/store-cache/CHANGELOG.md b/packages/store-cache/CHANGELOG.md index 171c025126..6cf49cb00b 100644 --- a/packages/store-cache/CHANGELOG.md +++ b/packages/store-cache/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/store-cache/package.json b/packages/store-cache/package.json index 013f9247f4..4d7a4de3f2 100644 --- a/packages/store-cache/package.json +++ b/packages/store-cache/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-cache", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Database to replicate Store contract state on a TypeScript client", "repository": { "type": "git", diff --git a/packages/store-indexer/CHANGELOG.md b/packages/store-indexer/CHANGELOG.md index 67cda5a3f1..3571446c3e 100644 --- a/packages/store-indexer/CHANGELOG.md +++ b/packages/store-indexer/CHANGELOG.md @@ -1,5 +1,44 @@ # @latticexyz/store-indexer +## 2.0.0-next.2 + +### Major Changes + +- [#1232](https://github.com/latticexyz/mud/pull/1232) [`b621fb97`](https://github.com/latticexyz/mud/commit/b621fb97731a0ceed9b67d741f40648a8aa64817) Thanks [@holic](https://github.com/holic)! - Adds a [Fastify](https://fastify.dev/) server in front of tRPC and puts tRPC endpoints under `/trpc` to make way for other top-level endpoints (e.g. [tRPC panel](https://github.com/iway1/trpc-panel) or other API frontends like REST or gRPC). + + If you're using `@latticexyz/store-sync` packages with an indexer (either `createIndexerClient` or `indexerUrl` argument of `syncToRecs`), then you'll want to update your indexer URL: + + ```diff + createIndexerClient({ + - url: "https://indexer.dev.linfra.xyz", + + url: "https://indexer.dev.linfra.xyz/trpc", + }); + ``` + + ```diff + syncToRecs({ + ... + - indexerUrl: "https://indexer.dev.linfra.xyz", + + indexerUrl: "https://indexer.dev.linfra.xyz/trpc", + }); + ``` + +### Minor Changes + +- [#1240](https://github.com/latticexyz/mud/pull/1240) [`753bdce4`](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e) Thanks [@holic](https://github.com/holic)! - Store sync logic is now consolidated into a `createStoreSync` function exported from `@latticexyz/store-sync`. This simplifies each storage sync strategy to just a simple wrapper around the storage adapter. You can now sync to RECS with `syncToRecs` or SQLite with `syncToSqlite` and PostgreSQL support coming soon. + + There are no breaking changes if you were just using `syncToRecs` from `@latticexyz/store-sync` or running the `sqlite-indexer` binary from `@latticexyz/store-indexer`. + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`753bdce4`](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e), [`5294a7d5`](https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/store-sync@2.0.0-next.2 + - @latticexyz/block-logs-stream@2.0.0-next.2 + ## 2.0.0-next.1 ### Major Changes diff --git a/packages/store-indexer/package.json b/packages/store-indexer/package.json index 14080555d8..c051b86bce 100644 --- a/packages/store-indexer/package.json +++ b/packages/store-indexer/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-indexer", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Minimal Typescript indexer for Store", "repository": { "type": "git", diff --git a/packages/store-sync/CHANGELOG.md b/packages/store-sync/CHANGELOG.md index 5a0b5b2e7e..6c0ee19044 100644 --- a/packages/store-sync/CHANGELOG.md +++ b/packages/store-sync/CHANGELOG.md @@ -1,5 +1,50 @@ # @latticexyz/store-sync +## 2.0.0-next.2 + +### Major Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +### Minor Changes + +- [#1240](https://github.com/latticexyz/mud/pull/1240) [`753bdce4`](https://github.com/latticexyz/mud/commit/753bdce41597200641daba60727ff1b53d2b512e) Thanks [@holic](https://github.com/holic)! - Store sync logic is now consolidated into a `createStoreSync` function exported from `@latticexyz/store-sync`. This simplifies each storage sync strategy to just a simple wrapper around the storage adapter. You can now sync to RECS with `syncToRecs` or SQLite with `syncToSqlite` and PostgreSQL support coming soon. + + There are no breaking changes if you were just using `syncToRecs` from `@latticexyz/store-sync` or running the `sqlite-indexer` binary from `@latticexyz/store-indexer`. + +### Patch Changes + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - bump viem to 1.6.0 + +- [#1302](https://github.com/latticexyz/mud/pull/1302) [`5294a7d5`](https://github.com/latticexyz/mud/commit/5294a7d5983c52cb336373566afd6a8ec7fc4bfb) Thanks [@holic](https://github.com/holic)! - Improves support for internal/client-only RECS components + +- [#1308](https://github.com/latticexyz/mud/pull/1308) [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39) Thanks [@holic](https://github.com/holic)! - remove usages of `isNonPendingBlock` and `isNonPendingLog` (fixed with more specific viem types) + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/world@2.0.0-next.2 + - @latticexyz/block-logs-stream@2.0.0-next.2 + - @latticexyz/protocol-parser@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/recs@2.0.0-next.2 + ## 2.0.0-next.1 ### Major Changes diff --git a/packages/store-sync/package.json b/packages/store-sync/package.json index 2da5df238f..c03eb0e7d5 100644 --- a/packages/store-sync/package.json +++ b/packages/store-sync/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store-sync", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Utilities to sync MUD Store events with a client or cache", "repository": { "type": "git", diff --git a/packages/store/CHANGELOG.md b/packages/store/CHANGELOG.md index 0550c1295f..5adb08c8ab 100644 --- a/packages/store/CHANGELOG.md +++ b/packages/store/CHANGELOG.md @@ -1,5 +1,37 @@ # Change Log +## 2.0.0-next.2 + +### Major Changes + +- [#1279](https://github.com/latticexyz/mud/pull/1279) [`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062) Thanks [@dk1a](https://github.com/dk1a)! - Remove `TableId` library to simplify `store` package + +### Patch Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + - @latticexyz/gas-report@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/store/package.json b/packages/store/package.json index fa398731b4..ef849f4c3a 100644 --- a/packages/store/package.json +++ b/packages/store/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/store", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "Store", "repository": { "type": "git", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index a1dc460375..76e0d719cf 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,5 +1,7 @@ # Change Log +## 2.0.0-next.2 + ## 2.0.0-next.1 ## 2.0.0-next.0 diff --git a/packages/utils/package.json b/packages/utils/package.json index 9d941049d1..80bec0be00 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/utils", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "repository": { "type": "git", "url": "https://github.com/latticexyz/mud.git", diff --git a/packages/world/CHANGELOG.md b/packages/world/CHANGELOG.md index ed4b886c2c..73410d6e32 100644 --- a/packages/world/CHANGELOG.md +++ b/packages/world/CHANGELOG.md @@ -1,5 +1,34 @@ # Change Log +## 2.0.0-next.2 + +### Patch Changes + +- [#1278](https://github.com/latticexyz/mud/pull/1278) [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473) Thanks [@holic](https://github.com/holic)! - RECS components are now dynamically created and inferred from your MUD config when using `syncToRecs`. + + To migrate existing projects after upgrading to this MUD version: + + 1. Remove `contractComponents.ts` from `client/src/mud` + 2. Remove `components` argument from `syncToRecs` + 3. Update `build:mud` and `dev` scripts in `contracts/package.json` to remove tsgen + + ```diff + - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud", + + "build:mud": "mud tablegen && mud worldgen", + ``` + + ```diff + - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud", + + "dev": "pnpm mud dev-contracts", + ``` + +- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`b8a6158d`](https://github.com/latticexyz/mud/commit/b8a6158d63738ebfc1e7eb221909436d050c7e39)]: + - @latticexyz/store@2.0.0-next.2 + - @latticexyz/common@2.0.0-next.2 + - @latticexyz/schema-type@2.0.0-next.2 + - @latticexyz/config@2.0.0-next.2 + - @latticexyz/gas-report@2.0.0-next.2 + ## 2.0.0-next.1 ### Patch Changes diff --git a/packages/world/package.json b/packages/world/package.json index c76e02063e..92c0abd4ee 100644 --- a/packages/world/package.json +++ b/packages/world/package.json @@ -1,6 +1,6 @@ { "name": "@latticexyz/world", - "version": "2.0.0-next.1", + "version": "2.0.0-next.2", "description": "World framework", "repository": { "type": "git",