Skip to content

Add npm packages to info.json and latest.json - #71

Merged
dsherret merged 1 commit into
mainfrom
npm-packages-in-info-json
Aug 5, 2026
Merged

Add npm packages to info.json and latest.json#71
dsherret merged 1 commit into
mainfrom
npm-packages-in-info-json

Conversation

@dsherret

@dsherret dsherret commented Aug 5, 2026

Copy link
Copy Markdown
Member

Declares the npm package each plugin is published to, so the dprint CLI writes an npm specifier into config files instead of an https url.

info.json

"npm": { "name": ... } added to 21 of the 23 entries:

plugin npm package
the 13 dprint-plugin-* entries @dprint/typescript, @dprint/json, @dprint/markdown, @dprint/toml, @dprint/dockerfile, @dprint/biome, @dprint/oxc, @dprint/mago, @dprint/ruff, @dprint/jupyter, @dprint/prettier, @dprint/roslyn, @dprint/exec
jakebailey/gofumpt @jakebailey/dprint-plugin-gofumpt
g-plane/malva dprint-plugin-malva
g-plane/markup_fmt dprint-plugin-markup
g-plane/pretty_yaml dprint-plugin-yaml
g-plane/pretty_graphql dprint-plugin-graphql
bartlomieju/lax-css / lax-markup / lax-sql lax-css / lax-markup / lax-sql

No npm package exists for jolars/panache or drluckyspin/swift, so those are unchanged.

For each package I checked that it resolves on the registry, that its tarball contains the package/plugin.wasm (or package/plugin.json for the process plugins prettier/roslyn/exec) that PluginNpmInfo::resolve_latest looks for, and that its latest version matches the plugin's latest GitHub release. That ruled out two near-misses: malva on npm is g-plane's standalone wasm build (standalone_wasm_bg.wasm, no plugin file), and panache is an unrelated package unpublished since 2011.

latest.json

tryResolveLatestJson now serves the same npm property. The mapping is derived from info.json rather than duplicated, keyed by username/repo after getFullRepoName resolution, with both the prefixed and unprefixed repo name registered so /dprint/typescript/latest.json and /dprint/dprint-plugin-typescript/latest.json both hit.

tsc --noEmit and dprint check are clean. Note that the live-GitHub tests (including the g-plane/malva case added here) can't run locally without a GitHub token — they 401 on main too — so those are unverified outside CI.

Each plugin published to npm now declares its package, which the dprint
CLI uses to write an npm specifier into config files instead of a url.

Verified for each package that it resolves on the registry, that its
tarball contains the plugin.wasm/plugin.json the CLI resolves out of it,
and that its latest version matches the plugin's latest GitHub release.
No package exists for jolars/panache or drluckyspin/swift.

latest.json serves the same property, mapped from info.json rather than
duplicated.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 5, 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 59615e8 Commit Preview URL

Branch Preview URL
Aug 05 2026, 02:31 PM

@dsherret
dsherret added this pull request to the merge queue Aug 5, 2026
Merged via the queue into main with commit 04f59ee Aug 5, 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