-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(mdc-migration): migrate components selectively bug #26427
Conversation
c70bc55
to
ea7712e
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.
LGTM
ea7712e
to
17dd9bb
Compare
@llorenspujol It looks like this change caused it to stop migrating |
d23f373
to
33fc842
Compare
Yes, I see, thanks for the commit. What is happening here is that The perfect solution may be one that resolves this test: it('should not replace only mat legacy option module if not specified', async () => {
await runMigrationTest(
`
import {NgModule} from '@angular/core';
import {MatLegacyOptionModule, LEGACY_VERSION} from '@angular/material/legacy-core';
@NgModule({imports: [MatLegacyOptionModule]})
export class AppModule {}
`,
`
import {NgModule} from '@angular/core';
import {MatLegacyOptionModule} from '@angular/material/legacy-core';
import {VERSION} from '@angular/material/core';
@NgModule({imports: [MatLegacyOptionModule]})
export class AppModule {}
`,
);
}); In this test the |
33fc842
to
f04147b
Compare
One thought, is you could have a separate const array that consists of the (lastImportName === 'legacy-core' && CORE_COMPONENTS.includes(componentMigrator.component)) |
I think it should be fine to only migrate core symbols when |
Fixes mdc-migration to migrate only the selected components. Fixes angular#26426
f04147b
to
4c8dd31
Compare
Agreed, it makes more sense this way. I added the necessary changes to only migrate core symbols if |
I think all of the feedback items have been addressed on this. Or is there more to do? |
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.
LGTM
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`15.2.0` -> `15.2.1`](https://renovatebot.com/diffs/npm/@angular%2fcdk/15.2.0/15.2.1) | | [@angular/material](https://github.com/angular/components) | dependencies | patch | [`15.2.0` -> `15.2.1`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/15.2.0/15.2.1) | --- ### Release Notes <details> <summary>angular/components</summary> ### [`v15.2.1`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#​1521-silicone-soliloquy-2023-03-01) [Compare Source](angular/components@15.2.0...15.2.1) #### Breaking Changes ##### - the description for body-1 and body-2 has changed ##### material | Commit | Type | Description | | -- | -- | -- | | [9a57674fea](angular/components@9a57674) | fix | **chips:** allow attribute selectors for chips ([#​26683](angular/components#26683)) | | [fdf1dc4b07](angular/components@fdf1dc4) | fix | **chips:** chips should assume their minimum density rather than error for small densities ([#​26688](angular/components#26688)) | | [d61443b62d](angular/components@d61443b) | fix | **chips:** remove spans from top level of component ([#​26689](angular/components#26689)) | | [5e67c1a345](angular/components@5e67c1a) | fix | **chips:** styling not updating when actions are removed ([#​26696](angular/components#26696)) | | [a87735e4ba](angular/components@a87735e) | fix | **list:** add disabled attribute for mat-list-item buttons ([#​26672](angular/components#26672)) | | [54d157f3d2](angular/components@54d157f) | fix | **schematics:** migrate to mdc components selectively bug ([#​26427](angular/components#26427)) | | [4338e5ee57](angular/components@4338e5e) | fix | **snack-bar:** misaligned lines on safari for long messages ([#​26692](angular/components#26692)) | ##### | Commit | Type | Description | | -- | -- | -- | | [b71fa77f7d](angular/components@b71fa77) | docs | reverse body-1 and body-2 typography description ([#​26330](angular/components#26330)) | #### Special Thanks Hamza jayri, Kristiyan Kostadinov, Matthieu Riegler, Miles Malerba, OneSidedPrism, VICTORIA JOHNSON and llorenspujol <!-- CHANGELOG SPLIT MARKER --> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTQuMSIsInVwZGF0ZWRJblZlciI6IjM0LjE1NC4xIn0=--> Co-authored-by: cabr2-bot <[email protected]> Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1800 Reviewed-by: Epsilon_02 <[email protected]> Co-authored-by: Calciumdibromid Bot <[email protected]> Co-committed-by: Calciumdibromid Bot <[email protected]>
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes mdc-migration to migrate only the selected components.
Fixes #26426