Skip to content

Commit

Permalink
Version Packages (next)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 3, 2023
1 parent e4e7d77 commit 66b3f8f
Show file tree
Hide file tree
Showing 63 changed files with 462 additions and 36 deletions.
8 changes: 8 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"chilled-chicken-repair",
"chilled-cougars-smash",
"chilled-kangaroos-dream",
"chilly-kangaroos-clap",
"clever-items-appear",
"clever-rats-sip",
"cold-years-itch",
Expand Down Expand Up @@ -88,6 +89,7 @@
"khaki-houses-whisper",
"large-drinks-sell",
"large-hats-walk",
"large-nails-suffer",
"large-sloths-camp",
"late-geese-guess",
"late-spies-cover",
Expand All @@ -96,6 +98,7 @@
"long-lizards-admire",
"lovely-buses-boil",
"lovely-fireants-behave",
"lucky-clocks-love",
"many-phones-study",
"many-pumpkins-cry",
"mean-islands-brake",
Expand All @@ -107,10 +110,12 @@
"mighty-eels-type",
"modern-bikes-build",
"modern-hornets-jam",
"modern-stingrays-kneel",
"modern-trains-remain",
"nasty-trains-drop",
"nasty-waves-divide",
"nervous-walls-knock",
"nice-avocados-poke",
"nice-bikes-double",
"nice-fishes-perform",
"nice-glasses-begin",
Expand Down Expand Up @@ -139,6 +144,7 @@
"real-students-exercise",
"red-falcons-do",
"red-turkeys-develop",
"rotten-beers-learn",
"rotten-cats-lay",
"selfish-cycles-retire",
"serious-ads-trade",
Expand All @@ -152,6 +158,7 @@
"shy-sheep-wait",
"silent-rice-argue",
"silly-snakes-fold",
"silver-dolls-shave",
"silver-mangos-thank",
"six-cats-agree",
"six-kangaroos-sneeze",
Expand Down Expand Up @@ -196,6 +203,7 @@
"unlucky-guests-cover",
"violet-insects-press",
"weak-mails-cross",
"wicked-cheetahs-cough",
"wicked-squids-do",
"wicked-tigers-return",
"wild-gorillas-care",
Expand Down
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
## Version 2.0.0-next.11

### Major changes

