Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Use separate package.json for @swc/core
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Oct 12, 2023
1 parent b6f116d commit 2680894
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
await testCommand?.(pkg.scripts);
}
const overrides = options.overrides || {};
overrides["@swc/core"] = path.join(root, "node_modules", "@swc", "core");
overrides["@swc/core"] = path.join(swcPath, "node_modules", "@swc", "core");
console.log("OVERRIDES", overrides);
await applyPackageOverrides(dir, pkg, overrides);
await beforeBuildCommand?.(pkg.scripts);
Expand Down Expand Up @@ -460,6 +460,8 @@ export function dirnameFrom(url: string) {
}

export async function installSwc({ version }: { version: string }) {
cd(root);
await fs.promises.mkdir(swcPath, { recursive: true });
await fs.promises.writeFile(path.join(swcPath, "package.json"), "{}", "utf8");
cd(swcPath);
await $`npm install @swc/core@${version} --no-save --legacy-peer-deps`;
}

0 comments on commit 2680894

Please sign in to comment.