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 version check to reported output #164

Merged
merged 7 commits into from
Dec 19, 2023

Conversation

mosuem
Copy link
Contributor

@mosuem mosuem commented Dec 18, 2023

Description

For our health.yaml workflow, it would be ideal if the version checking would also be part of the JSON report.

Type of Change

  • πŸš€ New feature (non-breaking change)
  • πŸ› οΈ Bug fix (non-breaking change)
  • ⚠️ Breaking change (feature or bug fix which breaks existing behaviors/APIs)
  • πŸ—οΈ Code refactor
  • βš™οΈ Build configuration change
  • πŸ“ Documentation
  • 🧹 Chore / Housekeeping

required PackageApiDiffResult diffResult,
required PackageApi oldPackageApi,
required PackageApi newPackageApi,
required bool ignorePrerelease,
required VersionCheckMode versionCheckMode,
}) {
stdout.writeln('');
stdout.writeln('Checking Package version');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know what you want to still stdout here.

oldVersion: oldVersion,
newVersion: newVersion,
neededVersion: null,
explanation:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Happy to change the explanations to anything you like better.

@@ -40,126 +40,126 @@ void main() {

group('Version Check', () {
test('is fine with breaking change and major version change', () {
bool versionChangeCheckResult = VersionCheck.versionChangeMatchesChanges(
final versionChangeCheckResult = VersionCheck.check(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tests could be more fine-grained now probably, also checking for expected version etc.

@devmil
Copy link
Member

devmil commented Dec 18, 2023

Thanks for your changes @mosuem !
Did you try what happens if your generate a JSON or Markdown report in regards to the Colorize usage? I assume that the terminal control sequences would end up there, right?
If that's the case I would suggest to get rid of those in the source and maybe add a couple of them back to the Console Reporter (where it still is possible to grab the affected text pieces)

@devmil
Copy link
Member

devmil commented Dec 19, 2023

I allowed myself to adapt your PR a bit πŸ˜€
Thanks for your contribution! Will release a new version as soon as I merged this PR

@devmil devmil merged commit d28bef7 into bmw-tech:main Dec 19, 2023
11 checks passed
@mosuem
Copy link
Contributor Author

mosuem commented Jan 2, 2024

I allowed myself to adapt your PR a bit πŸ˜€ Thanks for your contribution! Will release a new version as soon as I merged this PR

Thanks a lot! I was OOO :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants