Skip to content

Commit

Permalink
chore: update world imports (#2487)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Mar 20, 2024
1 parent 9e34390 commit 843298a
Show file tree
Hide file tree
Showing 28 changed files with 20 additions and 177 deletions.
2 changes: 1 addition & 1 deletion e2e/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";
import { resolveTableId } from "@latticexyz/config/library";

export default defineWorld({
Expand Down
5 changes: 0 additions & 5 deletions examples/minimal/packages/plugin-example/.gitignore

This file was deleted.

41 changes: 0 additions & 41 deletions examples/minimal/packages/plugin-example/package.json

This file was deleted.

11 changes: 0 additions & 11 deletions examples/minimal/packages/plugin-example/ts/library/config.ts

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions examples/minimal/packages/plugin-example/ts/library/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions examples/minimal/packages/plugin-example/ts/library/types.ts

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions examples/minimal/packages/plugin-example/ts/register/index.ts

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions examples/minimal/packages/plugin-example/tsconfig.json

This file was deleted.

11 changes: 0 additions & 11 deletions examples/minimal/packages/plugin-example/tsup.config.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
namespace: "LastCall",
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { existsSync, readFileSync, writeFileSync } from "node:fs";
import path from "node:path";
import { tablegen } from "@latticexyz/store/codegen";
import { worldgen } from "@latticexyz/world/node";
import { World as WorldConfig, worldToV1 } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { worldToV1 } from "@latticexyz/world/config/v2";
import { forge, getForgeConfig, getRemappings } from "@latticexyz/common/foundry";
import { getExistingContracts } from "./utils/getExistingContracts";
import { debug as parentDebug } from "./debug";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CommandModule } from "yargs";
import { loadConfig } from "@latticexyz/config/node";
import { World as WorldConfig } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";

import { getSrcDirectory } from "@latticexyz/common/foundry";
import { build } from "../build";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/dev-contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import chalk from "chalk";
import chokidar from "chokidar";
import { loadConfig, resolveConfigPath } from "@latticexyz/config/node";
import path from "path";
import { World as WorldConfig } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { homedir } from "os";
import { rmSync } from "fs";
import { deployOptions, runDeploy } from "../runDeploy";
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/trace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import { resourceToHex } from "@latticexyz/common";
import { getExistingContracts } from "../utils/getExistingContracts";
import { createClient, http } from "viem";
import { getChainId } from "viem/actions";
import { World as WorldConfig, worldToV1 } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { worldToV1 } from "@latticexyz/world/config/v2";

// TODO account for multiple namespaces (https://github.com/latticexyz/mud/issues/994)
const systemsTableId = resourceToHex({
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/worldgen.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { CommandModule } from "yargs";
import { loadConfig } from "@latticexyz/config/node";
import { World as WorldConfig } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { worldgen } from "@latticexyz/world/node";
import { getSrcDirectory } from "@latticexyz/common/foundry";
import path from "path";
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/runDeploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { deploy } from "./deploy/deploy";
import { createWalletClient, http, Hex, isHex } from "viem";
import { privateKeyToAccount } from "viem/accounts";
import { loadConfig } from "@latticexyz/config/node";
import { World as WorldConfig, worldToV1 } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { worldToV1 } from "@latticexyz/world/config/v2";
import { getOutDirectory, getRpcUrl, getSrcDirectory } from "@latticexyz/common/foundry";
import chalk from "chalk";
import { MUDError } from "@latticexyz/common/errors";
Expand Down
2 changes: 1 addition & 1 deletion packages/world-modules/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
codegen: {
Expand Down
2 changes: 1 addition & 1 deletion packages/world-modules/ts/scripts/worldgen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path, { basename } from "path";
import { rmSync } from "fs";
import { loadConfig } from "@latticexyz/config/node";
import { getSrcDirectory } from "@latticexyz/common/foundry";
import { World as WorldConfig } from "@latticexyz/world/config/v2";
import { World as WorldConfig } from "@latticexyz/world";
import { worldgen } from "@latticexyz/world/node";

// TODO dedupe this and cli's worldgen command
Expand Down
2 changes: 1 addition & 1 deletion templates/phaser/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion templates/react-ecs/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion templates/react/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion templates/threejs/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion templates/vanilla/packages/contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
tables: {
Expand Down
2 changes: 1 addition & 1 deletion test/mock-game-contracts/mud.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineWorld } from "@latticexyz/world/config/v2";
import { defineWorld } from "@latticexyz/world";

export default defineWorld({
enums: {
Expand Down

0 comments on commit 843298a

Please sign in to comment.