Fix pattern matching when upgrading packages #1347
Open
+70
−22
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 #1298
Additional information related to this pull request:
This PR modifies the
NgFileSystem
'sglob
function to expect multiple ignore patterns. It then loops through the contents of the root directory and its subdirectories, ignoring all entries that match any of the provided patterns and collects only the entries that match the expected pattern. Angular's file visitor is used only if no ignore patterns are provided. Additionally, when upgrading packages, thedist
folder is now also ignored.Currently the
@igniteui/angular-schematics:upgrade-packages
schematic will fail for projects that have not defined anignite-ui-cli.json
config file. The reason is that, at runtime, the schematic will attempt to infer the project's framework from the local config file. This is a rather easy thing to fix but should be done in a separate PR. So, note for testing - a project should always have a config file when attempting to run schematics or cli commands.