-
Notifications
You must be signed in to change notification settings - Fork 539
chore(schematics): add migration for TuiInputYear
component
#12073
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
base: main
Are you sure you want to change the base?
Conversation
238c700
to
16fc190
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds migration support for the TuiInputYear
component in the schematics for v5 updates. It migrates the deprecated TuiInputYearModule
from @taiga-ui/legacy
to the new TuiInputYear
component from @taiga-ui/kit
and transforms templates to use the new tui-textfield
structure.
Key changes:
- Creates a utility function for running migrations consistently across tests
- Adds comprehensive template migration logic for
tui-input-year
components - Updates identifier mappings and migration pipeline
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
projects/cdk/schematics/utils/run-migration.ts | New utility function for consistent test migration execution |
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-input-year.spec.ts | Comprehensive test suite for TuiInputYear migration scenarios |
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-functions.spec.ts | Refactored to use new run-migration utility |
projects/cdk/schematics/ng-update/v5/steps/templates/migrate-input-year.ts | Core migration logic for transforming input-year templates |
projects/cdk/schematics/ng-update/v5/steps/constants/identifiers-to-replace.ts | Identifier mapping configuration for module/component replacement |
projects/cdk/schematics/ng-update/v5/index.ts | Integration of new migration steps into the main pipeline |
projects/cdk/schematics/ng-update/v5/steps/templates/migrate-input-year.ts
Outdated
Show resolved
Hide resolved
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-input-year.spec.ts
Outdated
Show resolved
Hide resolved
projects/cdk/schematics/ng-update/v5/tests/schematic-migrate-input-year.spec.ts
Outdated
Show resolved
Hide resolved
✅ NPM Audit Good5 vulnerabilities (3 low, 2 moderate) Show details
|
Tests completed successfully ✅Good job 🔥 |
Visit the preview URL for this PR (updated for commit bc7dfbe): https://taiga-previews-demo--pr12073-splincode-input-year-demo-id72ejsa.web.app (expires Tue, 30 Sep 2025 10:50:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 73dddc3c665194f3e11f18c16aeb71af4c289c37 |
3f9fb07
to
41ae244
Compare
41ae244
to
bc7dfbe
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12073 +/- ##
=======================================
Coverage 62.36% 62.36%
=======================================
Files 1331 1331
Lines 18168 18168
Branches 2910 2956 +46
=======================================
Hits 11331 11331
+ Misses 6417 6412 -5
- Partials 420 425 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BundleMonFiles updated (2)
Unchanged files (3)
Total files change -144B -0.02% Unchanged groups (1)
Final result: ✅ View report in BundleMon website ➡️ |
📊 Performance Metrics Comparison✅ No significant performance regressions detected! Overall Rendering Cost Δ: -1.33% ℹ️ (neutral ±15%) – neutral Summary
|
Playwright test results
Details
Flaky testschromium › tests/kit/line-clamp/line-clamp.pw.spec.ts › LineClamp › do not close after click in hint area Skipped testschromium › tests/addon-doc/navigation.pw.spec.ts › Navigation › anchor links navigation works › scroll to "tui-doc-example" |
`, | ||
}); | ||
|
||
expect(component).toEqual(`import { TuiInputYear } from "@taiga-ui/kit"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also add TuiTextfield
import ?
|
||
expect(template).toEqual(` | ||
<form [formGroup]="testForm"> | ||
<tui-textfield formControlName="testValue"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid migration
|
||
recorder.insertRight( | ||
calendarInsertOffset, | ||
'\n<tui-calendar-year *tuiTextfieldDropdown />\n', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'\n<tui-calendar-year *tuiTextfieldDropdown />\n', | |
'\n<tui-calendar-year *tuiDropdown />\n', |
Part of #11917