Repository navigation
Optimize package metadata for the Vite plugin registry - #82
Merged
Merged
Conversation
The registry (https://registry.vite.dev) harvests package.json from npm. ecij was already listed, but its card showed "rollup: unknown" with a warning triangle, because compatibility is inferred from peerDependencies and there is no rollup peer dependency. Declare the Rollup incompatibility explicitly via `compatiblePackages` so the card states the real reason instead. vite/rolldown are deliberately left out of that field: the collector merges per-tool with `compatiblePackages` winning, so restating them would create a second place to bump on every peer range change. Also widen the discoverability surface. The registry search box does a lowercased substring match over name, description and keywords, and the card clamps the description to two lines, so the description is reworded to front-load the terms keywords do not already cover and sized to fit the clamp. The added keywords cover npm's own exact-match keyword search. Round it out with the registry compatibility badges in the README and a note in AGENTS.md on which fields feed the registry. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
ecij is already listed in the Vite plugin registry, but its live entry has a gap. Compatibility is inferred from
peerDependencies, and there is norolluppeer dependency, so the card renders a warning triangle:Changes
compatiblePackagesThe functional fix. Declaring
rollup: incompatiblewith a reason turns the card's⚠ rollup: unknowninto✗ rollup: Uses Rolldown-specific APIs, which is both accurate (src/index.tsimportsRolldownMagicString,rolldown/filterandrolldown/utils) and more useful to someone scanning the listing.viteandrolldownare deliberately left out of the field. The collector merges per-tool withcompatiblePackagestaking precedence over the peer-dependency inference, so restating them would create a second place to bump on every peer range change. This mirrors@rolldown/plugin-babel's published metadata.descriptionandkeywordsThe registry search box does a lowercased substring match over
name,descriptionandkeywords, and the card clamps the description to two lines (-webkit-line-clamp: 2at a 320px minimum card width).The description is reworded to front-load the terms keywords do not already cover — "statically extracts", "tagged template literals" — and sized to 94 characters to fit the clamp. The added keywords (
css,rolldown,vite,zero-runtime) mostly target npm's own keyword search, which is exact-match rather than substring.vite-pluginandrolldown-pluginare untouched — those are what make the package discoverable at all.Badges and docs
Vite and Rolldown compatibility badges in the README, per the badges guide. No Rollup badge, since it will now read
Rollup: incompatible.AGENTS.mdgains a short "Package Metadata" section, since which fields feed the registry — and whycompatiblePackagesomits vite/rolldown — is easy to undo by accident.Verification
compatiblePackagesvalidates against the registry'sCompatiblePackagesSchema.npm packconfirms$schema,compatiblePackages, the description and the keywords all survive into the tarball.img.shields.io,image/svg+xml) and already renderVite: ^8.2.0andRolldown: ^1.2.0.format:check,typecheck,buildandtest(10/10) all pass.The registry re-collects from npm on a schedule, so the compatibility change lands on the next publish rather than on merge.
Not included
ecijdoes not follow Vite'svite-plugin-*naming convention, so it will not surface for someone typing "vite-plugin" into the registry search by name, though its keywords do match. Renaming a published package seemed out of scope here.🤖 Generated with Claude Code