fix: use parent directory name for index.ts plugins in deduplication#9321
Closed
ShamanicArts wants to merge 1 commit intoanomalyco:devfrom
Closed
fix: use parent directory name for index.ts plugins in deduplication#9321ShamanicArts wants to merge 1 commit intoanomalyco:devfrom
ShamanicArts wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #8758: fix: use full URL for file:// plugin deduplication This PR is related to the same deduplication issue for file:// plugins. While it appears to address the plugin deduplication problem differently (using full URL rather than parent directory name), it's addressing the same core issue of duplicate plugin detection when using local file:// URLs. You may want to check if these approaches should be unified or if PR #8758 is already resolved. |
Author
|
claude PR before I wanted him too. tut tut claude |
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
index.tsas their filenameindex.tsorindex.js, the parent directory name is used instead for deduplicationProblem
When configuring multiple local plugins with
file://URLs that use the commonindex.tsnaming convention:{ "plugin": [ "file:///path/to/my-plugin/index.ts", "file:///path/to/other-plugin/index.ts" ] }Both plugins resolve to the name
index, causing the deduplication logic to keep only the last one.Solution
The
getPluginNamefunction now checks if the filename isindexand uses the parent directory name instead:file:///path/to/my-plugin/index.ts→my-pluginfile:///path/to/other-plugin/index.ts→other-plugin