Skip to content

Construct Hub does not show latest major version of package #833

Open
@Chriscbr

Description

@Chriscbr

From @alexpulver

Hi folks, how does Construct Hub selects the major version to display? For example, it shows the latest v1 version for https://constructs.dev/packages/cdk-remote-stack/v/1.0.30?lang=typescript, even though there are v2 versions for that construct

Currently Construct Hub tracks major versions of packages separately. When a package appears in search results or on a home page, the web app need to pick a major version of a package to show to the user. Currently, it selects whichever version was published to most recently. In some cases this causes confusion because users might expect the highest major version to be shown.

The reason we previously chose against showing the highest major version is because higher major versions may be outdated or invalid. For example, https://www.npmjs.com/package/cdk-dynamo-table-viewer was published to major version 3 but this version is actually invalid and outdated (it was likely published by accident). Hence why we show the most recently published version.

Some ideas for improving the experience:

  • prioritize the major version that is tagged as latest on npm -- this is the default version you get when you run npm install package-name
  • prioritize the highest major version, but ignoring any versions that are tagged as "deprecated" on NPM (related: Library deprecation support #343)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions