Repository navigation
fix: multi-file install, refs/heads URLs, integration test - #22
Merged
Merged
Conversation
This commit ensures that all files installed by a package are tracked in installed.json and correctly cleaned up during removal or update. Also includes a helper to remove empty parent directories recursively.
… and integration test - Fix prefix-stripping for community packages with absolute file paths in files array (prevents path doubling in download URLs and local destinations) - Add toRefBranch() helper to normalize branch to refs/heads/ format in all raw.githubusercontent.com URLs (fetcher, registry, community index) - Update COMMUNITY_INDEX_URL to use refs/heads/main - Add community-install-integration test that downloads real packages and validates file placement (supports LIMIT, FILTER, LOCAL_INDEX, OUTPUT_DIR) - Add test-output/ to .gitignore
4 tasks done
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.
Summary
filesarray caused path doubling in download URLs and local destinationstoRefBranch()helper to normalize branch names torefs/heads/format in allraw.githubusercontent.comURLs (fetcher, registry, community index URL)Changes
plug/src/constants.js—toRefBranch()helper,COMMUNITY_INDEX_URLupdated torefs/heads/mainplug/src/utils/fetcher.js— URL construction usestoRefBranch(branch)plug/src/utils/registry.js— URL construction usestoRefBranch(branch)plug/src/commands/install.js— prefix-stripping for community package file pathsplug/tests/community-install-integration.test.js— new integration test (supportsLIMIT,FILTER,LOCAL_INDEX,OUTPUT_DIRenv vars)plug/tests/install.test.js— new multi-file community package testplug/tests/fetcher.test.js— updated URL assertionTest plan
LIMIT=5 npx vitest run tests/community-install-integration.test.jspasses