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

Cleanup @changesets/git tests #1029

Merged
merged 5 commits into from Dec 14, 2022
Merged

Cleanup @changesets/git tests #1029

merged 5 commits into from Dec 14, 2022

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Dec 12, 2022

This PR:

  • removes beforeEach hooks in favor of explicit setup per test
  • unifies all methods to work on full commit SHAs by default (this wasn't consistent and it created annoying issues in tests when comparing full and short SHAs of the same commit). You can still request a short SHA explicitly from getCurrentCommitId

TODO:

  • add appropriate changesets for the @changesets/git package since the second change could be seen as a breaking change

@changeset-bot
Copy link

changeset-bot bot commented Dec 12, 2022

🦋 Changeset detected

Latest commit: adf66bd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@changesets/git Major
@changesets/apply-release-plan Patch
@changesets/cli Patch
@changesets/read Patch
@changesets/release-utils Patch
@changesets/get-release-plan Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 12, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit adf66bd:

Sandbox Source
Vanilla Configuration

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Seems fine besides missing missing changesets

Copy link
Contributor

@chaance chaance 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 overall. Just wondering if we need a changeset to top it off.

*/
export async function getCommitsThatAddFiles(
gitPaths: string[],
cwd: string
{ cwd, short = false }: { cwd: string; short?: boolean }
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is exposed API, should we include a changeset to document it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeap, gonna add changesets before merging this - a few minor breaking changes got included here as part of the refactor.

@Andarist Andarist merged commit 598136a into main Dec 14, 2022
0 of 4 checks passed
@Andarist Andarist deleted the cleanup-git-pkg-tests branch December 14, 2022 23:08
@github-actions github-actions bot mentioned this pull request Dec 14, 2022
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.

None yet

3 participants