Skip to content

refactor: unwrap PluginLoader namespace + self-reexport (redo)#23001

Open
kitlangton wants to merge 1 commit intodevfrom
kit/ns-plugin-loader-redo
Open

refactor: unwrap PluginLoader namespace + self-reexport (redo)#23001
kitlangton wants to merge 1 commit intodevfrom
kit/ns-plugin-loader-redo

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

Redo of #22946 — the original PR merged cleanly with all checks green but the commit was later dropped from `origin/dev` by a release-pipeline force-push. Same content as the dropped `75cbba355`, cherry-picked onto current `dev`.

Unwrap `export namespace PluginLoader` in `packages/opencode/src/plugin/loader.ts` into flat top-level exports + self-reexport for tree-shaking and Node native TS runner compatibility. Public API preserved via appended `export * as PluginLoader from "./loader"`. No consumer imports change.

Why this needs a redo

A release-pipeline force-push rewrote `dev` after the original merge, dropping multiple of our namespace-unwrap commits. Detected during a clean-sweep audit of remaining `export namespace` declarations in `packages/opencode/src/`. Plain cherry-pick of the original commit applies cleanly (the file was not touched on dev since the drop).

Verification

  • `bunx --bun tsgo --noEmit` from `packages/opencode/` — 0 errors
  • `bun run --conditions=browser ./src/index.ts generate` — no SDK drift
  • `test/plugin/` — 90/90 pass across 11 files

Diff

packages/opencode/src/plugin/loader.ts | 278 ++++++++++++-------
1 file changed, 139 insertions(+), 139 deletions(-)

Symmetric de-indent, same shape as every other tier-1 unwrap PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant