Skip to content

Commit 8fad4be

Browse files
roninjin10frolic
andauthored
fix: assert -> with (#3739)
Co-authored-by: Kevin Ingersoll <kingersoll@gmail.com>
1 parent fc522a8 commit 8fad4be

14 files changed

Lines changed: 30 additions & 23 deletions

File tree

.changeset/soft-ravens-serve.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@latticexyz/cli": patch
3+
"@latticexyz/entrykit": patch
4+
"@latticexyz/store-sync": patch
5+
---
6+
7+
Updated JSON imports to use `with` annotation instead of `assert`.

docs/pages/_meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import worldPackageJson from "../../packages/world/package.json" assert { type: "json" };
1+
import worldPackageJson from "../../packages/world/package.json" with { type: "json" };
22

33
export default {
44
introduction: {

packages/cli/src/commands/set-version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import path from "path";
44
import type { CommandModule } from "yargs";
55
import { MUDError } from "@latticexyz/common/errors";
66
import { logError } from "../utils/errors";
7-
import localPackageJson from "../../package.json" assert { type: "json" };
7+
import localPackageJson from "../../package.json" with { type: "json" };
88
import { globSync } from "glob";
99
import { mudPackages } from "../mudPackages";
1010

packages/cli/src/deploy/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Abi, Account, Address, Chain, Client, Hex, Transport } from "viem";
2-
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" assert { type: "json" };
2+
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" with { type: "json" };
33
import { helloStoreEvent } from "@latticexyz/store";
44
import { helloWorldEvent } from "@latticexyz/world";
55
import { LibraryMap } from "./getLibraryMap";

packages/cli/src/deploy/configToModules.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { createPrepareDeploy } from "./createPrepareDeploy";
77
import { World } from "@latticexyz/world";
88
import { importContractArtifact } from "../utils/importContractArtifact";
99
import { resolveWithContext } from "@latticexyz/world/internal";
10-
import callWithSignatureModule from "@latticexyz/world-module-callwithsignature/out/CallWithSignatureModule.sol/CallWithSignatureModule.json" assert { type: "json" };
10+
import callWithSignatureModule from "@latticexyz/world-module-callwithsignature/out/CallWithSignatureModule.sol/CallWithSignatureModule.json" with { type: "json" };
1111
import { getContractArtifact } from "../utils/getContractArtifact";
1212
import { excludeCallWithSignatureModule } from "./compat/excludeUnstableCallWithSignatureModule";
1313
import { moduleArtifactPathFromName } from "./compat/moduleArtifactPathFromName";

packages/cli/src/deploy/deployWorld.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Account, Chain, Client, Hex, Transport } from "viem";
22
import { waitForTransactionReceipt } from "viem/actions";
33
import { ensureWorldFactory } from "./ensureWorldFactory";
4-
import WorldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" assert { type: "json" };
4+
import WorldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" with { type: "json" };
55
import { writeContract } from "@latticexyz/common";
66
import { debug } from "./debug";
77
import { logsToWorldDeploy } from "./logsToWorldDeploy";

packages/cli/src/deploy/ensureResourceTags.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { debug } from "./debug";
33
import { hexToResource, writeContract } from "@latticexyz/common";
44
import { identity, isDefined } from "@latticexyz/common/utils";
55
import metadataConfig from "@latticexyz/world-module-metadata/mud.config";
6-
import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" assert { type: "json" };
6+
import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" with { type: "json" };
77
import { ensureModules } from "./ensureModules";
8-
import metadataModule from "@latticexyz/world-module-metadata/out/MetadataModule.sol/MetadataModule.json" assert { type: "json" };
8+
import metadataModule from "@latticexyz/world-module-metadata/out/MetadataModule.sol/MetadataModule.json" with { type: "json" };
99
import { getContractArtifact } from "../utils/getContractArtifact";
1010
import { createPrepareDeploy } from "./createPrepareDeploy";
1111
import { LibraryMap } from "./getLibraryMap";

packages/cli/src/deploy/getWorldContracts.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import accessManagementSystemBuild from "@latticexyz/world/out/AccessManagementSystem.sol/AccessManagementSystem.json" assert { type: "json" };
2-
import balanceTransferSystemBuild from "@latticexyz/world/out/BalanceTransferSystem.sol/BalanceTransferSystem.json" assert { type: "json" };
3-
import batchCallSystemBuild from "@latticexyz/world/out/BatchCallSystem.sol/BatchCallSystem.json" assert { type: "json" };
4-
import registrationSystemBuild from "@latticexyz/world/out/RegistrationSystem.sol/RegistrationSystem.json" assert { type: "json" };
5-
import initModuleBuild from "@latticexyz/world/out/InitModule.sol/InitModule.json" assert { type: "json" };
6-
import initModuleAbi from "@latticexyz/world/out/InitModule.sol/InitModule.abi.json" assert { type: "json" };
1+
import accessManagementSystemBuild from "@latticexyz/world/out/AccessManagementSystem.sol/AccessManagementSystem.json" with { type: "json" };
2+
import balanceTransferSystemBuild from "@latticexyz/world/out/BalanceTransferSystem.sol/BalanceTransferSystem.json" with { type: "json" };
3+
import batchCallSystemBuild from "@latticexyz/world/out/BatchCallSystem.sol/BatchCallSystem.json" with { type: "json" };
4+
import registrationSystemBuild from "@latticexyz/world/out/RegistrationSystem.sol/RegistrationSystem.json" with { type: "json" };
5+
import initModuleBuild from "@latticexyz/world/out/InitModule.sol/InitModule.json" with { type: "json" };
6+
import initModuleAbi from "@latticexyz/world/out/InitModule.sol/InitModule.abi.json" with { type: "json" };
77
import { Hex, encodeDeployData, size } from "viem";
88
import { getContractAddress } from "@latticexyz/common/internal";
99

packages/cli/src/deploy/getWorldFactoryContracts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import worldFactoryBuild from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.json" assert { type: "json" };
2-
import worldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" assert { type: "json" };
1+
import worldFactoryBuild from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.json" with { type: "json" };
2+
import worldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" with { type: "json" };
33
import { Hex, encodeDeployData, size } from "viem";
44
import { getWorldContracts } from "./getWorldContracts";
55
import { getContractAddress } from "@latticexyz/common/internal";

packages/cli/src/deploy/getWorldProxyFactoryContracts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import worldProxyFactoryBuild from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.json" assert { type: "json" };
2-
import worldProxyFactoryAbi from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.abi.json" assert { type: "json" };
1+
import worldProxyFactoryBuild from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.json" with { type: "json" };
2+
import worldProxyFactoryAbi from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.abi.json" with { type: "json" };
33
import { Hex, encodeDeployData, size } from "viem";
44
import { getWorldContracts } from "./getWorldContracts";
55
import { getContractAddress } from "@latticexyz/common/internal";

0 commit comments

Comments
 (0)