-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nx): update to NgRx 8 and add schematics support for creators an…
…d entities Move addUpdateTask util function to @nrwl/workspace to run updates from @nrwl/angular migrations Run update migration to latest version for NgRx if installed
- Loading branch information
1 parent
93aac33
commit 6516176
Showing
41 changed files
with
973 additions
and
587 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"schematics": {} | ||
"schematics": { | ||
"upgrade-ngrx-8-0": { | ||
"version": "8.3.0-beta.1", | ||
"description": "Upgrades NgRx dependencies to version 8, and runs migrations for breaking changes", | ||
"factory": "./src/migrations/update-8-3-0/upgrade-ngrx-8-0" | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
18 changes: 18 additions & 0 deletions
18
packages/angular/src/migrations/update-8-3-0/upgrade-ngrx-8-0.ts
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { chain, Tree, noop } from '@angular-devkit/schematics'; | ||
import { addUpdateTask, readJsonInTree, formatFiles } from '@nrwl/workspace'; | ||
|
||
const runNgrxUpdate = addUpdateTask('@ngrx/store', '8.1.0'); | ||
|
||
const updateNgrx = (host: Tree) => { | ||
const { dependencies } = readJsonInTree(host, 'package.json'); | ||
|
||
if (dependencies && dependencies['@ngrx/store']) { | ||
return chain([runNgrxUpdate, formatFiles()]); | ||
} | ||
|
||
return noop(); | ||
}; | ||
|
||
export default function() { | ||
return chain([updateNgrx]); | ||
} |
This file contains 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
Oops, something went wrong.