Skip to content

fix: move bundled deps to devDependencies to avoid 31 unneeded installs - #63

Merged
Dhravya merged 2 commits into
mainfrom
d/remove-bundled-runtime-deps-cf74
Jul 31, 2026
Merged

fix: move bundled deps to devDependencies to avoid 31 unneeded installs#63
Dhravya merged 2 commits into
mainfrom
d/remove-bundled-runtime-deps-cf74

Conversation

@Dhravya

@Dhravya Dhravya commented Jul 31, 2026

Copy link
Copy Markdown
Member

Problem

Closes #62.

The published package.json declares @opencode-ai/plugin and supermemory as runtime dependencies, but bun run build already bundles them into dist/index.js. As a result, every consumer installing the plugin via opencode plugin opencode-supermemory pulls in ~31 packages that are never loaded at runtime.

Root cause

dist/index.js is a self-contained bundle. I verified the built output imports only Node built-ins (node:fs, node:os, node:path, node:crypto, node:child_process, etc.) — there are no remaining bare imports of @opencode-ai/plugin or supermemory. Both are fully inlined by the bundler, so the runtime dependencies declaration is redundant and just forces redundant installs on consumers.

Fix

Move @opencode-ai/plugin and supermemory from dependencies to devDependencies. They remain available for local development, type-checking, and the build (which inlines them), but are no longer installed on the consumer side.

The package continues to ship only dist/ (per the files field), and the bundle is unchanged.

Verification

  • bun run typecheck — passes
  • bun run build — passes; index.js still 0.53 MB, self-contained (only Node built-ins imported)
  • bun test — 6/6 pass
  • bun.lock regenerated to reflect the dependency move

No source or bundled-output changes; this is purely a packaging metadata fix.

Release

Bumps version to 2.0.11. The publish workflow triggers on push to main when package.json changes and publishes to npm automatically once this merges.

Slack Thread

Open in Web Open in Cursor 

@opencode-ai/plugin and supermemory are inlined into dist/index.js by
'bun run build' (the bundle imports only Node built-ins), so declaring
them as runtime dependencies forced consumers to install ~31 packages
they never load. Moving them to devDependencies keeps build/typecheck
working while stopping the redundant installs on the consumer side.

Fixes #62

Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
@Dhravya
Dhravya marked this pull request as ready for review July 31, 2026 09:23
Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
@Dhravya
Dhravya merged commit 78cc892 into main Jul 31, 2026
2 of 3 checks passed
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.

[Bug Report] Plugin Installation via opencode plugin opencode-supermemory results in 31 unneeded packages being installed.

2 participants