Skip to content

Commit

Permalink
chore: rome cli root path
Browse files Browse the repository at this point in the history
  • Loading branch information
denbezrukov committed Aug 14, 2023
1 parent 2ea37c8 commit 550139c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/@biomejs/biome/scripts/generate-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import * as fs from "node:fs";
import { resolve } from "node:path";
import { fileURLToPath } from "node:url";

const ROMECLI_ROOT = resolve(fileURLToPath(import.meta.url), "../../..");
const PACKAGES_ROOT = resolve(ROMECLI_ROOT, "..");
const REPO_ROOT = resolve(PACKAGES_ROOT, "..");
const MANIFEST_PATH = resolve(ROMECLI_ROOT, "package.json");
const CLI_ROOT = resolve(fileURLToPath(import.meta.url), "../..");
const PACKAGES_ROOT = resolve(CLI_ROOT, "..");
const REPO_ROOT = resolve(PACKAGES_ROOT, "../..");
const MANIFEST_PATH = resolve(CLI_ROOT, "package.json");

const rootManifest = JSON.parse(
fs.readFileSync(MANIFEST_PATH).toString("utf-8"),
);

function generateNativePackage(platform, arch) {
const packageName = `@rometools/cli-${platform}-${arch}`;
const packageName = `@biomsjs/cli-${platform}-${arch}`;
const packageRoot = resolve(PACKAGES_ROOT, `cli-${platform}-${arch}`);

// Remove the directory just in case it already exists (it's autogenerated
Expand Down Expand Up @@ -49,7 +49,7 @@ function generateNativePackage(platform, arch) {
}

function updateWasmPackage(target) {
const packageName = `@rometools/wasm-${target}`;
const packageName = `@biomsjs/wasm-${target}`;
const packageRoot = resolve(PACKAGES_ROOT, `wasm-${target}`);

const manifestPath = resolve(packageRoot, "package.json");
Expand All @@ -72,7 +72,7 @@ function writeManifest(packagePath) {

const nativePackages = PLATFORMS.flatMap((platform) =>
ARCHITECTURES.map((arch) => [
`@rometools/cli-${platform}-${arch}`,
`@biomsjs/cli-${platform}-${arch}`,
rootManifest.version,
]),
);
Expand Down

0 comments on commit 550139c

Please sign in to comment.