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

Add support for nested workspaces #84

Merged
merged 7 commits into from
Jul 18, 2023
Merged

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Jul 14, 2023

This adds support for nested workspaces (workspaces in workspaces), by updating the logic to fetch workspaces. Rather than looking at the root package.json, it now runs yarn workspaces list --no-private to get a list of all workspaces.

@Mrtenz Mrtenz requested a review from a team as a code owner July 14, 2023 17:39
@@ -155,7 +155,7 @@ export async function getStdoutFromCommand(
}

/**
* Runs a Git command, splitting up the immediate output into lines.
* Run a command, splitting up the immediate output into lines.
Copy link
Member Author

Choose a reason for hiding this comment

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

This function can run any command, not just Git commands.

src/project.ts Outdated Show resolved Hide resolved
@Mrtenz Mrtenz force-pushed the mrtenz/support-nested-workspaces branch from dd209cc to 66ca2c0 Compare July 14, 2023 17:44
@socket-security
Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@metamask/action-utils 0.0.2...1.0.0 None +0/-0 49.7 kB gudahtt

@socket-security
Copy link

socket-security bot commented Jul 18, 2023

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

Ignoring: @metamask/[email protected]

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

@Mrtenz
Copy link
Member Author

Mrtenz commented Jul 18, 2023

@SocketSecurity ignore @metamask/[email protected]

This is our own.

@Mrtenz Mrtenz requested a review from mcmire July 18, 2023 15:07
@@ -1,6 +1,8 @@
import { withMonorepoProjectEnvironment } from '../tests/functional/helpers/with';
import { buildChangelog } from '../tests/functional/helpers/utils';

jest.setTimeout(60_000);
Copy link
Contributor

Choose a reason for hiding this comment

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

60 seconds seems a bit high. Were there any tests in particular you found to take a long time, or just any of them?

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests were a bit flaky, but you're right that 60 seconds is not necessary. I'll change it to 10 seconds.

src/project.ts Outdated Show resolved Hide resolved
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.

Looks good!

@@ -1,6 +1,8 @@
import { withMonorepoProjectEnvironment } from '../tests/functional/helpers/with';
import { buildChangelog } from '../tests/functional/helpers/utils';

jest.setTimeout(10_000);

describe('create-release-branch (functional)', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if we could write a functional test involving nested workspaces, but we can do that later.

@Mrtenz Mrtenz merged commit 436cebe into main Jul 18, 2023
@Mrtenz Mrtenz deleted the mrtenz/support-nested-workspaces branch July 18, 2023 22:13
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.

2 participants