-
-
Notifications
You must be signed in to change notification settings - Fork 398
Fix invalid JSON and YAML outputs for outdated
command
#2111
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 invalid JSON and YAML outputs for outdated
command
#2111
Conversation
fbb9ea7
to
9f728ce
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #2111 +/- ##
==========================================
- Coverage 35.09% 34.96% -0.13%
==========================================
Files 232 232
Lines 20496 20570 +74
==========================================
Hits 7193 7193
- Misses 12455 12529 +74
Partials 848 848
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
0eb6817
to
abc717a
Compare
The code is ready for review now. There are some test failures but I believe they are spurious errors due to upstream timeouts or other glitches. Any feedback is welcome! Thanks |
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've added some changes that I'd like to see implemented.
This is a breaking change, the file docs/UPGRADING.md
must be updated with a note describing the breaking change in the JSON output of the outdated
command that will be effective in the following 0.32.0
release (an example with the old and new will be sufficient).
Thank you for the very good PR @lluiscampos!
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've added some changes that I'd like to see implemented.
I followed up accordingly.
This is a breaking change, the file
docs/UPGRADING.md
must be updated with a note describing the breaking change in the JSON output of theoutdated
command that will be effective in the following0.32.0
release (an example with the old and new will be sufficient).
Right. I originally didn't consider it a breaking change being a bugfix. But you are technically right! I have added it now.
Additionally, I realized that this also fixes the YAML output (which was also two independent objects) so I noted that as well in the UPGRADING.md
and the commit message.
Thank you for the very good PR @lluiscampos!
Thank you for the swift review!
abc717a
to
84c12b8
Compare
outdated
commandoutdated
command
Fixes issue arduino#2104 The code for `internal/cli/core` and `internal/cli/lib` has been refactored so that we can use only the `Get` functions from `internal/cli/outdated` package and compose there composited object. For regular text output, the new table will have some extra fields that either for platforms or for libraries will be blank. For JSON and YAML output, the resulting object will have the top-level keys `platforms` and `libraries` which contain, respectively, the array of outaded platforms and outdated libraries. Signed-off-by: Lluís Martínez <[email protected]>
84c12b8
to
673e3c2
Compare
Fixes issue arduino#2104 The code for `internal/cli/core` and `internal/cli/lib` has been refactored so that we can use only the `Get` functions from `internal/cli/outdated` package and compose there composited object. For regular text output, the new table will have some extra fields that either for platforms or for libraries will be blank. For JSON and YAML output, the resulting object will have the top-level keys `platforms` and `libraries` which contain, respectively, the array of outaded platforms and outdated libraries. Signed-off-by: Lluís Martínez <[email protected]>
Fixes issue #2104
The code for
internal/cli/core
andinternal/cli/lib
has beenrefactored so that we can use only the
Get
functions frominternal/cli/outdated
package and compose there composited object.For regular text output, the new table will have some extra fields that
either for platforms or for libraries will be blank.
For JSON and YAML output, the resulting object will have the top-level
keys
platforms
andlibraries
which contain, respectively, the arrayof outaded platforms and outdated libraries.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Fixes #2104
What is the current behavior?
outdated
commands prints two tables for text mode, and two objects for JSON mode:Text (default):
and JSON:
What is the new behavior?
outdated
commands prints one merged table for text mode, and one object for JSON mode:Text (default):
and JSON:
Does this PR introduce a breaking change, and is titled accordingly?
No
Other information
See comment in #2104 (comment)