-
Notifications
You must be signed in to change notification settings - Fork 157
refactor(migrations): use tsUtils for import checks in 21.0.0 migration #16550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+34
−34
Conversation
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
- Add IG_LICENSED_PACKAGE_NAME constant for @infragistics/igniteui-angular - Add isIgniteuiImport helper function to handle base and subpath imports - Update namedImportFilter to use isIgniteuiImport for subpath support - Update update-21_0_0_import-migration to use constants from tsUtils - Replace hardcoded package names with constants for maintainability Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Address code review feedback by pre-compiling the BASE_IMPORT_PATTERN regex at module level instead of recompiling on each function call. Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update 21 migration to use existing util for import check
refactor(migrations): use tsUtils for import checks in 21.0.0 migration
Nov 28, 2025
Copilot finished work on behalf of
damyanpetev
November 28, 2025 10:30
damyanpetev
requested changes
Nov 28, 2025
projects/igniteui-angular/migrations/update-21_0_0_import-migration/index.ts
Outdated
Show resolved
Hide resolved
projects/igniteui-angular/migrations/update-21_0_0_import-migration/index.ts
Outdated
Show resolved
Hide resolved
Address review feedback: - Use namedImportFilter from tsUtils instead of duplicating logic - Restore .includes() checks with constants (faster than regex) - Remove unnecessary regex-based hasBaseIgniteuiImports function Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
- Add comment explaining non-null assertions are safe due to namedImportFilter validation - Clarify the quick check is for base imports (not subpaths) Co-authored-by: damyanpetev <3198469+damyanpetev@users.noreply.github.com>
Copilot finished work on behalf of
damyanpetev
November 28, 2025 12:13
damyanpetev
approved these changes
Nov 28, 2025
rkaraivanov
approved these changes
Nov 28, 2025
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 #16549
Addresses feedback from PR #16547 review: update the 21.0.0 migration to use existing
namedImportFilterutil and adjust it to handle subpaths.Changes
tsUtils.ts:IG_LICENSED_PACKAGE_NAMEconstant for@infragistics/igniteui-angularisIgniteuiImport(path)helper that handles base packages and subpaths (e.g.,igniteui-angular/core,@infragistics/igniteui-angular/grids)namedImportFilterto useisIgniteuiImportinstead ofendsWith(IG_PACKAGE_NAME)update-21_0_0_import-migration/index.ts:namedImportFilterfrom tsUtils for import validation instead of duplicating logic.includes()checks with imported constants for quick file content checks (faster than regex)Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.