Skip to content

validate: fail when a plugin directory is not listed in marketplace.json - #625

Open
deanrie wants to merge 1 commit into
cursor:mainfrom
deanrie:validator/unlisted-plugin-dirs
Open

deanrie wants to merge 1 commit into
cursor:mainfrom
deanrie:validator/unlisted-plugin-dirs

Conversation

@deanrie

@deanrie deanrie commented Oct 14, 2026

Copy link
Copy Markdown

Summary

Piece 3d of #531, the last one. scripts/validate-plugins.mjs iterated marketplace.plugins and validated each referenced directory, but nothing walked the repo the other way. A plugin directory that no entry references (a forgotten listing, or a source typo that happens to point at a sibling) passed with "All plugins validated successfully." and never reached the marketplace.

New step 3: collect resolve(root, entry.source) for every entry, walk the repo root and third_party/ for non-dot directories that contain .cursor-plugin/plugin.json, and fail() for each one not in that set:

ERROR: Unlisted plugin: "third_party/zz-vendor" has a .cursor-plugin/plugin.json but no entry in marketplace.json

On current main there are 102 listed sources and 0 unlisted directories, so this is an error from day one rather than a warning (unlike the frontmatter check in #618, which had existing offenders).

Verification

  • node scripts/validate-plugins.mjs on this branch against main: All plugins validated successfully.
  • Planted zz-unlisted/.cursor-plugin/plugin.json in the root and third_party/zz-vendor/.cursor-plugin/plugin.json: one Unlisted plugin error each, exit 1.

Separate from #618 on purpose so that PR does not grow after opening; both touch this file, so whichever lands second needs a trivial rebase (also #582).

Refs #531.

The validator walked marketplace.json entries only, so a directory with a
.cursor-plugin/plugin.json that no entry references (forgotten listing, or a
typo in source) passed CI and never reached the marketplace. Walk the repo
root and third_party/ for plugin directories and fail for each one that is
not a listed source. main has 102 listed and 0 unlisted today, so this is an
error from the start.
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