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 Aug 14, 2023
1 parent 83d9589 commit a3f5693
Show file tree
Hide file tree
Showing 56 changed files with 551 additions and 33 deletions.
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@
"fast-ears-hug",
"fifty-squids-eat",
"fluffy-moles-march",
"four-coats-pull",
"giant-masks-carry",
"great-cooks-dream",
"itchy-kids-relax",
"itchy-shoes-appear",
"large-hats-walk",
"large-sloths-camp",
"many-phones-study",
"mean-pans-study",
"metal-cats-double",
Expand All @@ -54,10 +56,12 @@
"olive-parrots-move",
"perfect-mangos-cry",
"pink-horses-deny",
"pretty-hotels-drop",
"quick-numbers-flash",
"rare-planes-draw",
"selfish-cycles-retire",
"soft-boxes-smile",
"soft-dryers-invite",
"spotty-sheep-warn",
"stale-cooks-reflect",
"strange-candles-shout",
Expand All @@ -68,6 +72,7 @@
"tricky-kangaroos-love",
"tricky-olives-stare",
"tricky-oranges-pump",
"twenty-birds-scream",
"weak-mails-cross",
"witty-jokes-serve"
]
Expand Down
99 changes: 99 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,102 @@
# Version 2.0.0-next.2

## Major changes

**[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(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<ContractWrite>();
creactContract({
...
onWrite: (write) => write$.next(write),
});
```

**[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}</>;
}
```

---

# Version 2.0.0-next.1

## Major changes
Expand Down
9 changes: 9 additions & 0 deletions packages/block-logs-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @latticexyz/block-logs-stream

## 2.0.0-next.2

### Patch Changes

- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)]:
- @latticexyz/common@2.0.0-next.2
- @latticexyz/config@2.0.0-next.2
- @latticexyz/schema-type@2.0.0-next.2

## 2.0.0-next.1

### 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.1",
"version": "2.0.0-next.2",
"description": "Create a stream of EVM block logs for events",
"repository": {
"type": "git",
Expand Down
36 changes: 36 additions & 0 deletions packages/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473)]:
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]
- @latticexyz/[email protected]

## 2.0.0-next.1

### 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.1",
"version": "2.0.0-next.2",
"description": "Command line interface for mud",
"repository": {
"type": "git",
Expand Down
22 changes: 22 additions & 0 deletions packages/common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# 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<ContractWrite>();
creactContract({
...
onWrite: (write) => write$.next(write),
});
```

### Patch Changes

- Updated dependencies []:
- @latticexyz/schema-type@2.0.0-next.2

## 2.0.0-next.1

### Major 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.1",
"version": "2.0.0-next.2",
"description": "Common low level logic shared between packages",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## 2.0.0-next.2

### Patch Changes

- Updated dependencies [[`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad)]:
- @latticexyz/common@2.0.0-next.2
- @latticexyz/schema-type@2.0.0-next.2

## 2.0.0-next.1

### 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.1",
"version": "2.0.0-next.2",
"description": "Config for Store and World",
"repository": {
"type": "git",
Expand Down
51 changes: 51 additions & 0 deletions packages/create-mud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,56 @@
# 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({ ... });
}
```

## 2.0.0-next.1

### Major Changes
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.1",
"version": "2.0.0-next.2",
"description": "Create a new MUD project",
"license": "MIT",
"author": "Lattice <[email protected]>",
Expand Down
44 changes: 44 additions & 0 deletions packages/dev-tools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# @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

- Updated dependencies [[`a2588116`](https://github.com/latticexyz/mud/commit/a25881160cb3283e11d218be7b8a9fe38ee83062), [`939916bc`](https://github.com/latticexyz/mud/commit/939916bcd5c9f3caf0399e9ab7689e77e6bef7ad), [`48c51b52`](https://github.com/latticexyz/mud/commit/48c51b52acab147a2ed97903c43bafa9b6769473), [`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
Expand Down
Loading

0 comments on commit a3f5693

Please sign in to comment.