Repository navigation
Conversation
|
Dug into the actual cause rather than working around it. It's not type detection: boxMenu's metadata already resolves to Changes off the back of that:
Verified the install and update paths against a project carrying the stale manifest: the requested plugin installs correctly, no duplicate, One open call: the PR also skips reinstalling plugins already at the resolved version (less redundant work on a no-arg Posted via collaboration with Claude Code |
oliverfoster
left a comment
There was a problem hiding this comment.
Tested from a framework 5.56.3 project with a legacy root bower.json ("name": "manifest", adapt-contrib-boxMenu: 7.1.0), running bin/adapt.js from each branch:
adapt install adapt-contrib-media |
|
|---|---|
| master | media installed, plus adapt-contrib-boxMenu 7.1.0 duplicated into src/components/ (7.7.0 still in src/menu/) |
| this branch | media installed, no duplicate, no adapt-cli-* temp dirs left behind |
The isolated cwd doesn't affect local-path sources (they're copied from sourcePath), and the framework's .bowerrc "directory": "src/plugins" is overridden by the explicit directory option, so copying it across is safe.
Two things about the skip-when-current change (markInstallable):
- Output reads as a failure. When everything is already current,
adapt install, andadapt install adapt-contrib-mediawith media already installed, lists every plugin under "The following plugins were skipped" and ends with "None of the requested plugins could be installed". Something like "already up to date" would be clearer for plugins skipped for this reason. - No way to force a reinstall. Previously
adapt installreinstalled a plugin at the same version, which reset local edits. With the skip there's no flag for that (--cleanonly cleans the bower cache). Could this have a--force, or apply only to no-argument installs so an explicitly named plugin is still reinstalled?
The skip is separate from #235. If it needs more discussion, the isolation fix could go in on its own.
…up to date A named install now always reinstalls, so it can reset local edits. Plugins left out for being current are listed as "already up to date" instead of "skipped", and no longer trigger "None of the requested plugins could be installed". Local-path and --dev installs are never skipped. The installed version is read through a separate Plugin so a target's project info stays unset before install, as on master. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oliverfoster Thanks for testing. I've kept the skip and addressed both points in a9e540d, rather than splitting it out. Without the skip, a plain 1. Output. Plugins left out because they're current now get their own group: They no longer appear under "skipped". "None of the requested plugins could be installed" only shows when something actually failed or was skipped. 2. Forcing a reinstall. Went with your second suggestion: the skip only applies to a plain
One other change. The earlier commit read the installed plugin info ( Tested against a 5.56.3 project with the legacy root
Posted via collaboration with Claude Code |
Fixes #235
Fix
adapt installplaces menu plugin insrc/components/when already installed insrc/menu/#235: a stale bower.json ("name": "manifest"), left over from the old grunt/bower toolchain and never removed, pinnedadapt-contrib-boxMenu@7.1.0. Bower installed that manifest dependency into whichever type folder the requested plugin used (e.g.src/componentswhen installingadapt-contrib-media), creating a duplicate copy of boxMenu.Update
projectVersion === matchedVersion), and fetch installed-plugin info during install so that comparison is available. Reduces redundant reinstalls on a no-argadapt install.Testing
Setup
adapt installonce), soadapt-contrib-boxMenuis present insrc/menu/.Reproduce the bug (current published CLI /
master)adapt install adapt-contrib-media.adapt-contrib-boxMenu@7.1.0is duplicated intosrc/components/, alongside the correct copy still insrc/menu/.Verify the fix (this PR,
issue/235)src/components/adapt-contrib-boxMenu, leaving the root bower.json in place.adapt install adapt-contrib-mediaagain.adapt-contrib-mediainstalls tosrc/components/andadapt-contrib-boxMenuis NOT duplicated there.adapt install(no args) and confirm already-current plugins are skipped rather than reinstalled.