Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/utils/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export function resolveConfigPlugins(
if (
typeof plugin === "string" &&
!plugin.startsWith(".") &&
!path.isAbsolute(plugin)
!path.isAbsolute(plugin) &&
!plugin.startsWith("file://")
Comment on lines +37 to +38
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new condition to skip module resolution for file:// URLs lacks test coverage. Consider adding a test case in src/test/suite/plugins.test.ts or creating a new test fixture that includes a plugin path starting with file:// to ensure this behavior is properly tested and doesn't regress in the future.

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The check !plugin.startsWith("file://") is case-sensitive. While URL schemes are typically lowercase, RFC 3986 specifies that schemes are case-insensitive. Consider using !plugin.toLowerCase().startsWith("file://") to handle edge cases like FILE:// or File://.

Suggested change
!plugin.startsWith("file://")
!plugin.toLowerCase().startsWith("file://")

Copilot uses AI. Check for mistakes.
) {
return resolveNodeModule(plugin, { paths: [fileName] }) || plugin;
}
Expand Down