From c208572d11ecd27fe13eb00bb902cbe583195224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EB=8F=99=EC=9C=A4=20=28Donny=29?= Date: Thu, 12 Oct 2023 13:48:34 +0900 Subject: [PATCH] swc override --- utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/utils.ts b/utils.ts index e2dfaf1..716d3fd 100644 --- a/utils.ts +++ b/utils.ts @@ -256,6 +256,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) { await testCommand?.(pkg.scripts); } const overrides = options.overrides || {}; + overrides["@swc/core"] = path.join(swcPath, "node_modules", "@swc", "core"); await applyPackageOverrides(dir, pkg, overrides); await beforeBuildCommand?.(pkg.scripts); await buildCommand?.(pkg.scripts); @@ -456,4 +457,9 @@ export function dirnameFrom(url: string) { return path.dirname(fileURLToPath(url)); } -export async function overrideSwc() {} +export async function installSwc({ version }: { version: string }) { + cd(swcPath); + const install = getCommand("pnpm", "install", [`@swc/core@${version}`]); + + await $`${install}`; +}