Describe the feature
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
Final checks
Describe the feature
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
Final checks