Skip to content

Latest commit

 

History

History
1317 lines (912 loc) · 87.4 KB

CHANGELOG.md

File metadata and controls

1317 lines (912 loc) · 87.4 KB

9.0.0-rc.0 (2020-03-02)

Bug Fixes

  • data: correct AppEntityServices example in ngrx data doc page (#2413) (711ba0e), closes #2280
  • example: fix a typo selectShowSidenav (#2414) (c9ebb06)

Features

9.0.0-beta.2 (2020-02-25)

Bug Fixes

  • docs: replace duplicate link (#2399) (d4502b4)
  • effects: use source instance for ngrxOnRunEffects to retain context (#2401) (79c830c)

Features

9.0.0-beta.1 (2020-02-18)

Bug Fixes

  • data: Angular 9 style ModuleWithProvider (#2356) (#2357) (182f140)
  • data: change type of filter observable (#2349) (94f3ef1), closes #2337
  • data: EntityDataModuleWithoutEffect ModuleWithProviders (#2366) (234ce84)
  • data: make mergeServerUpserts change state immutably (#2374) (#2389) (b3a49c1)
  • data: make undoMany remove tracking changes in changeState (#2346) (#2352) (637b2c7)
  • data: use ng_package for bundling instead of pkg_npm (9a935b1)
  • effects: dispatch OnInitEffects action after registration (#2386) (daf1e64), closes #2373
  • store: provide the same instance of MockStore (#2381) (827f336), closes #2362

Features

  • effects: limit retries to 10 by default (#2376) (88124a7), closes #2303
  • store: add strictActionWithinNgZone runtime check (#2364) (4cae255), closes #2339
  • store: testing - clean up mock store and remove static property (#2361) (ee2c114)

9.0.0-beta.0 (2020-02-06)

Bug Fixes

  • data: allow additional selectors in entitySelectors$ (#2332) (900bf75)
  • effects: dispatch init action once (#2164) (a528320), closes #2106
  • effects: fix specs for ng-add tests (#2314) (98d6606)
  • schematics: migrate spec to skipTest to be in line with Angular CLI (#2253) (714ae5f), closes #2242
  • store: add not allowed check to action creator config (#2313) (f6336d5)
  • store: allow union of types in props (#2301) (33241cb)
  • store: replace Creator with ActionCreator on createAction (#2299) (fe6bfa7)

Chores

Code Refactoring

Features

  • component: initial setup (#2257) (b8a769a)
  • docs: add presskit page (#2296) (9ac1165), closes #2293
  • effects: add migration for breaking change that renames effects error handler config key (#2335) (93b4081)
  • effects: make resubscription handler overridable (#2295) (3a9ad63), closes #2294
  • entity: deprecate addAll and rename it to setAll (#2348) (27f5059), closes #2330
  • router: enabling MinimalRouterStateSerializer by default (#2326) (ba37ad8), closes #2225
  • router-store: add migration to add the default serializer (#2291) (b742a8c)
  • schematics: update creators to the default (6149753)
  • store: add default generic type to Store and MockStore (#2325) (09daeb9)
  • store: ignore actions from NgRx libraries in runtime checks (#2351) (0dabfc4)
  • update to Angular 9-rc.13 (#2345) (d7fdf7f)
  • store: add clearResult to reset a mock selector (#2270) (803295b), closes #2244
  • store: compile time errors when action creators being passed to dispatch without () (#2306) (98b74ad)
  • store: enable immutability checks by default (#2266) (1758d34), closes #2217
  • store: testing - expose MockStore provider (#2331) (ef5cd5f), closes #2328

BREAKING CHANGES

  • router: The MinimalRouterStateSerializer is enabled by default.

BEFORE:

If no router state serializer is provided through the configuration of router store, the DefaultRouterStateSerializer is used.

AFTER:

If no router state serializer is provided through the configuration of router store, the MinimalRouterStateSerializer is used.

  • effects: resubscribeOnError renamed to useEffectsErrorHandler in createEffect metadata

BEFORE:

class MyEffects {
  effect$ = createEffect(() => stream$, {
    resubscribeOnError: true, // default
  });
}

AFTER:

class MyEffects {
  effect$ = createEffect(() => stream$, {
    useEffectsErrorHandler: true, // default
  });
}
  • effects: BEFORE:

When the effect class was registered, the init action would be dispatched. If the effect was provided in multiple lazy loaded modules, the init action would be dispatched for every module.

AFTER:

The init action is only dispatched once The init action is now dispatched based on the identifier of the effect (via ngrxOnIdentifyEffects)

  • schematics: To be inline with the Angular CLI, we migrated the --spec to --skipTest. By default skipTest is false, this way you will always be provided with *.spec.ts files

BEFORE:

ng generate action User --spec

AFTER:

ng generate action User
  • store: BEFORE:

Using mockSelector.setResult(undefined) resulted in clearing the return value.

AFTER:

Using mockSelector.setResult(undefined) will set the return value of the selector to undefined. To reset the mock selector, use mockSelector.clearResult().

  • schematics: To be inline with the Angular CLI, the styleExt option has been changed to style.

BEFORE:

"@schematics/angular:component": {
      "inlineStyle": true,
      "prefix": "aio",
      "styleext": "scss"
    }
...

AFTER:

"@schematics/angular:component": {
      "inlineStyle": true,
      "prefix": "aio",
      "style": "scss"
    }
....
  • store: Immutability checks are enabled by default.

BEFORE:

Immutability checks are opt-in.

AFTER:

If state or action is mutated then there will be a run time exception thrown.

  • schematics: With this change by default the minimal setup for @ngrx/store will be generated.

BEFORE:

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    StoreModule.forRoot(reducers, {
      metaReducers,
      runtimeChecks: {
        strictStateImmutability: true,
        strictActionImmutability: true
      }
    }),
    .....
  ],
  providers: [],
  bootstrap: [AppComponent]
})

AFTER:

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    StoreModule.forRoot({})
    ....
  ],
  providers: [],
  bootstrap: [AppComponent]
})
  • schematics: BEFORE:

The create functions weren't the default to create actions, reducers and effects

AFTER:

The create functions are the default to create actions (createAction, reducers (createReducer) and effects (createEffect) To fallback to the previous generators, use

sh ng generate reducer ReducerName --creators=false

  • Libraries will depend on Angular version 9

8.6.0 (2019-12-18)

Features

  • router-store: add action creator for root router actions (#2272) (f17589f), closes #2206

8.5.2 (2019-11-21)

Bug Fixes

  • effects: add EffectsRootModule and EffectsFeatureModule to public API (#2273) (abe1f6b)
  • store: added noop for addFeature in MockReducerManager (#2265) (c42e444), closes #2263
  • store-devtools: escaping the safelist and blocklist strings (#2259) (e888977), closes #2228

8.5.1 (2019-11-12)

Bug Fixes

8.5.0 (2019-11-07)

Bug Fixes

Features

  • data: add entity config in app module declaration for ng-add (#2133) (6ca3056)
  • effects: createEffect returns specific type for dispatch false (#2195) (f70600f)
  • effects: improve types for ofType with action creators (#2175) (cf02dd2)
  • schematics: add message prompts for individual schematics (#2143) (fcb01e2)
  • schematics: add selector schematics (#2160) (78817c7), closes #2140
  • store: add On interface to public api (#2157) (1b4ba1a)

8.4.0 (2019-10-09)

Bug Fixes

  • schematics: fixed the schematics/action spec template (#2092) (ed3b1f9), closes #2082
  • store: improve consistency of memoized selector result when projection fails (#2101) (c63941c), closes #2100

Features

  • effects: throw error when forRoot() is used more than once (b46748c)
  • schematics: add createEffect migration schematic (#2136) (9eb1bd5)
  • store: add refreshState method to mock store (#2148) (30e876f), closes #2121
  • store: allow multiple on handlers for the same action in createReducer(#2103) (9a70262), closes #1956
  • store: cleanup selector after a test (2964e2b)
  • store: throw error when forRoot() is used more than once (4304865)

8.3.0 (2019-08-29)

Bug Fixes

  • data: use correct guard when handling optimistic update (#2060) (34c0420), closes #2059
  • store: add DefaultProjectorFn to public API (#2090) (2d37b48)
  • store: should not run schematics when not using named imports (#2095) (7cadbc0), closes #2093

Features

  • store: add verbose error message for undefined feature state in development mode (#2078) (6946e2e), closes #1897

8.2.0 (2019-07-31)

Bug Fixes

Features

  • docs: enable search functionality (#2020) (3cc4f3d)
  • router-store: add selectQueryParam and selectRouteParam (#2014) (57fd3d7)
  • schematics: add option to use MockStore in container tests (#2029) (6905d52), closes #2028
  • store: add USER_RUNTIME_CHECKS public token (#2006) (fa8da34), closes #1973

8.1.0 (2019-07-09)

Bug Fixes

  • data: allow ChangeSetItemFactory to update entities with number ids (#1995) (f11c7b2), closes #1988
  • data: search for replacements in all files when using ng-add (#1971) (30ce2c6)
  • store: add immutability check for IE compatibility (#1997) (11c0864), closes #1991
  • store: fix typo in runtime checks injection token description (#1975) (125d950), closes #1972

Features

  • effects: add support for minimal setup option for ng-add (e839568)
  • effects: export EffectConfig and add docs (6a4bbcf)
  • schematics: add support for minimal setup option for store and effects (cede393)
  • schematics: enable immutability checks for root store by default (#1983) (2b8178d), closes #1950
  • store: add support for minimal setup option for ng-add (12202a7)

8.0.1 (2019-06-10)

Bug Fixes

  • store: prevent passing of action creator function to store dispatch and effects (#1914) (78153cb), closes #1906

8.0.0 (2019-06-06)

Features

Performance Improvements

  • fine tune schematics to only commit changes (#1925) (5fcdd3b)

8.0.0-rc.1 (2019-06-04)

Bug Fixes

  • router-store: remove circular dependency in serializers (#1904) (0407c5b), closes #1902

Features

8.0.0-rc.0 (2019-05-30)

Bug Fixes

  • update signature for createSelectorFactory and createSelector to return a MemoizedSelector (#1883) (8b31da7)
  • store: adjust mock store to handle selectors with props (#1878) (a7ded00), closes #1864 #1873

Features

  • effects: resubscribe to effects on error (#1881) (71137e5)
  • example: add examples of effects not based on the Actions stream (#1845) (3454e70), closes #1830
  • router-store: add routerState config option (#1847) (d874cfc), closes #1834
  • router-store: add selectors for router state (#1874) (21c67cc), closes #1854
  • store: split immutibility checks in state and action checks (#1894) (c59c211)

Reverts

BREAKING CHANGES

  • effects: Prior to introduction of automatic resubscriptions on errors, all effects had effectively {resubscribeOnError: false} behavior. For the rare cases when this is still wanted please add {resubscribeOnError: false} to the effect metadata.

BEFORE:

login$ = createEffect(() =>
  this.actions$.pipe(
    ofType(LoginPageActions.login),
    mapToAction(
      // Happy path callback
      action =>
        this.authService
          .login(action.credentials)
          .pipe(map(user => AuthApiActions.loginSuccess({ user }))),
      // error callback
      error => AuthApiActions.loginFailure({ error })
    )
  )
);

AFTER:

login$ = createEffect(
  () =>
    this.actions$.pipe(
      ofType(LoginPageActions.login),
      mapToAction(
        // Happy path callback
        action =>
          this.authService
            .login(action.credentials)
            .pipe(map(user => AuthApiActions.loginSuccess({ user }))),
        // error callback
        error => AuthApiActions.loginFailure({ error })
      )
      // Errors are handled and it is safe to disable resubscription
    ),
  { resubscribeOnError: false }
);
  • The return type of the createSelectorFactory and createSelector is now a MemoizedSelector instead of a Selector

8.0.0-beta.2 (2019-05-15)

Bug Fixes

  • data: update the package name for replacement to ngrx-data (#1805) (00c00e0), closes #1802
  • example: resolve circular dependency (#1833) (1fbd59c)

Features

  • effects: add mapToAction operator (#1822) (1ff986f), closes #1224
  • store: add option to mock selectors in MockStoreConfig (#1836) (070228c), closes #1827
  • store: expand createReducer type signature to support up to ten action creators (#1803) (63e4926)
  • store: warn when same action is registered (#1801) (ecda5f7), closes #1758

Reverts

8.0.0-beta.1 (2019-04-24)

Features

8.0.0-beta.0 (2019-04-17)

Bug Fixes

  • effects: add the export of EffectMetadata (#1720) (214316f)
  • example: handle possible undefined results from Dictionary (#1745) (861b0cb), closes #1735
  • schematics: check for empty name when using store schematic for feature states (#1659) (#1666) (3b9b890)
  • store: add the missing bracket in immutability meta-reducer (#1721) (56f8a59)
  • Store: selector with only a projector (#1579) (da1ec80), closes #1558
  • StoreDevTools: rename action list filters (#1589) (5581826), closes #1557

Code Refactoring

Features

BREAKING CHANGES

  • entity: Dictionary could be producing undefined but previous typings were not explicit about it.
  • Store: Internal functions and tokens are removed from the public API
  • router-store: usage of forRoot is now required for StoreRouterConnectingModule

BEFORE:

@NgModule({
  imports: [StoreRouterConnectingModule],
})
export class AppModule {}

AFTER:

@NgModule({
  imports: [StoreRouterConnectingModule.forRoot()],
})
export class AppModule {}
  • Store: Selectors with only a projector function aren't valid anymore. This change will make the usage more consistent.

BEFORE:

const getTodosById = createSelector(
  (state: TodoAppSchema, id: number) => state.todos.find(p => p.id === id)
);

AFTER:

const getTodosById = createSelector(
  (state: TodoAppSchema) => state.todos,
  (todos: Todo[], id: number) => todos.find(p => p.id === id)
);
  • StoreDevTools: actionsWhitelist is renamed to actionsSafelist actionsBlacklist is renamed to actionsBlocklist

BEFORE:

StoreDevtoolsModule.instrument({
  actionsWhitelist: ['...'],
  actionsBlacklist: ['...'],
});

AFTER:

StoreDevtoolsModule.instrument({
  actionsSafelist: ['...'],
  actionsBlocklist: ['...'],
});

7.4.0 (2019-03-29)

Bug Fixes

Features

7.3.0 (2019-02-27)

Bug Fixes

  • schematics: type actions and avoid endless loop in effect schematic (#1576) (5fbcb3c), closes #1573
  • store: deprecate signature for selector with only a projector (#1580) (e86c5f6)

Features

  • schematics: Add ng-add support with prompt for making our schematics default (#1552) (01ff157)

7.2.0 (2019-01-29)

Bug Fixes

  • Entity: add schematics to bazel build (88d0ad5)
  • RouterStore: add schematics to bazel build (7465af9)
  • StoreDevTools: out of bounds when actions are filtered (#1532) (d532979), closes #1522

Features

  • schematics: add api success/failure effects/actions to ng generate feature (#1530) (e17a787)
  • schematics: bump platformVersion to ^7.0.0 per issue #1489 (#1527) (a71aa71)

7.1.0 (2019-01-21)

Bug Fixes

  • store: call metareducer with the user's config initial state (#1498) (2aabe0f), closes #1464
  • store: don't call the projector function if there are no selectors and props (#1515) (e0ad3c3), closes #1501

Features

7.0.0 (2018-12-20)

Features

  • Effects: add OnInitEffects interface to dispatch an action on initialization (e921cd9)
  • RouterStore: make the router store key selector generic (a30a514), closes #1457
  • schematics: add project flag support to specify apps or libs (#1477) (af39fd2), closes #1455

Reverts

  • Effects: dispatch init feature effects action on init #1305 (e9cc9ae)

7.0.0-beta.1 (2018-12-04)

Features

  • effects: add OnIdentifyEffects interface to register multiple effect instances (#1448) (b553ce7)
  • store-devtools: catch and log redux devtools errors (#1450) (4ed16cd)

7.0.0-beta.0 (2018-11-03)

Bug Fixes

  • docs-infra: ARIA roles used must conform to valid values (8a4b2de)
  • docs-infra: elements must have sufficient color contrast (c5dfaef)
  • docs-infra: html element must have a lang attribute (32256de)
  • docs-infra: Images must have alternate text (8241f99)
  • docs-infra: notification must have sufficient color contrast (ac24cc3)
  • example: close side nav when escape key is pressed (#1244) (b3fc5dd), closes #1172
  • router-store: Added new imports to index.ts, codestyle (293f960)
  • router-store: allow compilation with strictFunctionTypes (#1385) (0e38673), closes #1344
  • router-store: Avoiding @ngrx/effects dependency inside tests (11d3b9f)
  • router-store: handle internal navigation error, dispatch cancel/error action with previous state (#1294) (5300e7d)
  • schematics: correct spec description in reducer template (#1269) (b7ab4f8)
  • schematics: fix effects code generated by schematics:feature (#1357) (458e2b4)
  • store: add typing to allow props with store.select (#1387) (a9e7cbd)
  • store: memoize selector arguments (#1393) (7cc9702), closes #1389
  • store: remove deprecation from Store.select (#1382) (626784e)

Code Refactoring

Features

  • update angular dependencies to V7 (e6048bd), closes #1340
  • effects: add smarter type inference for ofType operator. (#1183) (8d56a6f)
  • effects: add support for effects of different instances of same class (#1249) (518e561), closes #1246
  • effects: dispatch feature effects action on init (#1305) (15a4b58), closes #683
  • entity: add support for predicate to removeMany (#900) (d7daa2f)
  • entity: add support for predicate to updateMany (#907) (4e4c50f)
  • example: add logout confirmation (#1287) (ba8d300), closes #1271
  • router-store: Add custom serializer to config object (5c814a9), closes #1262
  • router-store: Add support for serializers with injected values (959cfac)
  • router-store: config option to dispatch ROUTER_NAVIGATION later (fe71ffb), closes #1263
  • router-store: New router Actions ROUTER_REQUEST and ROUTER_NAVIGATED (9f731c3), closes #1010 #1263
  • router-store: serialize routeConfig inside the default serializer (#1384) (18a16d4)
  • router-store: update stateKey definition to take a string or selector (4ad9a94), closes #1300
  • store: add testing package (#1027) (ab56aac), closes #915
  • store: dispatch one update action when features are added or removed (#1240) (0b90f91)
  • Store: export SelectorWithProps and MemoizedSelectorWithProps (#1341) (df8fc60)
  • store-devtools: add support for persist, lock, pause (#955) (93fcf56), closes #853 #919
  • store-devtools: use different action when recomputing state history (#1353) (1448a0e), closes #1255
  • StoreDevtools: implement actionsBlacklist/Whitelist & predicate (#970) (7ee46d2), closes #938

BREAKING CHANGES

  • router-store: The default router serializer now returns a null value for routeConfig when routeConfig doesn't exist on the ActivatedRouteSnapshot instead of an empty object.

BEFORE:

{
  "routeConfig": {}
}

AFTER:

{
  "routeConfig": null
}
  • effects: Removes .ofType method on Actions. Instead use the provided 'ofType' rxjs operator.

BEFORE:

this.actions.ofType('INCREMENT')

AFTER:

import { ofType } from '@ngrx/store';
...
this.action.pipe(ofType('INCREMENT'))
  • RouterStore: Normalize router store actions to be consistent with the other modules

BEFORE:

  • ROUTER_REQUEST
  • ROUTER_NAVIGATION
  • ROUTER_CANCEL
  • ROUTER_ERROR
  • ROUTER_NAVIGATED

AFTER

  • @ngrx/router-store/request
  • @ngrx/router-store/navigation
  • @ngrx/router-store/cancel
  • @ngrx/router-store/error
  • @ngrx/router-store/navigated
  • router-store: StoreRouterConfigFunction is removed. It is no longer possible to pass a function returning a StoreRouterConfig to StoreRouterConnectingModule.forRoot

If you still need this, pass a provider like this: { provide: ROUTER_CONFIG, useFactory: _createRouterConfig // you function }

  • routerstore: The default state key is changed from routerReducer to router
  • store: BEFORE:
{type: '@ngrx/store/update-reducers', feature: 'feature1'}
{type: '@ngrx/store/update-reducers', feature: 'feature2'}

AFTER:

{type: '@ngrx/store/update-reducers', features: ['feature1',
'feature2']}

6.1.0 (2018-08-02)

Bug Fixes

  • effects: Add deprecation notice for ofType instance operator (830c8fa)
  • Effects: Added defaults for ng-add schematic (9d36016)
  • example: adjust styles to display spinner correctly (#1203) (4a0b580)
  • example: remove custom router state serializer (#1129) (389cd78)
  • schematics: correct a type of action class generated (#1140) (bbb7e8c)
  • schematics: exclude environment imports for libraries (#1213) (541de02), closes #1205 #1197
  • schematics: Remove peer dependencies on Angular DevKit (#1222) (fd3da16), closes #1206
  • Schematics: correct resolution of environments path for module (#1094) (d24ed10), closes #1090
  • store: Add deprecation notice for select instance operator (232ca7a)
  • store: Compare results in addition to arguments change in memoizer (#1175) (99e1313)
  • Store: bootstrap store with partial initial state (#1163) (11bd465), closes #906 #909
  • Store: Fix import bug with ng-add and added defaults (ff7dc72)

Features

  • effects: stringify action when reporting as invalid (#1219) (73d32eb)
  • entity: log a warning message when selectId returns undefined in dev mode (#1169) (8f05f1f), closes #1133
  • Entity: expose Dictionary as part of the public API (#1118) (2a267b6), closes #865
  • schematics: display provided path when displaying an error (#1208) (91cc6ed), closes #1200
  • schematics: use ofType operator function instead of Actions#ofType (#1154) (cb58ff1)
  • store: add an overload to createFeatureSelector to provide better type checking (#1171) (03db76f), closes #1136
  • store: provide props to createSelector projector function (#1210) (b1f9b34)
  • Store: createSelector allow props in selector (53832a1)
  • Store: createSelector with only a props selector (35a4848)
  • StoreDevtools: Add ng-add support (be28d8d)
  • StoreDevtools: Allow custom serializer options (#1121) (55a0488)

Performance Improvements

  • Effects: remove path filters in ng-add (5318913)
  • Schematics: remove path filters in effects schematics (6d3f5a1)
  • Schematics: remove path filters in reducer schematics (055f6ef)
  • Schematics: remove path filters in store schematics (762cf2e)
  • Store: remove path filters in ng-add (ec6adb5)
  • StoreDevtools: remove path filters in ng-add (3ba463f)

6.0.1 (2018-05-23)

6.0.0 (2018-05-23)

Bug Fixes

  • Schematics: remove ts extension when importing reducer in container (#1061) (d1ed9e5), closes #1056
  • Schematics: Update parsed path logic to split path and name (a1e9530), closes #1064
  • Store: Resolve environment path when generating a new store (#1071) (599cfb6)

Features

  • implement ng add for store and effects packages (db94db7)

6.0.0-beta.3 (2018-05-12)

Bug Fixes

6.0.0-beta.2 (2018-05-11)

Bug Fixes

  • build: Fix UMD global names (#1005) (413efd4), closes #1004
  • RouterStore: Reset dispatch-tracking booleans after navigation end (#968) (48305aa)
  • Schematics: Add check for app/lib to project helper function (5942885)
  • Schematics: Add smart default to blueprint schemas (cdd247e)
  • Schematics: Remove aliases for state and stateInterface options (f4520a2)
  • Schematics: Update upsert actions for entity blueprint (#1042) (0d1d309), closes #1039
  • Schematics: Upgrade schematics to new CLI structure (b99d9ff)
  • Store: Fix type annotations for select methods (#953) (4d74bd2)
  • StoreDevtools: Refresh devtools when extension is started (#1017) (c6e33d9), closes #508
  • Update minimum node version to 8.9.0 (#989) (0baaad8)

Features

BREAKING CHANGES

  • Schematics: The action blueprint has been updated to be less generic, with associated reducer and effects updated for the feature blueprint

BEFORE:

export enum UserActionTypes { UserAction = '[User] Action' }

export class User implements Action { readonly type = UserActionTypes.UserAction; }

export type UserActions = User;

AFTER:

export enum UserActionTypes { LoadUsers = '[User] Load Users' }

export class LoadUsers implements Action { readonly type = UserActionTypes.LoadUsers; }

export type UserActions = LoadUsers;

  • Schematics: Aliases for state and stateInterface were removed due to conflicts with component aliases without reasonable alternatives.
  • Schematics: Minimum dependency for @ngrx/schematics has changed:

@angular-devkit/core: ^0.5.0 @angular-devkit/schematics: ^0.5.0

6.0.0-beta.1 (2018-04-02)

Bug Fixes

  • Declare global NgRx packages for UMD bundles (#952) (ba2139d), closes #949

6.0.0-beta.0 (2018-03-31)

Bug Fixes

  • Entity: Change EntityAdapter upsertOne/upsertMany to accept an entity (a0f45ff)
  • RouterStore: Allow strict mode with router reducer (#903) (f17a032)
  • RouterStore: change the default serializer to work around cycles in RouterStateSnapshot (7917a27)
  • RouterStore: Replace RouterStateSnapshot with SerializedRouterStateSnapshot (bd415a1)
  • StoreDevtools: pass timestamp to actions (df2411f)
  • StoreDevtools: report errors to ErrorHandler instead of console (32df3f0)
  • Add support for Angular 6 and RxJS 6 (d1286d2)

Features

BREAKING CHANGES

  • StoreDevtools: Errors in reducers are no longer hidden from ErrorHandler by StoreDevtools

BEFORE:

Errors in reducers are caught by StoreDevtools and logged to the console

AFTER:

Errors in reducers are reported to ErrorHandler

  • Schematcis: NgRx Schematics now has a minimum version dependency on @angular-devkit/core and @angular-devkit/schematics of v0.4.0.
  • RouterStore: Default router state is serialized to a shape that removes cycles

BEFORE:

Full RouterStateSnapshot is returned

AFTER:

Router state snapshot is returned as a SerializedRouterStateSnapshot with cyclical dependencies removed

  • Entity: The signature of the upsertOne/upsertMany functions in the EntityAdapter has been changed to accept a fully qualified entity instead of an update object that implements the Update interface.

    Before:

    entityAdapter.upsertOne({
      id: 'Entity ID',
      changes: { id: 'Entity ID', name: 'Entity Name' },
    }, state);
    

    After:

    entityAdapter.upsertOne({
      id: 'Entity ID',
      name: 'Entity Name',
    }, state);
    
  • NgRx now has a minimum version requirement on Angular 6 and RxJS 6.

5.2.0 (2018-03-07)

Bug Fixes

  • Schematics: Correct usage of upsert actions for entity blueprint (#821) (1ffb5a9)
  • Store: only default to initialValue when store value is undefined (#886) (51a1547)
  • StoreDevtools: Fix bug when exporting/importing state history (#855) (a5dcdb1)
  • StoreDevtools: Recompute state history when reducers are updated (#844) (10debcc)

Features

  • Entity: Add 'selectId' and 'sortComparer' to state adapter (#889) (69a62f2)
  • Store: Added feature name to Update Reducers action (730361e)

5.1.0 (2018-02-13)

Bug Fixes

  • Devtools: Ensure Store is loaded eagerly (#801) (ecf1ebf), closes #624 #741
  • Effects: Make ofType operator strictFunctionTypes safe (#789) (c8560e4), closes #753
  • Entity: Avoid for..in iteration in sorted state adapter (#805) (4192645)
  • Entity: Do not add Array.prototype properties to store (#782) (d537758), closes #781
  • Entity: Properly iterate over array in upsert (#802) (779d689)
  • Schematics: Add store import to container blueprint (#763) (a140fa9), closes #760
  • Schematics: Remove extra braces from constructor for container blueprint (#791) (945bf40), closes #778
  • Schematics: Use correct paths for nested and grouped feature blueprint (#756) (c219770)
  • StoreDevtools: Add internal support for ActionSanitizer and StateSanitizer (#795) (a7de2a6)
  • StoreDevtools: Do not send full liftedState for application actions (#790) (c11504f)

Features

  • Entity: Add upsertOne and upsertMany functions to entity adapters (#780) (f871540), closes #421
  • Schematics: Add group option to entity blueprint (#792) (0429276), closes #779
  • Schematics: Add upsert methods to entity blueprint (#809) (7acdc79), closes #592

5.0.1 (2018-01-25)

Bug Fixes

  • Effects: Provide instance from actions to ofType lettable operator (#751) (33d48e7), closes #739

5.0.0 (2018-01-22)

Bug Fixes

  • Effects: Ensure Store modules are loaded eagerly (#658) (0a3398d), closes #642
  • Effects: Remove toPayload utility function (#738) (b390ef5)
  • Entity: updateOne/updateMany should not change ids state on existing entity (#581) (b989e4b), closes #571
  • RouterStore: Fix usage of config object if provided (#575) (4125914)
  • RouterStore: Match RouterAction type parameters (#562) (980a653)
  • Schematics: Add group folder after feature name folder (#737) (317fb94)
  • Schematics: Add handling of flat option to entity blueprint (fb8d2c6)
  • Schematics: Distinguish between root and feature effect arrays when registering (#718) (95ff6c8)
  • Schematics: Don't add state import if not provided (#697) (e5c2aed)
  • Schematics: Make variable naming consistent for entity blueprint (#716) (765b15a)
  • Store: Compose provided metareducers for a feature reducer (#704) (1454620), closes #701
  • StoreDevtools: Only recompute current state when reducers are updated (#570) (247ae1a), closes #229 #487
  • typo: update login error to use correct css font color property (41723fc)

Features

  • Effects: Add lettable ofType operator (d5e1814)
  • ErrorHandler: Use the Angular ErrorHandler for reporting errors (#667) (8f297d1), closes #626
  • material: Upgrade @angular/material to v 2.0.0-beta.12 (#482) (aedf20e), closes #448
  • Schematics: Add alias for container, store and action blueprints (#685) (dc64ac9)
  • Schematics: Add alias for reducer blueprint (#684) (ea98fb7)
  • Schematics: Add effect to registered effects array (#717) (f1082fe)
  • Schematics: Add option to group feature blueprints in respective folders (#736) (b82c35d)
  • Schematics: Introduce @ngrx/schematics (#631) (1837dba), closes #53
  • Store: Add lettable select operator (77eed24)
  • Store: Add support for generating custom createSelector functions (#734) (cb0d185), closes #478 #724
  • StoreDevtools: Add option to configure extension in log-only mode (#712) (1ecd658), closes #643 #374
  • StoreDevtools: Add support for custom instance name (#517) (00be3d1), closes #463
  • StoreDevtools: Add support for extension sanitizers (#544) (6ed92b0), closes #494
  • StoreDevtools: Add support for jumping to a specific action (#703) (b9f6442), closes #681

BREAKING CHANGES

  • Effects: The utility function toPayload, deprecated in @ngrx/effects v4.0, has been removed.

    Before:

    import { toPayload } from '@ngrx/effects';
    
    actions$.ofType('SOME_ACTION').map(toPayload);

    After:

    actions$
      .ofType('SOME_ACTION')
      .map((action: SomeActionWithPayload) => action.payload);
  • ErrorHandler: The ErrorReporter has been replaced with ErrorHandler from angular/core.

BEFORE:

Errors were reported to the ngrx/effects ErrorReporter. The ErrorReporter would log to the console by default.

AFTER:

Errors are now reported to the @angular/core ErrorHandler.

  • Store: Updates minimum version of RxJS dependency.

BEFORE:

Minimum peer dependency of RxJS ^5.0.0

AFTER:

Minimum peer dependency of RxJS ^5.5.0

  • Effects: Updates minimum version of RxJS dependency.

BEFORE:

Minimum peer dependency of RxJS ^5.0.0

AFTER:

Minimum peer dependency of RxJS ^5.5.0

4.1.1 (2017-11-07)

Bug Fixes

Features

  • Codegen: Add base code and build for @ngrx/codegen (#534) (2a22211)
  • RouterStore: Add configurable option for router reducer name (#417) (ab7de5c), closes #410

4.1.0 (2017-10-19)

Bug Fixes

  • Build: Fix build with space in path (#331) (257fc9d)
  • combineSelectors: Remove default parameter from function signature for Closure (ae7d5e1)
  • decorator: add ExportDecoratedItems jsdoc for g3 (#456) (2b0e0cf)
  • Effects: Simplify decorator handling for Closure compatibility (ad30d40)
  • Entity: Change type for EntityState to interface (#454) (d5640ec), closes #458
  • Example: Add missing import for catch operator (#409) (193e8b3)
  • RouterStore: Fix cancelled navigation with async guard (fixes #354) (#355) (920c0ba), closes #201
  • RouterStore: Stringify error from navigation error event (#357) (0528d2d), closes #356
  • Store: Fix typing for feature to accept InjectionToken (#375) (38b2f95)
  • Store: Refactor parameter initialization in combineReducers for Closure (5c60cba)
  • Store: Set initial value for state action pair to object (#480) (100a8ef), closes #477

Features

  • createSelector: Expose projector function on selectors to improve testability (56cb21f), closes #290
  • Effects: Add getEffectsMetadata() helper for verifying metadata (628b865), closes #491
  • Effects: Add root effects init action (#473) (838ba17), closes #246
  • Entity: Add default selectId function for EntityAdapter (#405) (2afb792)
  • Entity: Add support for string or number type for ID (#441) (46d6f2f)
  • Entity: Enable creating entity selectors without composing a state selector (#490) (aae4064)
  • Entity: Rename 'sort' to 'sortComparer' (274554b), closes #370
  • Store: createSelector with an array of selectors (#340) (2f6a035), closes #192

4.0.5 (2017-08-18)

Bug Fixes

  • Effects: Do not complete effects if one source errors or completes (#297) (54747cf), closes #232
  • Entity: Return a referentially equal state if state did not change (fbd6a66)
  • Entity: Simplify target index finder for sorted entities (335d255)

4.0.4 (2017-08-17)

Bug Fixes

  • Effects: Use factory provide for console (#288) (bf7f70c), closes #276
  • RouterStore: Add generic type to RouterReducerState (#292) (6da3ec5), closes #289
  • RouterStore: Only serialize snapshot in preactivation hook (#287) (bbb7c99), closes #286

4.0.3 (2017-08-16)

Bug Fixes

  • Effects: Deprecate toPayload utility function (#266) (1cbb2c9)
  • Effects: Ensure StoreModule is loaded before effects (#230) (065d33e), closes #184 #219
  • Effects: Export EffectsNotification interface (#231) (2b1a076)
  • Store: Add type signature for metareducer (#270) (57633d2), closes #264 #170
  • Store: Set initial state for feature modules (#235) (4aec80c), closes #206 #233
  • Store: Update usage of compose for reducer factory (#252) (683013c), closes #247
  • Store: Use existing reducers when providing reducers without an InjectionToken (#254) (c409252), closes #250 #116
  • Store: Use injector to get reducers provided via InjectionTokens (#259) (bd968fa), closes #189

Features

4.0.2 (2017-08-02)

Bug Fixes

  • createSelector: memoize projector function (#228) (e2f1e57), closes #226
  • docs: update angular-cli variable (eeb7d5d)
  • Docs: update effects description (#164) (c77b2d9)
  • Effects: Wrap testing source in an Actions observable (#121) (bfdb83b), closes #117
  • RouterStore: Add support for cancellation with CanLoad guard (#223) (2c006e8), closes #213
  • Store: Remove auto-memoization of selector functions (90899f7), closes #118

Features

  • Effects: Add generic type to the "ofType" operator (55c13b2)
  • Platform: Introduce @ngrx/entity (#207) (9bdfd70)
  • Store: Add injection token option for feature modules (#153) (7f77693), closes #116 #141 #147
  • Store: Added initial state function support for features. Added more tests (#85) (5e5d7dd)

4.0.1 (2017-07-18)

Bug Fixes

  • effects: allow downleveled annotations (#98) (875b326), closes #93
  • effects: make correct export path for testing module (#96) (a5aad22), closes #94

4.0.0 (2017-07-18)

Bug Fixes

  • build: Fixed deployment of latest master as commit (#18) (5d0ecf9)
  • build: Get tests running for each project (c4a1054)
  • build: Limit concurrency for lerna bootstrap (7e7a7d8)
  • Devtools: Removed SHOULD_INSTRUMENT token used to eagerly inject providers (#57) (b90df34)
  • Effects: Start child effects after running root effects (#43) (931adb1)
  • Effects: Use Actions generic type for the return of the ofType operator (d176a11)
  • Example: Fix Book State interface parent (#90) (6982952)
  • example-app: Suppress StoreDevtoolsConfig compiler warning (8804156)
  • omit: Strengthen the type checking of the omit utility function (3982038)
  • router-store: NavigationCancel and NavigationError creates a cycle when used with routerReducer (a085730), closes #68
  • Store: Exported initial state tokens (#65) (4b27b6d)
  • Store: pass all required arguments to projector (#74) (9b82b3a)
  • Store: Remove parameter destructuring for strict mode (#33) (#77) (c9d6a45)
  • Store: Removed readonly from type (#72) (68274c9)
  • StoreDevtools: Type InjectionToken for AOT compilation (e21d688)

Code Refactoring

  • Effects: Simplified AP, added better error reporting and effects stream control (015107f)

Features

  • build: Updated build pipeline for modules (68bd9df)
  • Effects: Ensure effects are only subscribed to once (089abdc)
  • Effects: Introduce new Effects testing module (#70) (7dbb571)
  • router-store: Added action types (#47) (1f67cb3), closes #44
  • store: Add 'createSelector' and 'createFeatureSelector' utils (#10) (41758b1)
  • Store: Allow initial state function for AoT compatibility (#59) (1a166ec), closes #51
  • Store: Allow parent modules to provide reducers with tokens (#36) (069b12f), closes #34
  • Store: Simplify API for adding meta-reducers (#87) (d2295c7)

BREAKING CHANGES

  • Effects: Effects API for registering effects has been updated to allow for multiple classes to be provided.

BEFORE:

@NgModule({
  imports: [EffectsModule.run(SourceA), EffectsModule.run(SourceB)],
})
export class AppModule {}

AFTER:

@NgModule({
  imports: [EffectsModule.forRoot([SourceA, SourceB, SourceC])],
})
export class AppModule {}

@NgModule({
  imports: [
    EffectsModule.forFeature([FeatureSourceA, FeatureSourceB, FeatureSourceC]),
  ],
})
export class SomeFeatureModule {}