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

Fix since-latest-release + --include-head #5016

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mcmire
Copy link
Contributor

@mcmire mcmire commented Dec 2, 2024

Explanation

The package-level since-latest-release script is useful when authoring release candidate PRs for double-checking that all changes to a package have been properly documented.

Sometimes it is useful to know all of the changes that have occurred for a package, even those that took place on the release branch itself. For this purpose the --include-head argument can be passed to the script, e.g.:

yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- diff

However, this invocation does not work and produces an error instead.

Additionally, if you pass more than one argument after the --, like so:

yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- log -p

then the script freezes and does not continue.

This commit addresses both of these issues.

References

Manual testing

  1. Run yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- diff.
  2. The command should give you a diff and not error.
  3. Run yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- log -p.
  4. The command should give you a list of commits along with diffs and not freeze.

Changelog

(N/A)

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

The package-level `since-latest-release` script is useful when authoring
release candidate PRs for double-checking that all changes to a package
have been properly documented.

Sometimes it is useful to know all of the changes that have occurred for
a package, even those that took place on the release branch itself. For
this purpose the `--include-head` argument can be passed to the script,
e.g.:

```
yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- diff
```

However, this invocation does not work and produces an error instead.

Additionally, if you pass more than one argument after the `--`, like
so:

```
yarn workspace @metamask/assets-controllers run since-latest-release --include-head -- log -p
```

then the script freezes and does not continue.

This commit addresses both of these issues.
@mcmire mcmire marked this pull request as ready for review December 2, 2024 23:56
@mcmire mcmire requested a review from a team December 2, 2024 23:56
@mcmire mcmire self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant