Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (next) #1285

Merged
merged 1 commit into from
Aug 15, 2023
Merged

Version Packages (next) #1285

merged 1 commit into from
Aug 15, 2023

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 11, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@latticexyz/[email protected]

Major Changes

  • #1308 b8a6158d Thanks @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

@latticexyz/[email protected]

Major Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",

Patch Changes

[email protected]

Major Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",
  • #1284 939916bc Thanks @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.

    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:

    // https://vitejs.dev/guide/env-and-mode.html
    if (import.meta.env.DEV) {
      mountDevTools({ ... });
    }

Patch Changes

@latticexyz/[email protected]

Major Changes

  • #1284 939916bc Thanks @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.

    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:

    // https://vitejs.dev/guide/env-and-mode.html
    if (import.meta.env.DEV) {
      mountDevTools({ ... });
    }

Patch Changes

@latticexyz/[email protected]

Major Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",

Patch Changes

@latticexyz/[email protected]

Major Changes

Patch Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",
  • Updated dependencies [939916bc, b8a6158d, b8a6158d]:

@latticexyz/[email protected]

Major Changes

  • #1232 b621fb97 Thanks @holic! - Adds a Fastify server in front of tRPC and puts tRPC endpoints under /trpc to make way for other top-level endpoints (e.g. 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:

     createIndexerClient({
    -  url: "https://indexer.dev.linfra.xyz",
    +  url: "https://indexer.dev.linfra.xyz/trpc",
     });
     syncToRecs({
       ...
    -  indexerUrl: "https://indexer.dev.linfra.xyz",
    +  indexerUrl: "https://indexer.dev.linfra.xyz/trpc",
     });

Minor Changes

  • #1240 753bdce4 Thanks @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

@latticexyz/[email protected]

Major Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",

Minor Changes

  • #1240 753bdce4 Thanks @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

@latticexyz/[email protected]

Minor Changes

  • #1284 939916bc Thanks @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.

    import { createContract, ContractWrite } from "@latticexyz/common";
    import { Subject } from "rxjs";
    
    const write$ = new Subject<ContractWrite>();
    creactContract({
      ...
      onWrite: (write) => write$.next(write),
    });
  • #1308 b8a6158d Thanks @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

@latticexyz/[email protected]

Minor Changes

  • #1284 939916bc Thanks @holic! - Adds a usePromise hook that returns a native PromiseSettledResult object.

    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

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

@latticexyz/[email protected]

Patch Changes

  • #1278 48c51b52 Thanks @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

      - "build:mud": "mud tablegen && mud worldgen && mud tsgen --configPath mud.config.ts --out ../client/src/mud",
      + "build:mud": "mud tablegen && mud worldgen",
      - "dev": "pnpm mud dev-contracts --tsgenOutput ../client/src/mud",
      + "dev": "pnpm mud dev-contracts",
  • Updated dependencies [a2588116, 939916bc, b8a6158d, 48c51b52, b8a6158d]:

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

[email protected]

[email protected]

@latticexyz/[email protected]

@latticexyz/[email protected]

@github-actions github-actions bot requested a review from holic as a code owner August 11, 2023 14:22
@github-actions github-actions bot requested a review from a user August 11, 2023 14:22
@github-actions github-actions bot requested a review from alvrs as a code owner August 11, 2023 14:22
@github-actions github-actions bot force-pushed the changeset-release/main branch from 6e38b97 to 7de2ce5 Compare August 11, 2023 19:31
@github-actions github-actions bot force-pushed the changeset-release/main branch 2 times, most recently from 637f510 to 6ff238f Compare August 13, 2023 09:06
@github-actions github-actions bot force-pushed the changeset-release/main branch from 6ff238f to 352ab63 Compare August 14, 2023 13:35
@github-actions github-actions bot force-pushed the changeset-release/main branch from 352ab63 to a3f5693 Compare August 14, 2023 16:55
@github-actions github-actions bot force-pushed the changeset-release/main branch from a3f5693 to fddf7e7 Compare August 15, 2023 11:39
@github-actions github-actions bot force-pushed the changeset-release/main branch from fddf7e7 to 314ead0 Compare August 15, 2023 11:41
@github-actions github-actions bot force-pushed the changeset-release/main branch from 314ead0 to cf1e00e Compare August 15, 2023 15:19
@github-actions github-actions bot force-pushed the changeset-release/main branch from cf1e00e to 13c4859 Compare August 15, 2023 16:41
@holic holic merged commit 5e744f2 into main Aug 15, 2023
@holic holic deleted the changeset-release/main branch August 15, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant