-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support monorepos [PLAT-8693] #1299
Conversation
🎉 This PR is included in version 3.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
@@ -8,6 +8,9 @@ inputs: | |||
output-file: | |||
required: false | |||
description: 'Path for output json file' | |||
is-monorepo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious if this is necessary. What about looking at the package.json file to see if there's a workspace
field.
|
||
// If package is a monorepo report on each subpackage | ||
if (isMonorepoInput === 'true') { | ||
const packageFolders = fs.readdirSync(`${process.cwd()}/packages`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should reference the workspace
value coming from package.json instead of assuming that all our monorepos are under packages/
.
percentsByName[packageFolder] = pkgDepStats.percents; | ||
const outputFileConfig = core.getInput('output-file'); | ||
if (outputFileConfig) { | ||
fs.writeFileSync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use the promise version vs the synchronous one?
> = {}; | ||
const countsByName: Record<string, GlobalStatsOutput['counts']> = {}; | ||
const percentsByName: Record<string, GlobalStatsOutput['percents']> = {}; | ||
await Promise.allSettled( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you care to log any potential errors?
🎟️ TICKET-000
Upstream PRs
Downstream PRs
Changes
Notes for Reviewers
Recordings/Screenshots