Skip to content

Restructure into a Bun/npm workspaces monorepo for multiple plugins - #19

Merged
navbytes merged 1 commit into
mainfrom
monorepo-multi-plugin
Sep 9, 2026
Merged

navbytes merged 1 commit into
mainfrom
monorepo-multi-plugin

Conversation

@navbytes

@navbytes navbytes commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Move opencode-context-tree into packages/context-tree/ unchanged (same npm name, exports, and behavior) so the repo can host additional, independently-versioned OpenCode plugins going forward.
  • release.yml/publish.yml become package-aware: tags move to <package>-v<version>, with a fallback so context-tree's existing bare v* tag history (v0.1.0v0.3.0-beta.2) keeps resolving; the prerelease/dist-tag check now runs strictly on the extracted version string (not the raw ref) so a stable release can't silently land under the beta npm dist-tag.
  • npm's OIDC trusted-publishing registration for opencode-context-tree needs no change — it's keyed on package name + repo + workflow file, not directory. Registering a new package still needs a one-time manual npm publish + npm trust github <name> ... (documented in publish.yml's header comment).
  • Root is now a private workspace root (opencode-tree-monorepo) with a shared tsconfig.base.json and delegating build/typecheck/test scripts; root README.md explains the layout and how to add package Port Pi's fork-from-an-earlier-message flow whole #2.

No behavior change for opencode-context-tree — this is pure scaffolding, verified by moving the existing package and confirming everything still works from its new home.

Test plan

  • bun install — workspace-aware bun.lock, packages/context-tree listed as a member
  • bun run typecheck — clean
  • bun test — 473 pass / 30 skip / 0 fail
  • bun run build — emits packages/context-tree/dist/{server,tui}.js, content matches pre-move build
  • cd packages/context-tree && npm pack --dry-run — tarball contains dist/, src/, README.md, LICENSE, docs/USAGE.md, CHANGELOG.md, package.json
  • CTREE_E2E=1 bun test packages/context-tree/test/e2e — 20 pass / 0 fail
  • Trigger release.yml via workflow_dispatch with dry_run: true on this branch/after merge to confirm the tag-prefix and CHANGELOG-path logic end-to-end in Actions (can't be exercised locally)

Moves opencode-context-tree into packages/context-tree/ unchanged (same
npm name, exports, and behavior) so the repo can host additional,
independently versioned OpenCode plugins going forward. release.yml and
publish.yml become package-aware (<package>-v<version> tags, with a
fallback to context-tree's existing bare v* tag history), while npm's
OIDC trusted-publishing registration for opencode-context-tree is
untouched since it's keyed on package name + repo + workflow file, not
directory.
@navbytes
navbytes merged commit 0bae14a into main Sep 9, 2026
2 of 3 checks passed
@navbytes
navbytes deleted the monorepo-multi-plugin branch September 9, 2026 22:36
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