Skip to content

fix: name info.json plugins by the name they report about themselves - #86

Merged
dsherret merged 7 commits into
mainfrom
fix_info_plugin_names
Oct 3, 2026
Merged

dsherret merged 7 commits into
mainfrom
fix_info_plugin_names

Conversation

@dsherret

@dsherret dsherret commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

The CLI decides which info.json plugins a config file already has by comparing each entry's name to the name the loaded plugin reports about itself. For plugins outside the dprint org, name was the username/repo they're published from (ex. g-plane/markup_fmt) rather than the plugin's name (dprint_plugin_markup), so the CLI never recognized them. Running dprint init in a repo that already had malva, markup_fmt and pretty_yaml offered markup again (writing a duplicate entry) and treated css/scss/yaml as unhandled.

This makes name the name the plugin reports, so it only identifies the plugin, and gives every entry two new properties for what name used to double as:

{
  "name": "dprint_plugin_malva",
  "displayName": "g-plane/malva",
  "repo": "g-plane/malva"
}
  • repo is the GitHub repo the plugin is published from. The release lookup and the npm package map read it instead of deriving the repo from name.
  • displayName is what's shown for the plugin. It's what each entry's name was before, so the site lists plugins exactly as it did. fix: show plugin display names and dim file extensions in plugin prompts dprint#1301 has the CLI show it in the dprint init and dprint add prompts.
  • /dprint/<plugin-name>/latest.json resolves a plugin by its info.json name, since released CLIs list those names as what can be passed to dprint add.

The names were read from each plugin (wasm plugins by loading them in the CLI, process plugins from their plugin.json) and the repos are the ones the registry already resolved for each entry.

kachick/typstyle and apcamargo/typstyle keep their names because both report dprint-plugin-typstyle. dprint config update looks up info.json plugins that are on npm by reported name, so naming kachick's entry that way would move someone using apcamargo's plugin to @kachick/dprint-plugin-typstyle.

Released CLIs need no change to recognize the plugins; until they're on a version with dprint/dprint#1301 they show the new name (ex. dprint_plugin_malva) in their prompts.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
dprint-plugins 8a1b114 Commit Preview URL

Branch Preview URL
Oct 03 2026, 10:43 PM

@dsherret
dsherret added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit 3f00148 Oct 3, 2026
2 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