Skip to content

Commit

Permalink
Remove experimental json module. (#283)
Browse files Browse the repository at this point in the history
This was conflicting with node 22.
  • Loading branch information
ankur2136 authored Jun 21, 2024
1 parent beb685b commit 6ea0e71
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/cli/bin/dapp-store.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env node --experimental-json-modules
#!/usr/bin/env node

import "../lib/index.js";
3 changes: 2 additions & 1 deletion packages/cli/src/CliUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
Metaplex,
} from "@metaplex-foundation/js";
import updateNotifier from "update-notifier";
import cliPackage from "./package.json" assert { type: "json" };
import { readFile } from 'fs/promises';
const cliPackage = JSON.parse((await readFile(new URL("./package.json", import.meta.url))).toString());
import boxen from "boxen";
import ver from "semver";
import { CachedStorageDriver } from "./upload/CachedStorageDriver.js";
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/scaffolding/ScaffoldInit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import yaml, { dump } from "js-yaml";

// eslint-disable-next-line require-extensions/require-extensions
import releaseSchema from "../../generated/config_obj.json" assert { type: "json" };
import { readFile } from 'fs/promises';
const releaseSchema = JSON.parse((await readFile(new URL("../../generated/config_obj.json", import.meta.url))).toString());
import fs from "fs";
import { Constants } from "../../CliUtils.js";

Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/config/PublishDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import type {
import { dump, load } from "js-yaml";
import Ajv from "ajv";
// eslint-disable-next-line require-extensions/require-extensions
import schemaJson from "../generated/config_schema.json" assert { type: "json" };
import { readFile } from 'fs/promises';
const schemaJson = JSON.parse((await readFile(new URL("../generated/config_schema.json", import.meta.url))).toString());
import fs from "fs";
import path from "path";
import { toMetaplexFile } from "@metaplex-foundation/js";
Expand Down
10 changes: 4 additions & 6 deletions packages/core/src/validate/CoreValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ import type {
PublisherMetadata,
} from "../types.js";

// eslint-disable-next-line require-extensions/require-extensions
import publisherSchema from "../schemas/publisherJsonMetadata.json" assert { type: "json" };
// eslint-disable-next-line require-extensions/require-extensions
import appSchema from "../schemas/appJsonMetadata.json" assert { type: "json" };
// eslint-disable-next-line require-extensions/require-extensions
import releaseSchema from "../schemas/releaseJsonMetadata.json" assert { type: "json" };
import { readFile } from 'fs/promises';
const publisherSchema = JSON.parse((await readFile(new URL("../schemas/publisherJsonMetadata.json", import.meta.url))).toString());
const appSchema = JSON.parse((await readFile(new URL("../schemas/appJsonMetadata.json", import.meta.url))).toString());
const releaseSchema = JSON.parse((await readFile(new URL("../schemas/releaseJsonMetadata.json", import.meta.url))).toString());
import { isMetaplexFile } from "@metaplex-foundation/js";

export const metaplexFileReplacer = (k: any, v: any) => {
Expand Down

0 comments on commit 6ea0e71

Please sign in to comment.