From 2b6a113fce4169aa1b8c67d3016c6dcb30971f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Thu, 14 Dec 2023 01:57:29 +0100 Subject: [PATCH] feat: add `ignorePackages` option --- packages/monorepo-release/src/analyze.ts | 4 +++- packages/monorepo-release/src/config.ts | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-release/src/analyze.ts b/packages/monorepo-release/src/analyze.ts index 827cd86..b470c83 100644 --- a/packages/monorepo-release/src/analyze.ts +++ b/packages/monorepo-release/src/analyze.ts @@ -210,7 +210,9 @@ export async function analyze(config: Config): Promise { ) } - const result = Array.from(packagesToRelease.values()) + const result = Array.from(packagesToRelease.values()).filter( + (p) => !config.ignorePackages.includes(p.name), + ) if (config.peek) { log.peekInfo( diff --git a/packages/monorepo-release/src/config.ts b/packages/monorepo-release/src/config.ts index c2090f3..1ecaf2b 100644 --- a/packages/monorepo-release/src/config.ts +++ b/packages/monorepo-release/src/config.ts @@ -9,6 +9,8 @@ export interface Config { dryRun: boolean verbose: boolean peek: boolean + /** Packages that should be ignored from the release process. */ + ignorePackages: string[] } const json = await pkgJson.read("./") @@ -27,5 +29,6 @@ export const defaultConfig: Config = { process.argv.includes("--dry-run"), verbose: !!process.env.VERBOSE || process.argv.includes("--verbose"), peek, + ignorePackages: [], ...json.release, }