Closed p-himik closed 6 months ago
@p-himik Thanks for your suggestion.
Originally, it was planned to display it on the same row. But when actually displayed, the table became hard to read due to the length of the URLs, so I've changed it to the current form.
Therefore, it is easy to display it on the same row depending on the option.
I made a feature/changes-in-table branch and added --changes-in-table
option for trial.
Could you try this branch?
Seems perfect, thanks!
An alternative that I should've mentioned earlier would to be use a custom format and display the output not as a table but rather a series of user-formatted messages. However, the problem there is that --error-format
seems to escape newlines:
$ clj -M:outdated --error-format="File: {{file}}\nName: {{latest-name}}\nVersion: {{version}} -> {{latest-version}}\nChanges: {{changes-url}}"
File: deps.edn\nName: \nVersion: 7e9af7776efbbc891ac5c82b40d44fff084b0191 -> 1cbbd2a04c1c3496fe01e7a35fb3a180b399aaf9\rChanges: https://github.com/liquidz/antq/compare/7e9af7776efbbc891ac5c82b40d44fff084b0191...1cbbd2a04c1c3496fe01e7a35fb3a180b399aaf9
File: deps.edn\nName: \nVersion: 1.8.1 -> 1.9.1\rChanges: https://github.com/day8/re-frame-10x/blob/1.9.1/CHANGELOG.md
File: deps.edn\nName: \nVersion: 2.0.4 -> 2.0.5\rChanges: https://github.com/zonkyio/embedded-postgres/compare/v2.0.4...v2.0.5
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 1.4.11 -> 1.4.14\rChanges:
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 6.34.0 -> 7.0.0\rChanges: https://github.com/getsentry/sentry-java/blob/7.0.0/CHANGELOG.md
File: lib/edge.app.logging/deps.edn\nName: \nVersion: 6.34.0 -> 7.0.0\rChanges: https://github.com/getsentry/sentry-java/blob/7.0.0/CHANGELOG.md
If newlines were respected, I would be able to put every artifact into its own block and every detail within that block into its own line.
@p-himik Ah, as a tool, newlines are handled correctly, so it seems that the string received by tools.cli has already been escaped.
clojure -Tantq outdated :error-format '"File: {{file}}\nLatest: {{latest-version}}"'
I've fixed in the same branch. Could you try?
Sweet, that works! Thanks!
If anyone else is reading this, this is the format that I found to be quite readable while also condense enough:
"File: {{file}}\nName: {{name}} -> {{latest-name}}\nVersion: {{version}} -> {{latest-version}}\nChanges: {{changes-url}}\n"
A sample of the results:
File: deps.edn
Name: day8.re-frame/re-frame-10x ->
Version: 1.8.1 -> 1.9.1
Changes: https://github.com/day8/re-frame-10x/blob/1.9.1/CHANGELOG.md
File: deps.edn
Name: io.zonky.test/embedded-postgres ->
Version: 2.0.4 -> 2.0.5
Changes: https://github.com/zonkyio/embedded-postgres/compare/v2.0.4...v2.0.5
File: lib/edge.app.logging/deps.edn
Name: ch.qos.logback/logback-classic ->
Version: 1.4.11 -> 1.4.14
Changes:
Not sure whether there's a better way to handle latest-name
to avoid those extra ->
, but they don't really bother me.
(No clue why logback-classic
doesn't have the changes URL - surely a different issue, and I don't know enough about how Antq works in the first place).
@p-himik Thanks for your confirmation! I'll prepare for release.
logback-classic
's pom.xml does not have SCM
section.
antq refers the SCM section to detect the source repository URL, so antq cannot show the changes URL for logback-classic
for now.
@p-himik Sorry, I've been unwell.
Not sure whether there's a better way to handle latest-name to avoid those extra ->, but they don't really bother me.
Now dev
branch uses Mustache as a template engine for trial, and we can specify error-format as follows.
"File: {{file}}\nName: {{name}}{{#latest-name}} -> {{.}}{{/latest-name}}\nVersion: {{version}}{{#latest-version}} -> {{.}}{{/latest-version}}\nChanges: {{changes-url}}\n"
Oh, cool, thanks!
Hope you feel better.
@p-himik Just released v2.8.1165 :)
With the table reporter and changes enabled, the changes URLs are listed below the table. It makes it inconvenient to go back and forth between the table and the changes, always searching for the right line.
Perhaps a new reporter or a flag could be added to make the changes URLs appear beside the corresponding entries in the report table, right on the same row.