Fix glob pattern matching on Windows by normalizing path separators#2204
Draft
Fix glob pattern matching on Windows by normalizing path separators#2204
Conversation
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
…lashes Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
…ing() Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix glob functionality on Windows GitHub runners
Fix glob pattern matching on Windows by normalizing path separators
Dec 10, 2025
salmanmkc
reviewed
Dec 11, 2025
|
|
||
| // Convert to forward slashes on Windows before matching with minimatch | ||
| // since the pattern was converted to forward slashes in the constructor | ||
| if (IS_WINDOWS) { |
Contributor
There was a problem hiding this comment.
You added duplicated code? Could we refactor it?
Contributor
Author
There was a problem hiding this comment.
Refactored the duplicated code into a private static helper method convertToMinimatchPath(). This method is now used in both match() and partialMatch() methods. (9de8f6f)
…lication Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
Contributor
|
'path' is defined but never used @copilot |
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
Contributor
Author
Contributor
|
You should probably run npm linting with the fix option @copilot |
Co-authored-by: salmanmkc <32169182+salmanmkc@users.noreply.github.com>
Contributor
Author
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.
Fix glob not working on Windows
Root Cause Analysis
The issue is in
packages/glob/src/internal-pattern.tsin thematch()andpartialMatch()methods:/) for minimatch on Windows\) on WindowsImplementation Plan
Security Summary
CodeQL analysis completed with 0 alerts - no security vulnerabilities found.
Changes Made
convertToMinimatchPath()to eliminate code duplicationOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.