Skip to content

Preserve glob range negation and path boundaries - #65477

Open
Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/glob
Open

Jake Bailey (jakebailey) wants to merge 1 commit into
microsoft:mainfrom
jakebailey:compiler-fixes/glob

Conversation

@jakebailey

Copy link
Copy Markdown
Member

This code is vendored from gopls, but sadly it's also buggy.

Caught in an audit.

Honor negated character ranges when matching and rendering patterns.
Keep separators available after star matches and stop consuming slashes
before indexing an exhausted input.
Copilot AI balanced review requested due to automatic review settings November 13, 2026 04:55
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 13, 2026
@typescript-automation typescript-automation Bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Nov 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified in the glob matcher changes.

No open issues 🎉

What changed in this PR

This PR fixes range negation and path-boundary handling in the native TypeScript compiler’s vendored glob matcher.

Changes:

  • Preserve negated character ranges when formatting and matching patterns.
  • Keep path separators available after * matches and prevent out-of-bounds access when consuming trailing slashes.
  • Add regression tests for negated ranges, Unicode, wildcard boundaries, and trailing separators.
File Description
tsc/​internal/​glob/​glob.go Corrects range negation, wildcard boundaries, and slash handling.
tsc/​internal/​glob/​glob_test.go Adds formatting and matching regression tests.

Review effort: Balanced

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

2 participants