-
Notifications
You must be signed in to change notification settings - Fork 4
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
Report major breaking change type in JSON report and support pub refs without version #189
Report major breaking change type in JSON report and support pub refs without version #189
Conversation
…t_major_in_json_for_breaking_changes
test( | ||
'diffing cloud_firestore 4.3.1 to latest works', | ||
() async { | ||
// just some random package for testing the diff command for pub refs without version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that we are repeating ourselves with this comment of 'just some random package ...'. What do you think about adding this comment at the top of the test file instead of repeating it for every test? I know that it will (probably) be harder to understand where the package came from but I don't think that repeating it for all the tests is much better too :/
}); | ||
test('Can handle diff report with only one breaking change', () async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}); | |
test('Can handle diff report with only one breaking change', () async { | |
}); | |
test('Can handle diff report with only one breaking change', () async { |
same for the other ones below if you agree with it
addBreakingChange(diffResult, changeCode: ApiChangeCode.ci01); | ||
await reporter.generateReport(diffResult, anyVersionCheckResult); | ||
final jsonReport = jsonDecode(collectedFileContent.toString()); | ||
expect(jsonReport['report']['breakingChanges'], isNotNull); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(jsonReport['report']['breakingChanges'], isNotNull); | |
expect(jsonReport['report']['breakingChanges'], isNotNull); |
I would create a method to return the breaking changes property and another one to get the 'children' of it. Otherwise, if we need to change the name of any of it, we would need to adapt a lot of tests
Description
This PR fixes the JSON report to specify "major" breaking changes in the type field in the JSON report and it adds support for omitting the version in pub refs. In that case dart_apitool will install the package without version constraints using pub and afterwards just use the latest version available in the cache.
Type of Change
Fixes #188
Fixes #186