Skip to content

Conversation

@Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented May 23, 2022

Related to MetaMask/snaps#489.

With Yarn 3 it's possible to have a package in a workspace be a workspace as well ("sub-workspace"). Right now we only resolve packages in the root workspace, and packages in sub-workspaces are simply ignored. This PR changes the getMetadataForAllPackages to recursively resolve workspace packages.

This is tested in the snaps-skunkworks repo.

Comment on lines +230 to +238
// If the error is not a file not found error, throw it
if (error.code !== 'ENOENT') {
console.error(`Failed to read changelog in "${projectRootDirectory}".`);
throw error;
}

return console.warn(
`Failed to read changelog in "${projectRootDirectory}".`,
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since not all sub-workflow packages in snaps-skunkworks have a CHANGELOG.md, I changed this to ignore the package if the file doesn't exist.

@Mrtenz Mrtenz marked this pull request as ready for review May 23, 2022 15:50
@Mrtenz Mrtenz requested a review from a team as a code owner May 23, 2022 15:50
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems useful! LGTM.

@Mrtenz Mrtenz merged commit d0ab412 into main May 23, 2022
@Mrtenz Mrtenz deleted the mz/recursive-workspaces branch May 23, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants