2229 Commits

Author SHA1 Message Date
Steven
7d8ec2cefd fix(schematics): use correct action type for LoadError
The `LoadError` action was mapped to the `Load<%= className %>` action type rather than `<%= className %>LoadError`.
2018-08-13 20:12:45 -04:00
Jason Jean
84636913d7 fix(schematics): update version in legacy migration to 6.2.0 2018-08-13 20:12:05 -04:00
Jason Jean
63e0b49ccf fix(schematics): remove karma.conf.ts from tsconfigs 2018-08-13 20:11:22 -04:00
Jason Jean
aca8aa1e8d fix(schematics): fix devkit version for ng-new 2018-08-13 20:09:05 -04:00
Jason Jean
6560db75f7 feat(schematics): add install task for ngrx schematics 2018-08-13 20:08:35 -04:00
Jason Jean
edba67f728 fix(schematics): update other @angular framework packages when updating 2018-08-13 16:10:57 -04:00
ncunningham
ac5b85e46c docs(nx): remove unnecessary imports and fix spelling. 2018-08-13 16:10:30 -04:00
Victor Savkin
917525a330 Release 6.2.0 2018-08-06 14:04:16 -04:00
Jason Jean
7bb583234b fix(schematics): do not use tsconfig updates from angular lib schematic 2018-08-04 08:39:13 -04:00
Jason Jean
b5550d367c fix(schematics): set versions consistent with cli 6.1.2 2018-08-04 08:37:43 -04:00
Thomas Burleson
8334c200a7 fix(schematics): library schematic properly removes extra files
Angular CLI now supports `host.delete()`. `updateProject()` now properly removes
the library generated service and component files.

>  Earlier workarounds using `unlink()` were not working.

Refs #650.
2018-08-03 17:01:19 -04:00
Victor Savkin
bdcb0a703f fix(schematics): update create-nx-workspace to ues the right version of the cli 2018-08-03 16:15:55 -04:00
Victor Savkin
bff43776b5 fix(build): relax peerDependencies to enable seamless upgrade 2018-08-02 15:32:37 -04:00
Victor Savkin
6de716258f Release 6.2.0-beta.1 2018-08-02 13:46:09 -04:00
Victor Savkin
d3362e06c8 feat(schematics): add the packageManager property to ngNew 2018-08-02 13:39:20 -04:00
Jason Jean
205e7ad7ef feat(schematics): support @angular/cli@6.1.1 2018-08-02 13:39:19 -04:00
Mitko Tschimev
1f7d5477a4 fix(schematics): check touchedFile path against the project files 2018-08-02 13:39:00 -04:00
Thomas Burleson
57d6b0bd93 feat(ngrx): add support for NgRx Facade classes
Add support to generate NgRx facade classes when the command `--facade` boolean option
is used.

```console
ng g ngrx <feature> --facade
```

> Note this will not generate facades for existing ngrx features; this option
is currently only available for *new* ngrx scaffolding.

* Add code generators for `<feature>.facade.ts` + `<feature>.facade.spec.ts`

Fixes #629. Fixes #638.

use entity
2018-07-29 13:42:44 -04:00
Thomas Burleson
aa1b7766c5 fix(ngrx): fix lint issues in schematic templates
The ngrx schematic templates have some minor lint errors that manfiest in new ngrx generated code.

*  In the ngrx e2e tests, add check for tsLint errors in the generated code
*  Fix lint issues for the upgrade-module and associated tests.
2018-07-29 11:30:04 -04:00
Sam Severance
829fb32614 fix(schematics): fix ngrx effect services being provided 2x
* Remove `TodoEffects` from `providers` because it is already
  provided when calling `EffectsModule.forRoot([TodoEffects])`
