Skip to content

Scope a grouping to specific ecosystems #111

Description

@irskep

toAllGroupingPages renders every grouping for every provider, so a grouping that can only be computed for one ecosystem still gets an index page and a nav link under the others, showing 0 entries.

Concretely: I group dependencies by the team that owns the code using them, joining usedBy to our service catalog. That works for the pnpm provider, where usedBy carries workspace package names. The go provider reports every module as used by a single consumer (the module itself), so nothing is attributable, and each team's page renders empty under the go tab alongside a nav link to it.

A GroupingConfig.ecosystems?: readonly string[] would cover it: when set, toAllGroupingPages skips the grouping for providers whose ecosystem isn't listed, and the nav omits it there too. Unset keeps today's behavior.

The nav part is the fiddlier half, since the grouping list for the nav is built from this.groupings in three methods (buildRows, generateDetailPage, toGroupingPages) that don't currently receive the ecosystem.


🧑‍🦲 I'll send a PR for this soon

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions