Skip to content

Support organization packages in the outdated diffs link#1205

Merged
ericmj merged 1 commit into
mainfrom
outdated-private-diffs
Jul 19, 2026
Merged

Support organization packages in the outdated diffs link#1205
ericmj merged 1 commit into
mainfrom
outdated-private-diffs

Conversation

@ericmj

@ericmj ericmj commented Jul 19, 2026

Copy link
Copy Markdown
Member

Make mix hex.outdated produce working diff links for organization packages.
Today the repository is dropped when building the hex.pm/diffs link, so private
packages get a public-style name:from:to comparison that resolves against the
wrong package or 404s.

The lock repository is now carried through to build_diff_link/1, which maps:

  • hexpm to name:from:to (unchanged)
  • hexpm:ORG to ORG/name:from:to, matching the repo-scoped diff route
  • any other repository to no link, since hex.pm cannot diff packages it does not
    host (this also drops today's broken links for custom repositories)

Repository-qualified links are never run through the short-URL service. Short
codes are unauthenticated redirects, so shortening one would expose the
organization and package names in the Location header. The long URL is printed
instead.

Builds on #1204 and pairs with hexpm#1728, which adds the
/diff/:repository/:package/:versions route and repository-qualified parsing on
the /diffs index.

Carry the lock repository through to build_diff_link/1 so `mix hex.outdated`
emits repository-qualified comparisons (ORG/name:from:to) for organization
packages and skips packages from custom repositories that hex.pm cannot diff.
Repository-qualified links are never shortened, so organization and package
names are not exposed through an unauthenticated short-URL redirect.
@ericmj
ericmj merged commit f194162 into main Jul 19, 2026
22 checks passed
@ericmj
ericmj deleted the outdated-private-diffs branch July 19, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant