Skip to content

test(build): pin that a catalog refresh keeps an npm source - #91

Merged
unional merged 1 commit into
mainfrom
fix/build-keeps-npm-source
Sep 21, 2026
Merged

unional merged 1 commit into
mainfrom
fix/build-keeps-npm-source

Conversation

@unional

@unional unional commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Closes #86.

What #86 asked, and where it already stands

  • Keep an npm source across a rebuild. Fixed in 5811bd6: plugin build's refresh, plugin init, and marketplace init all keep an entry whose source is not local and re-derive only its fields.
  • Generate an npm source. marketplace add npm:<pkg> --force (feat(marketplace): make the skill a gateway and add marketplace 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 build bumped each entry's version and kept the npm sources and the Copilot path. marketplace add npm:repobuddy --force turned a local Claude entry into an npm one, and the next build kept it. repobuddy's sync-plugin-manifests.mjs workaround 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:

  • a decision in spec/plugin/build/README.md: a refresh keeps where the plugin is distributed from, and never chooses a non-local source itself
  • a build.feature scenario
  • a buildPlugin test covering both the Claude and Codex catalogs

Not done: an automatic npm source whenever packagePath is set

This 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 whenever packagePath is set would break that catalog. So the npm source stays opt-in, done once with marketplace add npm:<pkg> --force, and every later build and regeneration keeps it.

🤖 Generated with Claude Code

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>
@changeset-bot

changeset-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 32f6f8e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@unional
unional merged commit 0d8ed6d into main Sep 21, 2026
6 checks passed
@unional
unional deleted the fix/build-keeps-npm-source branch September 21, 2026 19:38
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.

plugin build rewrites an npm catalog source to a local path

1 participant