Skip to main content

DEPRECATE AN EXTENSION

This guide shows you how to deprecate an extension you maintain, point users to a replacement, and reverse the deprecation.

Prerequisites

  • A published extension under your collective
  • A Swamp account with membership in the extension's namespace collective (swamp auth whoami)

Deprecate an extension

$ swamp extension deprecate @mycollective/old-tool \
    --reason "Superseded by @mycollective/new-tool with better error handling"

The --reason flag is required. Write a reason that helps users decide what to do — mention the successor, the migration path, or the timeline.

Point users to a successor

If a replacement extension exists on the registry, pass --superseded-by to link it:

$ swamp extension deprecate @mycollective/old-tool \
    --reason "Use @mycollective/new-tool instead" \
    --superseded-by @mycollective/new-tool

The successor must be a published extension on the registry. The registry detail page shows a deprecation banner with a link to the successor.

Reverse a deprecation

If the deprecation was premature or conditions changed:

$ swamp extension undeprecate @mycollective/old-tool

This clears the deprecation state and restores normal search ranking.

Deprecate from the web interface

To do the same from the browser:

  1. Sign in on the registry site with an account that is a member of the extension's namespace collective, and open the extension's page.
  2. Select the Edit details (pencil) icon in the Scorecard section header to open the owner panel.
  3. In the Lifecycle section, enter a deprecation reason — and optionally a successor extension — then select Deprecate.

When the extension is already deprecated, the same section shows Undeprecate instead. Yank and unyank controls live in the same section.