Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/soft-ravens-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@latticexyz/cli": patch
"@latticexyz/entrykit": patch
"@latticexyz/store-sync": patch
---

Updated JSON imports to use `with` annotation instead of `assert`.
2 changes: 1 addition & 1 deletion docs/pages/_meta.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import worldPackageJson from "../../packages/world/package.json" assert { type: "json" };
import worldPackageJson from "../../packages/world/package.json" with { type: "json" };

export default {
introduction: {
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/set-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path from "path";
import type { CommandModule } from "yargs";
import { MUDError } from "@latticexyz/common/errors";
import { logError } from "../utils/errors";
import localPackageJson from "../../package.json" assert { type: "json" };
import localPackageJson from "../../package.json" with { type: "json" };
import { globSync } from "glob";
import { mudPackages } from "../mudPackages";

Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/deploy/common.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Abi, Account, Address, Chain, Client, Hex, Transport } from "viem";
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" assert { type: "json" };
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" with { type: "json" };
import { helloStoreEvent } from "@latticexyz/store";
import { helloWorldEvent } from "@latticexyz/world";
import { LibraryMap } from "./getLibraryMap";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/deploy/configToModules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { createPrepareDeploy } from "./createPrepareDeploy";
import { World } from "@latticexyz/world";
import { importContractArtifact } from "../utils/importContractArtifact";
import { resolveWithContext } from "@latticexyz/world/internal";
import callWithSignatureModule from "@latticexyz/world-module-callwithsignature/out/CallWithSignatureModule.sol/CallWithSignatureModule.json" assert { type: "json" };
import callWithSignatureModule from "@latticexyz/world-module-callwithsignature/out/CallWithSignatureModule.sol/CallWithSignatureModule.json" with { type: "json" };
import { getContractArtifact } from "../utils/getContractArtifact";
import { excludeCallWithSignatureModule } from "./compat/excludeUnstableCallWithSignatureModule";
import { moduleArtifactPathFromName } from "./compat/moduleArtifactPathFromName";
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/deploy/deployWorld.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Account, Chain, Client, Hex, Transport } from "viem";
import { waitForTransactionReceipt } from "viem/actions";
import { ensureWorldFactory } from "./ensureWorldFactory";
import WorldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" assert { type: "json" };
import WorldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" with { type: "json" };
import { writeContract } from "@latticexyz/common";
import { debug } from "./debug";
import { logsToWorldDeploy } from "./logsToWorldDeploy";
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/deploy/ensureResourceTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { debug } from "./debug";
import { hexToResource, writeContract } from "@latticexyz/common";
import { identity, isDefined } from "@latticexyz/common/utils";
import metadataConfig from "@latticexyz/world-module-metadata/mud.config";
import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" assert { type: "json" };
import metadataAbi from "@latticexyz/world-module-metadata/out/IMetadataSystem.sol/IMetadataSystem.abi.json" with { type: "json" };
import { ensureModules } from "./ensureModules";
import metadataModule from "@latticexyz/world-module-metadata/out/MetadataModule.sol/MetadataModule.json" assert { type: "json" };
import metadataModule from "@latticexyz/world-module-metadata/out/MetadataModule.sol/MetadataModule.json" with { type: "json" };
import { getContractArtifact } from "../utils/getContractArtifact";
import { createPrepareDeploy } from "./createPrepareDeploy";
import { LibraryMap } from "./getLibraryMap";
Expand Down
12 changes: 6 additions & 6 deletions packages/cli/src/deploy/getWorldContracts.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import accessManagementSystemBuild from "@latticexyz/world/out/AccessManagementSystem.sol/AccessManagementSystem.json" assert { type: "json" };
import balanceTransferSystemBuild from "@latticexyz/world/out/BalanceTransferSystem.sol/BalanceTransferSystem.json" assert { type: "json" };
import batchCallSystemBuild from "@latticexyz/world/out/BatchCallSystem.sol/BatchCallSystem.json" assert { type: "json" };
import registrationSystemBuild from "@latticexyz/world/out/RegistrationSystem.sol/RegistrationSystem.json" assert { type: "json" };
import initModuleBuild from "@latticexyz/world/out/InitModule.sol/InitModule.json" assert { type: "json" };
import initModuleAbi from "@latticexyz/world/out/InitModule.sol/InitModule.abi.json" assert { type: "json" };
import accessManagementSystemBuild from "@latticexyz/world/out/AccessManagementSystem.sol/AccessManagementSystem.json" with { type: "json" };
import balanceTransferSystemBuild from "@latticexyz/world/out/BalanceTransferSystem.sol/BalanceTransferSystem.json" with { type: "json" };
import batchCallSystemBuild from "@latticexyz/world/out/BatchCallSystem.sol/BatchCallSystem.json" with { type: "json" };
import registrationSystemBuild from "@latticexyz/world/out/RegistrationSystem.sol/RegistrationSystem.json" with { type: "json" };
import initModuleBuild from "@latticexyz/world/out/InitModule.sol/InitModule.json" with { type: "json" };
import initModuleAbi from "@latticexyz/world/out/InitModule.sol/InitModule.abi.json" with { type: "json" };
import { Hex, encodeDeployData, size } from "viem";
import { getContractAddress } from "@latticexyz/common/internal";

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/deploy/getWorldFactoryContracts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import worldFactoryBuild from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.json" assert { type: "json" };
import worldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" assert { type: "json" };
import worldFactoryBuild from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.json" with { type: "json" };
import worldFactoryAbi from "@latticexyz/world/out/WorldFactory.sol/WorldFactory.abi.json" with { type: "json" };
import { Hex, encodeDeployData, size } from "viem";
import { getWorldContracts } from "./getWorldContracts";
import { getContractAddress } from "@latticexyz/common/internal";
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/deploy/getWorldProxyFactoryContracts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import worldProxyFactoryBuild from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.json" assert { type: "json" };
import worldProxyFactoryAbi from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.abi.json" assert { type: "json" };
import worldProxyFactoryBuild from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.json" with { type: "json" };
import worldProxyFactoryAbi from "@latticexyz/world/out/WorldProxyFactory.sol/WorldProxyFactory.abi.json" with { type: "json" };
import { Hex, encodeDeployData, size } from "viem";
import { getWorldContracts } from "./getWorldContracts";
import { getContractAddress } from "@latticexyz/common/internal";
Expand Down
6 changes: 3 additions & 3 deletions packages/entrykit/src/bin/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import {
getContractAddress,
waitForTransactions,
} from "@latticexyz/common/internal";
import entryPointArtifact from "@account-abstraction/contracts/artifacts/EntryPoint.json" assert { type: "json" };
import simpleAccountFactoryArtifact from "@account-abstraction/contracts/artifacts/SimpleAccountFactory.json" assert { type: "json" };
import localPaymasterArtifact from "@latticexyz/paymaster/out/GenerousPaymaster.sol/GenerousPaymaster.json" assert { type: "json" };
import entryPointArtifact from "@account-abstraction/contracts/artifacts/EntryPoint.json" with { type: "json" };
import simpleAccountFactoryArtifact from "@account-abstraction/contracts/artifacts/SimpleAccountFactory.json" with { type: "json" };
import localPaymasterArtifact from "@latticexyz/paymaster/out/GenerousPaymaster.sol/GenerousPaymaster.json" with { type: "json" };
import { getChainId } from "viem/actions";
import { writeContract } from "@latticexyz/common";
import { entryPoint07Address } from "viem/account-abstraction";
Expand Down
2 changes: 1 addition & 1 deletion packages/store-sync/src/world/getWorldAbi.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createTestClient, http, parseAbi } from "viem";
import { foundry } from "viem/chains";
import { describe, expect, it, vi } from "vitest";
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" assert { type: "json" };
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" with { type: "json" };
import { mockError, mockMetadata, mockWorldFn, mockWorldFn2 } from "./test/mocks";

vi.doMock("./getFunctions", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/store-sync/src/world/getWorldAbi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
parseAbi,
stringToHex,
} from "viem";
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" assert { type: "json" };
import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json" with { type: "json" };
import metadataConfig from "@latticexyz/world-module-metadata/mud.config";
import { functionSignatureToAbiItem } from "./functionSignatureToAbiItem";
import { isDefined } from "@latticexyz/common/utils";
Expand Down
2 changes: 1 addition & 1 deletion templates/phaser/packages/art/scripts/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import chalk from "chalk";
const { yellowBright, redBright, white, magentaBright, greenBright } = chalk;
import texturePacker from "free-tex-packer-core";

import appInfo from "../package.json" assert { type: "json" };
import appInfo from "../package.json" with { type: "json" };

function isExists(path) {
return existsSync(path);
Expand Down
Loading