Repository navigation
fix: install nested plugin dependencies - #3141
Merged
bajrangCoder merged 1 commit intoDec 2, 2026
Merged
Conversation
resolveDepsManifest pushed the array returned by its recursive call without spreading it. When a dependency declares its own dependencies, the confirm dialog showed a blank name and resolveDep received an array, so installPlugin downloaded plugin id "undefined" and the whole install was rolled back. This also happened when the nested dependency was already installed, because the empty array was still pushed. Spread the nested manifests into the flat list.
Contributor
[Medium impact] The PR appears safe to merge. SummaryFixes nested plugin installs by adding each recursive result to the dependency list instead of adding the array itself.
Reviews (1) · Last reviewed commit: "fix: install nested plugin dependencies" · Reviewed by Greptile |
bajrangCoder
approved these changes
Dec 2, 2026
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.
Bug
A plugin can't be installed if one of its dependencies declares
dependenciesof its own.resolveDepsManifest(src/lib/installPlugin.js) resolves dependencies recursively, but pushes the recursive call's result without spreading it:For plugin A → dependency B → dependency C, the list becomes
[[C], B]. Then:value.name, so the first entry is blank:"…dependencies:<br /><br />, B"resolveDep([C])readsmanifest.id→undefined, soinstallPlugindownloads…/plugin/download/undefined?…. That fails, and the outercatchdeletes the half-installed plugin and rethrows.This also happens when C is already installed and up to date. The recursive call then returns an empty array, which is still pushed. So any dependency that declares
dependenciesbreaks the install of every plugin that depends on it.Fix
Tests
New
tests/unit/installPluginDependencies.test.jsruns the realinstallPlugin.jsthroughloadSourceModule, using the same fixture style asiosPluginInstall.test.js. It has 2 cases: A → B → C, and A → B → C with C already installed at the same version. It checks the dialog text, the download order and the load order. Both fail onmain:With the fix both pass. The dialog reads "Nested, Direct" (or "Direct" when C is current), the installs run C → B → A, and nothing requests
undefined.Local gate (macOS, Node 24):
npx vitest run1207 passed / 1 skipped (1205 + 2 new onmain),npm run typecheckclean,biome ci .clean,typosclean on the changed files. Not tested on a device.🤖 Generated with Claude Code