Repository navigation
Conversation
Resolve rooted absolute exclusions against the cwd drive or UNC share without normalizing glob syntax.
Contributor
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
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.
What is the purpose of this pull request?
Fix Windows rooted absolute exclusions so matching positive and negative patterns cancel with or without a drive letter. Fixes #486.
What changes did you make? (Give an overview)
Resolve only the root of single-slash Windows negative patterns against
cwd, preserving glob syntax and explicit drive/UNC roots. Add regression coverage and clarify the Windows pattern documentation.Validation was local to Windows with Node.js 26.3.0. Linux/macOS, other Node.js versions, and physically mounted secondary drives or UNC shares were not exercised.
Implementation and validation
Absolute negative patterns were compiled without a drive while candidate paths were resolved to drive-qualified paths. Prefixing only the escaped filesystem root reconciles these forms without passing glob expressions through
path.resolve.The public
globSyncreproduction returned the fixture before the fix and returns[]after it; the drive-qualified control returns[]in both cases. Before the fix, 7 new unit checks and 54 new sync/async/stream checks failed.npm run build: passes compilation/type checking, lint, and 292 unit tests.SNAPSHOT_SKIP_PRUNING=1 npm run test:e2e -- --reporter dot: 1,449 passing; 9 existing platform-specific pending cases.git diff --check: passes.Coverage includes rooted and drive-qualified positives, negative patterns and
ignore, relative/absolute/URLcwd, relative exclusions, nonmatches, output and case settings, hidden files, trailing directory slashes, braces, extglobs, character classes, escaping, and parent segments. Synthetic entry-filter cases exercise distinct drives, literal UNC share metacharacters, explicit UNC roots, and device-drive roots without accessing other drives or network shares.