fix: move bundled deps to devDependencies to avoid 31 unneeded installs - #63
Merged
Conversation
@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
marked this pull request as ready for review
July 31, 2026 09:23
Co-authored-by: Dhravya Shah <dhravya@supermemory.com>
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.
Problem
Closes #62.
The published
package.jsondeclares@opencode-ai/pluginandsupermemoryas runtimedependencies, butbun run buildalready bundles them intodist/index.js. As a result, every consumer installing the plugin viaopencode plugin opencode-supermemorypulls in ~31 packages that are never loaded at runtime.Root cause
dist/index.jsis 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/pluginorsupermemory. Both are fully inlined by the bundler, so the runtimedependenciesdeclaration is redundant and just forces redundant installs on consumers.Fix
Move
@opencode-ai/pluginandsupermemoryfromdependenciestodevDependencies. 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 thefilesfield), and the bundle is unchanged.Verification
bun run typecheck— passesbun run build— passes;index.jsstill0.53 MB, self-contained (only Node built-ins imported)bun test— 6/6 passbun.lockregenerated to reflect the dependency moveNo source or bundled-output changes; this is purely a packaging metadata fix.
Release
Bumps
versionto2.0.11. Thepublishworkflow triggers on push tomainwhenpackage.jsonchanges and publishes to npm automatically once this merges.Slack Thread