2018-07-26 10:45:31 -04:00
swseverance
e1984fa40e fix(schematics): update devDependencies (#637)
* Move @ngrx/store-devtools and ngrx-store-freeze' to devDependencies
2018-07-22 12:30:31 -05:00
Thomas Burleson
04e99b06ae fix(schematics): ngrx schematics should generate enhanced ngrx files
@nrwl/schematics no longer uses the @ngrx/schematics to generate NgRx feature files.
*  `ngrx/files/__directory__` templates are used
*  Templates replicate the simple outputs generated from @ngrx/schematics:feature
*  Templates add significant Nx enhancements.

The following standard files will be scaffolded:
* `<feature>.actions.ts`
* `<feature>.effects.ts` + `<feature>.effects.spec.ts`
* `<feature>.reducer.ts` + `<feature>.reducer.spec.ts`

The following new files will also be scaffolded:
* `<feature>.selectors.ts` +  `<feature>.selectors.spec.ts`

Changes include:

* Change the action/enums to generate a trio of enums for each *feature*: `Load<Feature>`, `<Feature>Loaded`, and `<Feature>LoadError`
* Add code generators for `<feature>.selectors.ts`
* Add code generators for unit and integration testing `*.spec.ts` files
* Update the public barrel [`index.ts`] when adding ngrx to a library
* Use `StoreModule.forFeature()` when adding ngrx feature (without using the `--root` option)
* Use the Effect to respond tp `load<Feature>$` and dispatch `<Feature>Loaded` or `<Feature>LoadError`
* Update the Action to export `<feature>Actions` map of all action classes
* fix `ng-add.test.ts` tests for latest Angular CLI scaffolding
* fix `application.spec.ts` expect fails

Fixes #472,  Fixes #618,  Fixes #317,  Fixes #561, Refs #380.
2018-07-21 21:13:48 -04:00
--get
a55412caae fix(schematics): fix breaking cli by installing globally via yarn 2018-07-20 12:03:14 -04:00
Jason Jean
4a587e392d feat(schematics): create global karma conf 2018-07-20 12:00:05 -04:00
Victor Savkin
f4cea656d0 chore: update license 2018-07-11 12:41:12 -04:00
Leigh Caplan
d38700ead7 refactor(nx): simplify DataPersistence methods 2018-07-09 11:35:42 -04:00
Leigh Caplan
2fc57955cd refactor(nx): avoid double filter of navigation actions 2018-07-09 11:35:42 -04:00
Leigh Caplan
1e9871e6d7 feat(nx): Allow DataPersistence to take action streams
Currently, DataPersistence methods such as `fetch` and
`optimisticUpdate` take a string as their first argument,
which they use to filter incoming action types. This can
lead to inflexibility in certain cases, such as when
you want to filter the action stream before it gets to
the DataPersistence handler, or when you want to handle
multiple action types with the same effect (as suggested
by Mike Ryan in his "Good Action Hygiene with NgRx talk:
https://www.youtube.com/watch?v=JmnsEvoy-gY)

This PR refactors `optimisticUpdate`, `pessimisticUpdate`,
`fetch` and `navigation` into pipeable operators, and
implements the existing DataPersistence methods in terms
of these operators. This allows users to continue using
instance methods and strings, but enables more advanced
cases where more control over the action and state streams
is needed.
2018-07-09 11:35:42 -04:00
Jonathan Cammisuli
b960480fce feat(schematics): make sure that libs are built to their own directory 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
e3af8984e4 test(schematics): update unit tests to check new ouput path for libraries 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
560311079a feat(schematics): output built libraries to dist/lib/@scope 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
2ce49ca7ce feat(schematics) update ng-package and ng-package.prod.json 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
fecce40000 style(schematics) fix formatting on library schematic 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
5b3f0ae92b test(schematics) add tests to check if ng-package.prod.json is updated for publishable libraries 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
73d0fb21d0 feat(schematics) check to see if a library is publishable before trying to update ng-package.prod.json 2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
9ce52af41f feat(schematics) include npmScope in ng-package.prod.json
The ng-package.prod.js dest property now includes the `@npmScope`. This allows prod builds of libraries to be under the same directory
2018-07-09 11:29:27 -04:00
Jonathan Cammisuli
4916c7ce88 test(schematics): update ng-add e2e tests to check for new 'affected:libs' property 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
2a31bdb4e5 feat(schematics): add "affected:libs" to package.json when using ng add
Also use `===` for comparisons
2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
ee1eb2cf82 style(schematics): change e2e it descriptions to previous name 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
72e3eed599 style(schematics): format command-line.test.ts 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
ea15cf2a94 test(schematics): add e2e tests for building publishable libs 2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
d16caf9b66 feat(schematics): add getAffectedBuildables function
This function filters on the `build` property in project's architect
2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
3a1796a5d1 fix(schematics): update arguments to better match expectations
Changes `nx affected:libs` to print out library names. Changes `nx affected:build` to build all projects that have the `build` architype
2018-07-09 11:27:47 -04:00
Jonathan Cammisuli
7db42520a4 feat(schematics): add an option to build affected libs
`nx affected:lib --base=master` will build only libraries that were affected
2018-07-09 11:27:47 -04:00
Jason Jean
80b243eaca fix(schematics) change readme instructions to use --project 2018-06-21 18:00:08 -04:00
Victor Savkin
2403e23fe9 Release 6.1.0 2018-06-14 12:04:05 -04:00
Jason Jean
42533b1f33 fix(schematics) add nx.json to ng-new schematic 2018-06-14 12:02:44 -04:00
Jason Jean
0ad61c7acb feat(schematics): deprecate nx update 2018-06-14 12:02:29 -04:00
Victor Savkin
72f546acda fix(schematics): update migration script to update to Nx 6.1.0 2018-06-14 11:09:18 -04:00
Victor Savkin
96425833e2 fix(schematics): remove no-trailing-whitespace lint check 2018-06-14 10:42:30 -04:00