Skip to content
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

feat(component): add migration for replacing ReactiveComponentModule #3506

Merged

Conversation

david-shortman
Copy link
Contributor

@david-shortman david-shortman commented Jul 29, 2022

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

Closes #3491

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@netlify
Copy link

netlify bot commented Jul 29, 2022

Deploy Preview for ngrx-io canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 6e46148
🔍 Latest deploy log https://app.netlify.com/sites/ngrx-io/deploys/6328e4dedda1440009a95bbc

const expected = `
import { LetModule, PushModule } from '@ngrx/component';

const reactiveComponentModule: ReactiveComponentModule;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not migrating assignments to ReactiveComponentModule. However, currently I am not preserving the import. This PR could be enhanced by preserving the import of ReactiveComponentModule when it has not been replaced in the file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be preserved in this case.
A migration shouldn't break an application (Ideally 😅).
If it's hard to do that, I would prefer to keep the ReactiveComponentModule import for all cases.

@markostanimirovic markostanimirovic changed the title refactor(component) migrate to LetModule and PushModule feat(component): migrate to LetModule and PushModule Aug 2, 2022
@markostanimirovic markostanimirovic added the Needs Cleanup Review changes needed label Aug 24, 2022
@david-shortman
Copy link
Contributor Author

Will complete this week, I got lost in work but got re-invigorated at ng-conf 😄

@david-shortman
Copy link
Contributor Author

...little swamped so probably will only get to revisit this weekend or later. Public commitments, amirite 😅.

Copy link
Member

@markostanimirovic markostanimirovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @david-shortman! This migration will be released in v15. A few suggestions regarding that 👇

modules/component/migrations/14_3_2/index.spec.ts Outdated Show resolved Hide resolved
modules/component/migrations/migration.json Outdated Show resolved Hide resolved
@markostanimirovic markostanimirovic added 15.x and removed Needs Cleanup Review changes needed labels Sep 18, 2022
Co-authored-by: Marko Stanimirović <markostanimirovic95@gmail.com>
@david-shortman david-shortman requested review from markostanimirovic and removed request for timdeschryver September 19, 2022 00:57
@markostanimirovic
Copy link
Member

@david-shortman

The 14_3_2 directory should be renamed to 15_0_0-beta

const expected = `
import { ReactiveComponentModule, LetModule, PushModule } from '@ngrx/component';

const reactiveComponentModule: ReactiveComponentModule;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes in this PR look good to me, but....

Seeing this line of code raised a question.
The ReactiveComponentModule is currently deprecated, do we want to remove that in v15?
If that's the case, should we add a comment above this line to mention that ReactiveComponentModule is removed (can be done in a separate PR)?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove ReactiveComponentModule in v15. I also like the idea of adding a comment about its removal 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like deleting code ;D. I can open a separate PR.

Copy link
Member

@markostanimirovic markostanimirovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @david-shortman!! 🥇

@markostanimirovic markostanimirovic changed the title feat(component): migrate to LetModule and PushModule feat(component): add migration for replacing ReactiveComponentModule Sep 29, 2022
@brandonroberts brandonroberts merged commit 49c6cf3 into ngrx:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add migration for replacing ReactiveComponentModule with LetModule and PushModule on ng update
4 participants