Skip to content

Commit

Permalink
call pacote when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad committed Dec 15, 2024
1 parent f98c277 commit 703fd38
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,19 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
} else {
overrides.vite = options.release
}
const viteManifest = await pacote.manifest(options.release)

// skip if `overrides.rollup` is `false`
if (viteManifest.dependencies?.rollup && overrides.rollup !== false) {
overrides.rollup = viteManifest.dependencies.rollup
if (overrides.rollup !== false) {
const viteManifest = await pacote.manifest(options.release)

overrides.rollup = viteManifest.dependencies!.rollup
}

// skip if `overrides.esbuild` is `false`
if (viteManifest.dependencies?.esbuild && overrides.esbuild !== false) {
overrides.esbuild = viteManifest.dependencies.esbuild
if (overrides.esbuild !== false) {
const viteManifest = await pacote.manifest(options.release)

overrides.esbuild = viteManifest.dependencies!.esbuild
}
} else {
overrides.vite ||= `${options.vitePath}/packages/vite`
Expand Down

0 comments on commit 703fd38

Please sign in to comment.