**[feat(cli): remove backup/restore/force options from set-version (#1687)](https://github.com/latticexyz/mud/commit/3d0b3edb46b266fccb40e26e8243d7628bea8baf)** (@latticexyz/cli)

Removes `.mudbackup` file handling and `--backup`, `--restore`, and `--force` options from `mud set-version` command.

To revert to a previous MUD version, use `git diff` to find the version that you changed from and want to revert to and run `pnpm mud set-version <prior-version>` again.

### Minor changes

**[feat(world-modules): add SystemSwitch util (#1665)](https://github.com/latticexyz/mud/commit/9352648b19800f28b1d96ec448283808342a41f7)** (@latticexyz/world-modules)

Since [#1564](https://github.com/latticexyz/mud/pull/1564) the World can no longer call itself via an external call.
This made the developer experience of calling other systems via root systems worse, since calls from root systems are executed from the context of the World.
The recommended approach is to use `delegatecall` to the system if in the context of a root system, and an external call via the World if in the context of a non-root system.
To bring back the developer experience of calling systems from other sysyems without caring about the context in which the call is executed, we added the `SystemSwitch` util.

```diff
- // Instead of calling the system via an external call to world...
- uint256 value = IBaseWorld(_world()).callMySystem();

+ // ...you can now use the `SystemSwitch` util.
+ // This works independent of whether used in a root system or non-root system.
+ uint256 value = abi.decode(SystemSwitch.call(abi.encodeCall(IBaseWorld.callMySystem, ()), (uint256));
```

Note that if you already know your system is always executed as non-root system, you can continue to use the approach of calling other systems via the `IBaseWorld(world)`.

**[refactor(common): move `createContract`'s internal write logic to `writeContract` (#1693)](https://github.com/latticexyz/mud/commit/d075f82f30f4969a353e4ea29ca2a25a04810523)** (@latticexyz/common)

- Moves contract write logic out of `createContract` into its own `writeContract` method so that it can be used outside of the contract instance, and for consistency with viem.
- Deprecates `createContract` in favor of `getContract` for consistency with viem.
- Reworks `createNonceManager`'s `BroadcastChannel` setup and moves out the notion of a "nonce manager ID" to `getNonceManagerId` so we can create an internal cache with `getNonceManager` for use in `writeContract`.

If you were using the `createNonceManager` before, you'll just need to rename `publicClient` argument to `client`:

```diff
const publicClient = createPublicClient({ ... });
- const nonceManager = createNonceManager({ publicClient, ... });
+ const nonceManager = createNonceManager({ client: publicClient, ... });
```

**[feat(gas-reporter): allow gas-reporter to parse stdin (#1688)](https://github.com/latticexyz/mud/commit/4385c5a4c0e2d5550c041acc4386ae7fc1cb4b7e)** (@latticexyz/gas-report)

Allow the `gas-report` CLI to parse logs via `stdin`, so it can be used with custom test commands (e.g. `mud test`).

Usage:

```sh
# replace `forge test -vvv` with the custom test command
GAS_REPORTER_ENABLED=true forge test -vvv | pnpm gas-report --stdin
```

### Patch changes

**[fix(common): workaround for zero base fee (#1689)](https://github.com/latticexyz/mud/commit/16b13ea8fc5e7f63ce08bc6baa2087cab9c8089f)** (@latticexyz/common)

Adds viem workaround for zero base fee used by MUD's anvil config

**[build: bump viem and abitype (#1684)](https://github.com/latticexyz/mud/commit/f99e889872e6881bf32bcb9a605b8b5c1b05fac4)** (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/faucet, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/store-indexer, @latticexyz/store-sync, @latticexyz/store, create-mud)

Bump viem to 1.14.0 and abitype to 0.9.8

**[feat(gas-report): add more logs to stdin piping (#1694)](https://github.com/latticexyz/mud/commit/ba17bdab5c8b2a3aa56e86722134174e2799ddfa)** (@latticexyz/gas-report)

Pass through `stdin` logs in `gas-report`. Since the script piping in logs to `gas-report` can be long-running, it is useful to see its logs to know if it's stalling.

**[fix(protocol-parser): allow arbitrary key order when encoding values (#1674)](https://github.com/latticexyz/mud/commit/a2f41ade977a5374c400ef8bfc2cb8c8698f185e)** (@latticexyz/protocol-parser)

Allow arbitrary key order when encoding values

---

## Version 2.0.0-next.10

### Major changes
Expand Down
75 changes: 75 additions & 0 deletions docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
## Version 2.0.0-next.11

### Major changes

**[feat(cli): remove backup/restore/force options from set-version (#1687)](https://github.com/latticexyz/mud/commit/3d0b3edb46b266fccb40e26e8243d7628bea8baf)** (@latticexyz/cli)

Removes `.mudbackup` file handling and `--backup`, `--restore`, and `--force` options from `mud set-version` command.

To revert to a previous MUD version, use `git diff` to find the version that you changed from and want to revert to and run `pnpm mud set-version <prior-version>` again.

### Minor changes

**[feat(world-modules): add SystemSwitch util (#1665)](https://github.com/latticexyz/mud/commit/9352648b19800f28b1d96ec448283808342a41f7)** (@latticexyz/world-modules)

Since [#1564](https://github.com/latticexyz/mud/pull/1564) the World can no longer call itself via an external call.
This made the developer experience of calling other systems via root systems worse, since calls from root systems are executed from the context of the World.
The recommended approach is to use `delegatecall` to the system if in the context of a root system, and an external call via the World if in the context of a non-root system.
To bring back the developer experience of calling systems from other sysyems without caring about the context in which the call is executed, we added the `SystemSwitch` util.

```diff
- // Instead of calling the system via an external call to world...
- uint256 value = IBaseWorld(_world()).callMySystem();

+ // ...you can now use the `SystemSwitch` util.
+ // This works independent of whether used in a root system or non-root system.
+ uint256 value = abi.decode(SystemSwitch.call(abi.encodeCall(IBaseWorld.callMySystem, ()), (uint256));
```

Note that if you already know your system is always executed as non-root system, you can continue to use the approach of calling other systems via the `IBaseWorld(world)`.

**[refactor(common): move `createContract`'s internal write logic to `writeContract` (#1693)](https://github.com/latticexyz/mud/commit/d075f82f30f4969a353e4ea29ca2a25a04810523)** (@latticexyz/common)

- Moves contract write logic out of `createContract` into its own `writeContract` method so that it can be used outside of the contract instance, and for consistency with viem.
- Deprecates `createContract` in favor of `getContract` for consistency with viem.
- Reworks `createNonceManager`'s `BroadcastChannel` setup and moves out the notion of a "nonce manager ID" to `getNonceManagerId` so we can create an internal cache with `getNonceManager` for use in `writeContract`.

If you were using the `createNonceManager` before, you'll just need to rename `publicClient` argument to `client`:

```diff
const publicClient = createPublicClient({ ... });
- const nonceManager = createNonceManager({ publicClient, ... });
+ const nonceManager = createNonceManager({ client: publicClient, ... });
```

**[feat(gas-reporter): allow gas-reporter to parse stdin (#1688)](https://github.com/latticexyz/mud/commit/4385c5a4c0e2d5550c041acc4386ae7fc1cb4b7e)** (@latticexyz/gas-report)

Allow the `gas-report` CLI to parse logs via `stdin`, so it can be used with custom test commands (e.g. `mud test`).

Usage:

```sh
# replace `forge test -vvv` with the custom test command
GAS_REPORTER_ENABLED=true forge test -vvv | pnpm gas-report --stdin
```

### Patch changes

**[fix(common): workaround for zero base fee (#1689)](https://github.com/latticexyz/mud/commit/16b13ea8fc5e7f63ce08bc6baa2087cab9c8089f)** (@latticexyz/common)

Adds viem workaround for zero base fee used by MUD's anvil config

**[build: bump viem and abitype (#1684)](https://github.com/latticexyz/mud/commit/f99e889872e6881bf32bcb9a605b8b5c1b05fac4)** (@latticexyz/block-logs-stream, @latticexyz/cli, @latticexyz/common, @latticexyz/dev-tools, @latticexyz/faucet, @latticexyz/protocol-parser, @latticexyz/schema-type, @latticexyz/store-indexer, @latticexyz/store-sync, @latticexyz/store, create-mud)

Bump viem to 1.14.0 and abitype to 0.9.8

**[feat(gas-report): add more logs to stdin piping (#1694)](https://github.com/latticexyz/mud/commit/ba17bdab5c8b2a3aa56e86722134174e2799ddfa)** (@latticexyz/gas-report)

Pass through `stdin` logs in `gas-report`. Since the script piping in logs to `gas-report` can be long-running, it is useful to see its logs to know if it's stalling.

**[fix(protocol-parser): allow arbitrary key order when encoding values (#1674)](https://github.com/latticexyz/mud/commit/a2f41ade977a5374c400ef8bfc2cb8c8698f185e)** (@latticexyz/protocol-parser)

Allow arbitrary key order when encoding values

---

## Version 2.0.0-next.10

### Major changes
Expand Down
2 changes: 2 additions & 0 deletions packages/abi-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @latticexyz/abi-ts

## 2.0.0-next.11

## 2.0.0-next.10

## 2.0.0-next.9
Expand Down
2 changes: 1 addition & 1 deletion packages/abi-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/abi-ts",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Create TypeScript type declaration files (`.d.ts`) for your ABI JSON files.",
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions packages/block-logs-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @latticexyz/block-logs-stream

## 2.0.0-next.11

### Patch Changes

- f99e8898: Bump viem to 1.14.0 and abitype to 0.9.8
- Updated dependencies [16b13ea8]
- Updated dependencies [f99e8898]
- Updated dependencies [d075f82f]
- @latticexyz/common@2.0.0-next.11

## 2.0.0-next.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/block-logs-stream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/block-logs-stream",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Create a stream of EVM block logs for events",
"repository": {
"type": "git",
Expand Down
30 changes: 30 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Change Log

## 2.0.0-next.11

### Major Changes

- 3d0b3edb: Removes `.mudbackup` file handling and `--backup`, `--restore`, and `--force` options from `mud set-version` command.

To revert to a previous MUD version, use `git diff` to find the version that you changed from and want to revert to and run `pnpm mud set-version <prior-version>` again.

### Patch Changes

- f99e8898: Bump viem to 1.14.0 and abitype to 0.9.8
- Updated dependencies [16b13ea8]
- Updated dependencies [f99e8898]
- Updated dependencies [9352648b]
- Updated dependencies [ba17bdab]
- Updated dependencies [d075f82f]
- Updated dependencies [4385c5a4]
- Updated dependencies [a2f41ade]
- @latticexyz/common@2.0.0-next.11
- @latticexyz/protocol-parser@2.0.0-next.11
- @latticexyz/schema-type@2.0.0-next.11
- @latticexyz/store@2.0.0-next.11
- @latticexyz/world-modules@2.0.0-next.11
- @latticexyz/gas-report@2.0.0-next.11
- @latticexyz/config@2.0.0-next.11
- @latticexyz/world@2.0.0-next.11
- @latticexyz/abi-ts@2.0.0-next.11
- @latticexyz/services@2.0.0-next.11
- @latticexyz/utils@2.0.0-next.11

## 2.0.0-next.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/cli",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Command line interface for mud",
"repository": {
"type": "git",
Expand Down
24 changes: 24 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Change Log

## 2.0.0-next.11

### Minor Changes

- d075f82f: - Moves contract write logic out of `createContract` into its own `writeContract` method so that it can be used outside of the contract instance, and for consistency with viem.

- Deprecates `createContract` in favor of `getContract` for consistency with viem.
- Reworks `createNonceManager`'s `BroadcastChannel` setup and moves out the notion of a "nonce manager ID" to `getNonceManagerId` so we can create an internal cache with `getNonceManager` for use in `writeContract`.

If you were using the `createNonceManager` before, you'll just need to rename `publicClient` argument to `client`:

```diff
const publicClient = createPublicClient({ ... });
- const nonceManager = createNonceManager({ publicClient, ... });
+ const nonceManager = createNonceManager({ client: publicClient, ... });
```

### Patch Changes

- 16b13ea8: Adds viem workaround for zero base fee used by MUD's anvil config
- f99e8898: Bump viem to 1.14.0 and abitype to 0.9.8
- Updated dependencies [f99e8898]
- @latticexyz/schema-type@2.0.0-next.11

## 2.0.0-next.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/common",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Common low level logic shared between packages",
"repository": {
"type": "git",
Expand Down
10 changes: 10 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

## 2.0.0-next.11

### Patch Changes

- Updated dependencies [16b13ea8]
- Updated dependencies [f99e8898]
- Updated dependencies [d075f82f]
- @latticexyz/common@2.0.0-next.11
- @latticexyz/schema-type@2.0.0-next.11

## 2.0.0-next.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@latticexyz/config",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Config for Store and World",
"repository": {
"type": "git",
Expand Down
6 changes: 6 additions & 0 deletions packages/create-mud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 2.0.0-next.11

### Patch Changes

- f99e8898: Bump viem to 1.14.0 and abitype to 0.9.8

## 2.0.0-next.10

## 2.0.0-next.9
Expand Down
2 changes: 1 addition & 1 deletion packages/create-mud/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-mud",
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"description": "Create a new MUD project",
"license": "MIT",
"author": "Lattice <[email protected]>",
Expand Down
Loading

0 comments on commit 66b3f8f

Please sign in to comment.