Skip to content

feat: warn when a plugin's update url says it's deprecated - #1383

Merged
dsherret merged 2 commits into
mainfrom
feat/plugin-update-url-deprecation
Oct 21, 2026
Merged

dsherret merged 2 commits into
mainfrom
feat/plugin-update-url-deprecation

Conversation

@dsherret

Copy link
Copy Markdown
Member

Lets a plugin's update url (its latest.json) say the plugin is deprecated, similar to npm's deprecated field but for https plugins:

{
  "schemaVersion": 1,
  "url": "https://plugins.dprint.dev/foo-1.0.0.wasm",
  "version": "1.0.0",
  "deprecated": "Use bar instead."
}

dprint config add <name> and dprint config update then warn with Plugin <name> is deprecated: <message>. config update warns even when the plugin is already on its latest version. Like npm:

  • an empty message means the plugin isn't deprecated
  • the warning is only given once per plugin (ex. when several config files use it)
  • control characters in the message are replaced so it can't send escape sequences to the terminal

The control character replacement that the npm deprecation warning did inline is now a shared replace_control_chars helper. Older CLIs ignore the new property, since unknown keys in latest.json are already skipped.

Notes:

  • Entries already on npm: specifiers don't read latest.json, so they only see npm's own deprecation. A plugin that moved to npm should be deprecated there too.
  • A plugin whose latest.json is deprecated and whose npm package version is also deprecated gets both warnings, since they're separate signals.
  • config add <url> doesn't read latest.json, so there's no warning there. The interactive picker reads the info file, so a deprecated plugin should be removed from the info file.

@dsherret
dsherret merged commit 87bd93f into main Oct 21, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant