From a947a7546a6580485a56359a89015aad6a913317 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Mon, 6 Apr 2026 18:06:16 -0400 Subject: [PATCH] Sort the ecosystems list for presentation in the UI In the page footer and the 'select' list on the packages page, the list of ecosystems should be sorted in a predictable order. --- internal/server/dashboard.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/internal/server/dashboard.go b/internal/server/dashboard.go index 7c15048..b935628 100644 --- a/internal/server/dashboard.go +++ b/internal/server/dashboard.go @@ -114,22 +114,25 @@ type PackagesListPageData struct { } func supportedEcosystems() []string { + // this list should be kept sorted in lexicographic order so + // that the 'select' list in the UI will be in the expected + // order return []string{ - "npm", "cargo", + "composer", + "conan", + "conda", + "cran", + "deb", "gem", "golang", "hex", - "pub", - "pypi", "maven", + "npm", "nuget", - "composer", - "conan", - "conda", - "cran", "oci", - "deb", + "pub", + "pypi", "rpm", } }