Skip to content

Commit

Permalink
replace parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
holic committed Aug 22, 2024
1 parent 1196a39 commit 5da0132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/world/ts/node/findContractArtifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Input = {

export type Output = readonly ContractArtifact[];

const parseArtifact = type("parse.json").to(types.Artifact);
const parseArtifact = type("string").pipe.try((s) => JSON.parse(s), types.Artifact);
type Artifact = typeof types.Artifact.infer;

function hasMetadata(
Expand Down
2 changes: 1 addition & 1 deletion packages/world/ts/node/loadSystemsManifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { systemsManifestFilename } from "./common";
import { SystemsManifest } from "./buildSystemsManifest";
import { indent } from "@latticexyz/common/utils";

const parseManifest = type("parse.json").to(SystemsManifest);
const parseManifest = type("string").pipe.try((s) => JSON.parse(s), SystemsManifest);

export async function loadSystemsManifest(opts: {
rootDir: string;
Expand Down

0 comments on commit 5da0132

Please sign in to comment.