test(build): pin that a catalog refresh keeps an npm source - #91
Merged
Merged
Conversation
Issue #86 reported `plugin build` rewriting a published plugin's `{ source: "npm" }` catalog entry to its repository path, which installs a plugin without its gitignored build output. 5811bd6 fixed the refresh, and `marketplace add npm:<pkg>` (#89) is how an author opts into that source, but the build spec never stated the rule and no build-level test held it. The build spec now says a refresh keeps a non-local source and only re-derives the entry's fields. A scenario and a buildPlugin test cover the Claude and Codex catalogs. Refs #86 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
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.
Closes #86.
What #86 asked, and where it already stands
plugin build's refresh,plugin init, andmarketplace initall keep an entry whose source is not local and re-derive only its fields.marketplace add npm:<pkg> --force(feat(marketplace): make the skill a gateway and addmarketplace add#89) writes{ "source": "npm", "package": … }to the Claude and Codex catalogs and skips Copilot CLI and Cursor, which document only local paths.I checked this against a fixture shaped like repobuddy: a monorepo with
packages/buddy, npm entries in the Claude and Codex catalogs, and a local entry in the Copilot catalog.plugin buildbumped each entry's version and kept the npm sources and the Copilot path.marketplace add npm:repobuddy --forceturned a local Claude entry into an npm one, and the next build kept it. repobuddy'ssync-plugin-manifests.mjsworkaround is no longer needed.What this PR adds
The build spec never stated this rule, and no build-level test held it. This PR adds:
spec/plugin/build/README.md: a refresh keeps where the plugin is distributed from, and never chooses a non-local source itselfbuild.featurescenariobuildPlugintest covering both the Claude and Codex catalogsNot done: an automatic npm source whenever
packagePathis setThis repository has
packagePath: ".", is published, and keeps a local-path catalog on purpose so it can be developed locally. A default that switched to npm wheneverpackagePathis set would break that catalog. So the npm source stays opt-in, done once withmarketplace add npm:<pkg> --force, and every later build and regeneration keeps it.🤖 Generated with Claude Code