Skip to content

Commit a58cbbc

Browse files
committed
chore: update
1 parent dc4d845 commit a58cbbc

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

utils.ts

+21-22
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,7 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
267267
)
268268
}
269269

270-
const agent = options.agent
271-
const beforeInstallCommand = toCommand(beforeInstall, agent)
272-
const beforeBuildCommand = toCommand(beforeBuild, agent)
273-
const beforeTestCommand = toCommand(beforeTest, agent)
274-
const buildCommand = toCommand(build, agent)
275-
const testCommand = toCommand(test, agent)
276-
277-
const pkgFile = path.join(dir, 'package.json')
278-
const pkg = JSON.parse(await fs.promises.readFile(pkgFile, 'utf-8'))
279-
280-
await beforeInstallCommand?.(pkg.scripts)
281-
282-
if (verify && test) {
283-
const frozenInstall = getCommand(agent, 'frozen')
284-
await $`${frozenInstall}`
285-
await beforeBuildCommand?.(pkg.scripts)
286-
await buildCommand?.(pkg.scripts)
287-
await beforeTestCommand?.(pkg.scripts)
288-
await testCommand?.(pkg.scripts)
289-
}
290270
const overrides = options.overrides || {}
291-
292271
const vuePackages = await getVuePackages()
293272

294273
if (options.release) {
@@ -326,8 +305,28 @@ export async function runInRepo(options: RunOptions & RepoOptions) {
326305
}
327306
}
328307

329-
await applyPackageOverrides(dir, pkg, overrides)
308+
const agent = options.agent
309+
const beforeInstallCommand = toCommand(beforeInstall, agent)
310+
const beforeBuildCommand = toCommand(beforeBuild, agent)
311+
const beforeTestCommand = toCommand(beforeTest, agent)
312+
const buildCommand = toCommand(build, agent)
313+
const testCommand = toCommand(test, agent)
314+
315+
const pkgFile = path.join(dir, 'package.json')
316+
const pkg = JSON.parse(await fs.promises.readFile(pkgFile, 'utf-8'))
317+
318+
await beforeInstallCommand?.(pkg.scripts)
330319

320+
if (verify && test) {
321+
const frozenInstall = getCommand(agent, 'frozen')
322+
await $`${frozenInstall}`
323+
await beforeBuildCommand?.(pkg.scripts)
324+
await buildCommand?.(pkg.scripts)
325+
await beforeTestCommand?.(pkg.scripts)
326+
await testCommand?.(pkg.scripts)
327+
}
328+
329+
await applyPackageOverrides(dir, pkg, overrides)
331330
await beforeBuildCommand?.(pkg.scripts)
332331
await buildCommand?.(pkg.scripts)
333332
if (test) {

0 commit comments

Comments
 (0)