Skip to content

fix: normalize Windows ignore glob paths - #612

Open
Shubham-Padkonde wants to merge 2 commits into
vercel:mainfrom
Shubham-Padkonde:fix/windows-ignore-globs
Open

Shubham-Padkonde wants to merge 2 commits into
vercel:mainfrom
Shubham-Padkonde:fix/windows-ignore-globs

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Fixes #445.

On Windows, resolving an ignore pattern such as ignored/** produces ignored\**. Picomatch interprets the backslash in the pattern as an escape, so matching dependencies remain in the trace. Convert resolved patterns and candidate paths to forward slashes only at the glob-matching boundary. The existing outside-base check, callback arguments and returned file paths retain their native-path behavior.

Add seven filesystem-based tracing cases for string/array globs, native and absolute patterns, exact paths, callback inputs and entry-point retention. Four of the cases fail on the original Windows implementation and pass with this change. This does not overlap #610's package-resolution changes.

Validation:

  • TypeScript build and repository-wide Prettier check pass.
  • Windows Node 24.19.0: the new tests plus the filesystem-concurrency test pass (8 tests).
  • Linux Node 26.7.0: the same 8 tests pass.
  • Windows existing unit/CLI tests plus these tests: 164 pass, 2 fail. Both failures (pnpm-symlinks and require-symlink-subdir) also fail with the original source in this checkout, whose core.symlinks is false. They are not introduced by this change.

Dependencies were installed from the frozen lockfile with the repository-pinned pnpm 10.33.0 and install scripts disabled. The external-service integration suite was not run. Prepared with Codex assistance; the before/after tests were run locally.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

glob in ignore option does not work

2 participants