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.