Skip to content

Commit

Permalink
fix: incorrect package.json path
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed May 3, 2024
1 parent 7ff9672 commit 50c7e37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/integration-tests/utils/bump-babel-dependencies.js
@@ -1,5 +1,9 @@
import fs from "fs";
import content from "../../../package.json" with { type: "json" };
import path from "path";

const packageJSONPath = path.resolve(process.cwd(), "./package.json");
const content = (await import(packageJSONPath, { with: { type: "json" } }))
.default;

function bumpBabelDependency(type, version) {
const dependencies = content[type];
Expand Down Expand Up @@ -32,5 +36,4 @@ if (process.argv[2] === "resolutions") {
}
}

const packageJSONPath = new URL("../../../package.json", import.meta.url);
fs.writeFileSync(packageJSONPath, JSON.stringify(content, undefined, 2));

0 comments on commit 50c7e37

Please sign in to comment.