Skip to content
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

Merged
merged 1 commit into from
Mar 6, 2025
Merged

feat: support monorepos [PLAT-8693] #1299

merged 1 commit into from
Mar 6, 2025

Conversation

prescottprue
Copy link
Collaborator

🎟️ TICKET-000

Upstream PRs

Downstream PRs

Changes

Notes for Reviewers

Recordings/Screenshots

@prescottprue prescottprue requested a review from a team as a code owner March 5, 2025 23:57
@prescottprue prescottprue requested review from hershmire and mathieudi and removed request for a team March 5, 2025 23:57
@prescottprue prescottprue merged commit 5422dd6 into main Mar 6, 2025
2 checks passed
@prescottprue prescottprue deleted the PLAT-8693 branch March 6, 2025 00:00
Copy link

github-actions bot commented Mar 6, 2025

🎉 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:
Copy link
Contributor

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`);
Copy link
Contributor

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(
Copy link
Contributor

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(
Copy link
Contributor

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?

prescottprue added a commit that referenced this pull request Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants