Skip to content

Commit

Permalink
feat: ignore private or ignored packages
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed May 11, 2023
1 parent 567c77a commit cdf77c5
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/get-changed-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,14 @@ export const getChangedPackages = async ({
throw new Error('an error occurred when fetching files')
}

const config = await configPromise.then(rawConfig =>
parseConfig(rawConfig, packages),
)

const releasePlan = assembleReleasePlan(
await Promise.all(changesetPromises),
packages,
await configPromise.then(rawConfig => parseConfig(rawConfig, packages)),
config,
await preStatePromise,
)

Expand All @@ -194,7 +198,13 @@ export const getChangedPackages = async ({
: packages.packages.filter(pkg =>
changedFiles.some(changedFile => changedFile.includes(pkg.dir)),
)
).map(x => x.packageJson.name),
)
.filter(
pkg =>
pkg.packageJson.private !== true &&
!config.ignore.includes(pkg.packageJson.name),
)
.map(x => x.packageJson.name),
releasePlan,
}
}

0 comments on commit cdf77c5

Please sign in to comment.