From daa4080f402a4a68ce97e21089dde98995c23486 Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Fri, 9 Feb 2024 10:37:21 +0300 Subject: [PATCH] perf: apply npmRestore to updated pkgs only --- src/main/js/processor/release.js | 1 + src/main/js/steps/clean.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/js/processor/release.js b/src/main/js/processor/release.js index cf45efa..05a4d40 100644 --- a/src/main/js/processor/release.js +++ b/src/main/js/processor/release.js @@ -49,6 +49,7 @@ export const run = async ({cwd = process.cwd(), env, flags = {}} = {}) => within if (!pkg.releaseType) { report.setStatus('skipped', name) + pkg.skipped = true return } if (flags.build !== false) { diff --git a/src/main/js/steps/clean.js b/src/main/js/steps/clean.js index bc53f51..1edaaee 100644 --- a/src/main/js/steps/clean.js +++ b/src/main/js/steps/clean.js @@ -3,5 +3,5 @@ import {npmRestore} from '../api/npm.js' export const clean = async (cwd, packages) => { await unsetUserConfig(cwd) - await Promise.all(Object.values(packages).map(npmRestore)) + await Promise.all(Object.values(packages).filter(pkg => !pkg.skipped).map(npmRestore)) }