Skip to content

Commit e74329c

Browse files
committed
Link to the hex.pm diffs page in mix hex.outdated
1 parent 22bb0af commit e74329c

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
* Print warnings to standard error instead of standard output, keeping stdout clean for machine-readable output such as `mix hex.outdated --json`. Warning-colored lines that are part of a command's regular output, such as retirement notices in `mix hex.info` and the `mix deps.get` dependency listing, remain on standard output
88
* Add `--format sarif` and `--output PATH` options to `mix hex.audit` to render the audit result as a SARIF v2.1.0 document that can be uploaded to GitHub code scanning and other SARIF consumers. Findings are anchored to the dependency's `mix.lock` entry and ignored findings are included as suppressed results. Requires OTP 27 or later
9+
* Link to the hex.pm diffs page (`https://hex.pm/diffs`) in `mix hex.outdated` now that package diffs have moved from diff.hex.pm into hex.pm
910

1011
## v2.5.1 (2026-07-09)
1112

lib/mix/tasks/hex.outdated.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ defmodule Mix.Tasks.Hex.Outdated do
433433
end
434434

435435
defp diff_link(diff_links) do
436-
long_url = "https://diff.hex.pm/diffs?" <> Enum.join(diff_links, "&")
436+
long_url = "https://hex.pm/diffs?" <> Enum.join(diff_links, "&")
437437

438438
if Hex.State.fetch!(:no_short_urls) do
439439
long_url

test/mix/tasks/hex.outdated_test.exs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,8 +784,20 @@ defmodule Mix.Tasks.Hex.OutdatedTest do
784784
lines = flush()
785785
output = Enum.map_join(lines, "\n", fn {_, _, [line]} -> line end)
786786

787+
assert output =~ "To view the diffs in each available update, visit:"
788+
assert output =~ ~r"http://localhost:\d+/l/\w+"
789+
787790
assert output =~
788791
"To view the diff of a specific update, run `mix hex.package diff APP FROM..TO`."
792+
793+
Hex.State.put(:no_short_urls, true)
794+
795+
assert catch_throw(Mix.Task.rerun("hex.outdated", ["--all"])) == {:exit_code, 1}
796+
797+
lines = flush()
798+
output = Enum.map_join(lines, "\n", fn {_, _, [line]} -> line end)
799+
800+
assert output =~ "https://hex.pm/diffs?diffs[]=foo:0.1.0:0.1.1"
789801
end)
790802
end
791803

0 commit comments

Comments
 (0)