fix(upgrade-packages): correctly glob files on windows#1511
Merged
damyanpetev merged 1 commit intomasterfrom Feb 27, 2026
Merged
fix(upgrade-packages): correctly glob files on windows#1511damyanpetev merged 1 commit intomasterfrom
damyanpetev merged 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the upgrade command fails to update view files and style imports on Windows due to glob pattern handling changes introduced in glob v8+. The core problem is that glob v8+ treats backslashes (\) as escape characters only, not path separators, which causes Windows-style paths with patterns like C:\Work\project\**\*.ts to fail.
Changes:
- Fixed
FsFileSystem.glob()to convert all backslashes to forward slashes before passing patterns to glob.sync, ensuring compatibility with glob v8+ - Removed redundant path normalization since glob v8+ now returns posix-style paths natively
- Added comprehensive unit tests covering Windows paths, mixed path styles, and POSIX paths
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/core/util/FileSystem.ts |
Fixed glob pattern handling by converting backslashes to forward slashes before calling glob.sync; removed redundant result mapping; added type-only import |
spec/unit/FsFileSystem-spec.ts |
Added comprehensive unit tests for Windows and POSIX path handling in glob method |
packages/cli/lib/commands/upgrade.ts |
Added type-only import and explicit type annotation for ProjectTemplate variable |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Hristo313
approved these changes
Feb 26, 2026
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.
Closes #1510
Additional information related to this pull request:
Related to the package upgrade in #1378, however, besides also returning native os-style paths, the newer
globversions also treat\as escape only (see https://github.com/isaacs/node-glob/blob/main/changelog.md#80) and as such win style paths with**\*.tsfail.