Restructure into a Bun/npm workspaces monorepo for multiple plugins - #19
Merged
Merged
Conversation
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.
2 tasks
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.
Summary
opencode-context-treeintopackages/context-tree/unchanged (same npm name, exports, and behavior) so the repo can host additional, independently-versioned OpenCode plugins going forward.release.yml/publish.ymlbecome package-aware: tags move to<package>-v<version>, with a fallback socontext-tree's existing barev*tag history (v0.1.0…v0.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 thebetanpm dist-tag.opencode-context-treeneeds no change — it's keyed on package name + repo + workflow file, not directory. Registering a new package still needs a one-time manualnpm publish+npm trust github <name> ...(documented inpublish.yml's header comment).opencode-tree-monorepo) with a sharedtsconfig.base.jsonand delegatingbuild/typecheck/testscripts; rootREADME.mdexplains 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-awarebun.lock,packages/context-treelisted as a memberbun run typecheck— cleanbun test— 473 pass / 30 skip / 0 failbun run build— emitspackages/context-tree/dist/{server,tui}.js, content matches pre-move buildcd packages/context-tree && npm pack --dry-run— tarball containsdist/,src/,README.md,LICENSE,docs/USAGE.md,CHANGELOG.md,package.jsonCTREE_E2E=1 bun test packages/context-tree/test/e2e— 20 pass / 0 failrelease.ymlviaworkflow_dispatchwithdry_run: trueon this branch/after merge to confirm the tag-prefix and CHANGELOG-path logic end-to-end in Actions (can't be exercised locally)