Skip to content

Optimize package metadata for the Vite plugin registry - #82

Merged
nstepien merged 1 commit into
mainfrom
vite-plugin-registry-metadata
Sep 1, 2026
Merged

nstepien merged 1 commit into
mainfrom
vite-plugin-registry-metadata

Conversation

@nstepien

@nstepien nstepien commented Sep 1, 2026

Copy link
Copy Markdown
Owner

ecij is already listed in the Vite plugin registry, but its live entry has a gap. Compatibility is inferred from peerDependencies, and there is no rollup peer dependency, so the card renders a warning triangle:

vite:     compatible ^8.2.0    ✓ from peerDependencies
rolldown: compatible ^1.2.0    ✓ from peerDependencies
rollup:   unknown              ⚠ warning triangle on the card

Changes

compatiblePackages

The functional fix. Declaring rollup: incompatible with a reason turns the card's ⚠ rollup: unknown into ✗ rollup: Uses Rolldown-specific APIs, which is both accurate (src/index.ts imports RolldownMagicString, rolldown/filter and rolldown/utils) and more useful to someone scanning the listing.

vite and rolldown are deliberately left out of the field. The collector merges per-tool with compatiblePackages taking 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.

description and keywords

The registry search box does a lowercased substring match over name, description and keywords, and the card clamps the description to two lines (-webkit-line-clamp: 2 at 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-plugin and rolldown-plugin are 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.md gains a short "Package Metadata" section, since which fields feed the registry — and why compatiblePackages omits vite/rolldown — is easy to undo by accident.

Verification

  • compatiblePackages validates against the registry's CompatiblePackagesSchema.
  • npm pack confirms $schema, compatiblePackages, the description and the keywords all survive into the tarball.
  • Badge endpoints resolve (302 → img.shields.io, image/svg+xml) and already render Vite: ^8.2.0 and Rolldown: ^1.2.0.
  • format:check, typecheck, build and test (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

ecij does not follow Vite's vite-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

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]>
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: d5cbbfb1-e2dd-48d9-a17f-904f6b3a1ab1


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nstepien
nstepien merged commit 3364ebe into main Sep 1, 2026
5 checks passed
@nstepien
nstepien deleted the vite-plugin-registry-metadata branch September 1, 2026 11:08
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