Skip to content

Docs site: single-version components show under every "Component version" selector option, including releases they never shipped in #2659

Description

@adamlobler

What: The docs site's version filter (packages/__docs__/lib/utils/buildVersionMap.mjs, isDocIncludedInVersion) only excludes a component from a library version when its package.json exports multiple versions (e.g. ./v11_6). For single-version packages (no multi-version exports), the fallback rule includes the component under every library version as long as it lives in a v1 folder.

Impact: A brand-new component (e.g. Card, added in v11.7, package.json only exports ., ./v11_7, ./latest) still appears under older version options like "v11.6 (legacy theming)" in the docs site's "Component version" selector, even though it never existed in that release. Selecting it shows the same v1 docs/examples, but the Usage snippet renders an import for a nonexistent export path (e.g. @instructure/ui-card/v11_6), which 404s if used.

Suggested fix: teach isDocIncludedInVersion / buildVersionMap to only include a no-multi-version-export component under the default/latest version, not every version.

🤖 Generated with Claude Code

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