Skip to content

Commit

Permalink
feat: add ignorePackages option
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Dec 14, 2023
1 parent 4938c35 commit 2b6a113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/monorepo-release/src/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ export async function analyze(config: Config): Promise<PackageToRelease[]> {
)
}

const result = Array.from(packagesToRelease.values())
const result = Array.from(packagesToRelease.values()).filter(
(p) => !config.ignorePackages.includes(p.name),
)

if (config.peek) {
log.peekInfo(
Expand Down
3 changes: 3 additions & 0 deletions packages/monorepo-release/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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("./")
Expand All @@ -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,
}

0 comments on commit 2b6a113

Please sign in to comment.