You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replacement badge visually distinguishes between less/more opinioated recommendations #3062
The module replacements package has three different categorizations for replacements, ranking from less to more opinionated: native, micro utility and preferred. Currently npmx exclusively uses the yellow/amber variant for the badge. From my perspective we could improve the semantics here, and make them map more closely to the semantics of module replacements, by using an informational (blue) variant of the badge for the preferred replacements.
That makes the semantics nicer imo:
amber: “You should really do something different here”
And blue: “Fyi you could also go with something else here”
And it would look something like this (in this particular example there's an added benefit that you can more easily distinguish between a vulnerability warning and a replacement suggestion):
The manifests are exposed from the module replacements package https://npmx.dev/package-code/module-replacements/v/3.0.0/dist%2Fmain.d.ts#L7 so it’s possible to get the data. Maybe it could also be contributed upstream to module-replacements (although there’s the other distinction at play around how involved the replacement is too, but worth exploring).
Additional information
Would you be willing to help implement this feature?
Activity
jhroemer commentedon Jul 20, 2026
I just realized that the compare page uses the info variant for the badge.
jhroemer commentedon Jul 20, 2026
And then this little guy turns up, in full amber costume 😄