Repository navigation
fix: name info.json plugins by the name they report about themselves - #86
Merged
Merged
Conversation
Deploying with
|
| 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 |
This reverts commit c575675.
# Conflicts: # info.json
This was referenced Oct 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI decides which info.json plugins a config file already has by comparing each entry's
nameto the name the loaded plugin reports about itself. For plugins outside the dprint org,namewas theusername/repothey're published from (ex.g-plane/markup_fmt) rather than the plugin's name (dprint_plugin_markup), so the CLI never recognized them. Runningdprint initin 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
namethe name the plugin reports, so it only identifies the plugin, and gives every entry two new properties for whatnameused to double as:{ "name": "dprint_plugin_malva", "displayName": "g-plane/malva", "repo": "g-plane/malva" }repois the GitHub repo the plugin is published from. The release lookup and the npm package map read it instead of deriving the repo fromname.displayNameis what's shown for the plugin. It's what each entry'snamewas 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 thedprint initanddprint addprompts./dprint/<plugin-name>/latest.jsonresolves a plugin by its info.json name, since released CLIs list those names as what can be passed todprint 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/typstyleandapcamargo/typstylekeep their names because both reportdprint-plugin-typstyle.dprint config updatelooks 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.