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(schematics): add createEffect migration #2136

Merged
merged 4 commits into from
Oct 8, 2019

Conversation

timdeschryver
Copy link
Member

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 #

What is the new behavior?

This PR adds a new schematic create-effect-migration to migrate from the @Effect() decorator to the createEffect() function.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@timdeschryver timdeschryver mentioned this pull request Sep 28, 2019
3 tasks
@ngrxbot
Copy link
Collaborator

ngrxbot commented Sep 28, 2019

Preview docs changes for 991e44b at https://previews.ngrx.io/pr2136-991e44b/

@ngrxbot
Copy link
Collaborator

ngrxbot commented Sep 28, 2019

Preview docs changes for 4b20b2c at https://previews.ngrx.io/pr2136-4b20b2c/

@dummdidumm
Copy link
Contributor

dummdidumm commented Sep 30, 2019

I don't see a test for

@Effect()
effectAsMethod() {
   return this.actions$...;
}

Did you check that this gets migrated, too? Or will these intentionally not get migrated?

@timdeschryver
Copy link
Member Author

Thanks @dummdidumm !
I haven't thought of it, I usually see the syntax covered in the PR.

@evgenyfedorenko
Copy link
Contributor

Also maybe as a part of this PR information about this migration should be added to the documentation?

@timdeschryver
Copy link
Member Author

⚠ Do not merge now ⚠

There's an issue with this migration, the createEffect function can be imported for a second time if it's already been imported before the schematic has run.

@brandonroberts brandonroberts added WIP Not ready for review Project: Schematics labels Oct 8, 2019
@ngrxbot
Copy link
Collaborator

ngrxbot commented Oct 8, 2019

Preview docs changes for 9e630ee at https://previews.ngrx.io/pr2136-9e630ee/

@timdeschryver
Copy link
Member Author

Removing the WIP tag, I verified it works now against our code base.

@timdeschryver timdeschryver removed the WIP Not ready for review label Oct 8, 2019
@brandonroberts brandonroberts merged commit 9eb1bd5 into master Oct 8, 2019
@brandonroberts brandonroberts deleted the pr/create-effect-migration branch October 8, 2019 22:11
jordanpowell88 pushed a commit to jordanpowell88/platform that referenced this pull request Nov 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants