17.1.0 (2024-01-16)
- eslint-plugin: only report main pipe violations (#4169) (970514e)
- signals: run
onDestroy
outside of injection context (#4200) (e21df19)
17.0.1 (2023-11-27)
- signals: allow using signalStore and signalState in TS libs (#4152) (ecc247c)
- signals: define deep signals as configurable properties (#4147) (890ca5b)
17.0.0 (2023-11-20)
- data: DefaultDataService getAll httpOptions fix + test (#4134) (213e4c9)
- signals: remove state checks for better DX (#4124) (5749543)
17.0.0-rc.0 (2023-11-10)
- signals: add
getState
function (#4118) (79b0708) - signals: add entities subpackage (#4090) (f01bcd1)
- store-devtools: add migration for connectInZone (#4106) (73fda59)
- store-devtools: change connectOutsideZone to be 'true' by default (#4103) (d3b4db0), closes #4093
17.0.0-beta.0 (2023-10-30)
- entity: set correct return type for getSelectors signature with parent selector (#4074) (b3b571e)
- signals: do not create nested signals for STATE_SIGNAL property (#4062) (71a9d7f)
- signals: improve state type and add type tests (#4064) (10c93ed), closes #4065
- component: remove
LetModule
(#4087) (f28ea71), closes #4077 - component: remove PushModule (7316d1a)
- effects: deprecate act operator (#4073) (3dbcadc)
- operators: introduce @ngrx/operators package (#4097) (e93ead4), closes #4057
- signals: remove selectSignal and rename withSignals to withComputed (#4075) (25f95bc)
- upgrade Angular dependencies to v17 pre-release versions (#4068) (3d25047)
- signals: add rxjs-interop subpackage (#4061) (fd565ed)
- component: The LetModule is removed in favor of the standalone LetDirective.
BEFORE:
import { LetModule } from '@ngrx/component';
@NgModule({ imports: [ // ... other imports LetModule, ], }) export class MyFeatureModule {}
AFTER:
import { LetDirective } from '@ngrx/component';
@NgModule({ imports: [ // ... other imports LetDirective, ], }) export class MyFeatureModule {}
- component: The
PushModule
is deprecated in favor of the standalonePushPipe
.
BEFORE:
import { PushModule } from '@ngrx/component';
@NgModule({
imports: [
// ... other imports
PushModule,
],
})
export class MyFeatureModule {}
AFTER:
import { Component } from '@angular/core';
import { PushPipe } from '@ngrx/component';
@Component({
// ... other metadata
standalone: true,
imports: [
// ... other imports
PushPipe,
],
})
export class MyStandaloneComponent {}
- entity: Selectors returned by the
adapter.getSelectors
signature that accepts a parent selector are strongly typed.
BEFORE:
const {
selectIds, // type: (state: object) => string[] | number[]
selectEntities, // type: (state: object) => Dictionary<Book>
selectAll, // type: (state: object) => Book[]
selectTotal, // type: (state: object) => number
} = adapter.getSelectors(selectBooksState);
AFTER:
const {
selectIds, // type: MemoizedSelector<object, string[] | number[]>
selectEntities, // type: MemoizedSelector<object, Dictionary<Book>>
selectAll, // type: MemoizedSelector<object, Book[]>
selectTotal, // type: MemoizedSelector<object, number>
} = adapter.getSelectors(selectBooksState);
- The minimum required version of Angular has been updated
BEFORE:
The minimum required version of Angular is 16.x
AFTER:
The minimum required version of Angular is 17.x
16.3.0 (2023-10-03)
- data: standalone support for ng add @ngrx/data (#4019) (fdd701e), closes #3935
- eslint-plugin: add avoid-combining-component-store-selectors rule (#4043) (0bff440)
- eslint-plugin: add new avoid-mapping-component-store-selectors rule (#4026) (40477dd), closes #3940
- signals: add
patchState
function and remove$update
method (#4037) (f2514ba) - signals: add signalState and selectSignal APIs (#4007) (745d91f), closes #3993
- signals: add signalStore and signalStoreFeature (#4049) (0010281), closes #4000
- signals: initial setup (#4002) (b0d63fd), closes #3992
- store: prettify createFeature result (#4014) (f179316)
16.2.0 (2023-08-07)
- data: make DataServiceError extend from Error (#3988) (0b98a65)
- effects: register functional effects from object without prototype (#3984) (1879cc9), closes #3972
- eslint-plugin: fix prefer-contact-latest-from rule to detect inject (#3946) (2efd805)
- eslint-plugin: prefix-selectors-with-select suggestion (#3959) (27f09df)
- eslint-plugin: support inject for no-typed-global-store rule (#3951) (d3e84d8)
- eslint-plugin: support inject for use-consistent-global-store-name rule (#3983) (caa74ff)
- store-devtools: resolve memory leak when devtools are destroyed (#3965) (644f0b6)
- eslint-plugin: include docs URL in lint message (#3944) (a1576de)
- schematics: add entity generation as part of feature schematic (#3850) (19ebb0a)
- store-devtools: provide the ability to connect extension outside of Angular zone (#3970) (1ee80e5), closes #3839
16.1.0 (2023-07-06)
- eslint: fix inject function based injection not detecting store (#3936) (8a5884d), closes #3834
- eslint: updater-explicit-return-type not applied when inheritance (#3928) (41a5076)
16.0.1 (2023-06-01)
- component: untrack subscription in ngrxPush pipe (#3918) (a1688e4)
- ngrx.io: preserve sidenav width for larger menu items (#3923) (ef73714)
16.0.0 (2023-05-09)
- component-store: use default equality function for selectSignal (#3884) (5843e7f)
- store: add Signal equal function for immutable object comparison (#3883) (634fdcb)
- store: move Angular Signal interop into State service (#3879) (8cb5795), closes #3869
- store-devtools: add state signal to StateObservable (#3889) (ad6e14a)
- add ng add support for standalone config to NgRx packages (#3881) (58508e3)
- component: add migration for LetModule and PushModule (#3872) (5f07eda)
- component: make LetDirective and PushPipe standalone (#3826) (985d80c), closes #3804
- store: add support of standalone API for ng add store (#3874) (7aec84d)
16.0.0-rc.1 (2023-05-09)
- component-store: use default equality function for selectSignal (#3884) (5843e7f)
- store: add Signal equal function for immutable object comparison (#3883) (634fdcb)
- store: move Angular Signal interop into State service (#3879) (8cb5795), closes #3869
- add ng add support for standalone config to NgRx packages (#3881) (58508e3)
- component: add migration for LetModule and PushModule (#3872) (5f07eda)
- component: make LetDirective and PushPipe standalone (#3826) (985d80c), closes #3804
- store: add support of standalone API for ng add store (#3874) (7aec84d)
16.0.0-rc.0 (2023-05-04)
- component-store: add selectSignal options (503e9d8)
- component-store: add selectSignal signature that combines provided signals (#3863) (07ba3fa)
- store: add selectSignal options (0a13c4d)
16.0.0-beta.0 (2023-04-27)
- data: allow 0 to be a valid key (#3830) (e50126d), closes #3828
- effects: run user provided effects defined as injection token (#3851) (cdaeeb6), closes #3848
- store: correctly infer action group events defined as empty object (#3833) (dc78447)
- store-devtools: correctly import state when feature is set to true (#3855) (0df3419), closes #3636
- component-store: add selectSignal method for interop with Angular Signals (#3861) (195d5ac)
- component-store: add tapResponse signature with observer object (#3829) (3a5e5d8)
- effects: accept ObservableInput as concatLatestFrom argument (#3838) (34dd28c)
- router-store: add @nrwl/angular data persistence operators (#3841) (4482751), closes #3777
- router-store: remove deprecated getSelectors method (#3816) (351a75e), closes #3815
- schematics: replace
any
type withunknown
type (#3827) (0ea2933) - schematics: Use createActionGroup in schematics (#3791) (f6ce20f)
- store: add createMockStore migration (#3810) (ded4240)
- store: add selectSignal method for interop with Angular Signals (#3856) (999dcb6)
- store: preserve the event name case with createActionGroup (#3832) (482fa5d)
- store: remove deprecated createFeature method (#3825) (fd8f347), closes #3814
- store: remove forbidden chars and empty str checks from createActionGroup (#3857) (e37c57b)
- convert entity and router selectors interfaces to types (#3853) (73eb55c)
- store: remove getMockStore in favor of createMockStore (#3835) (8d0ed8e)
- store: use strict projectors for createFeature selectors (#3799) (bafd121)
- update to Angular v16.0.0-next.6 release (#3831) (d7e03df)
- store: The event name case is preserved when converting to the action name by using the
createActionGroup
function.
BEFORE:
All letters of the event name will be lowercase, except for the initial letters of words starting from the second word, which will be uppercase.
const authApiActions = createActionGroup({
source: 'Auth API',
events: {
'LogIn Success': emptyProps(),
'login failure': emptyProps(),
'Logout Success': emptyProps(),
logoutFailure: emptyProps(),
},
});
// generated actions:
const { loginSuccess, loginFailure, logoutSuccess, logoutfailure } = authApiActions;
AFTER:
The initial letter of the first word of the event name will be lowercase, and the initial letters of the other words will be uppercase. The case of other letters in the event name will remain the same.
const { logInSuccess, loginFailure, logoutSuccess, logoutFailure } = authApiActions;
- store: The
createFeature
signature with root state is removed in favor of a signature without root state. An automatic migration is added to remove this signature.
BEFORE:
interface AppState {
users: State;
}
export const usersFeature = createFeature<AppState>({
name: 'users',
reducer: createReducer(initialState /* case reducers */),
});
AFTER:
export const usersFeature = createFeature({
name: 'users',
reducer: createReducer(initialState /* case reducers */),
});
- router-store: The deprecated
getSelectors
function has been removed from the@ngrx/router-store
package.
BEFORE:
The @ngrx/router-store package exports the getSelectors
function.
AFTER:
The @ngrx/router-store package no longer exports the getSelectors
function. A migration has been provided to replace existing usage
- schematics: NgRx Schematics do not use
any
types to define actions, these are replaced with theunknown
type.
BEFORE:
Schematics used the any
type to declare action payload type.
AFTER:
Schematics use the unknown
type to declare action payload type.
- store: The
getMockStore
function is removed in favor ofcreateMockStore
BEFORE:
import { getMockStore } from '@ngrx/store/testing';
const mockStore = getMockStore();
AFTER:
import { createMockStore } from '@ngrx/store/testing';
const mockStore = createMockStore();
- store: Projectors of selectors generated by createFeature are strongly typed.
BEFORE:
Projector function arguments of selectors generated by createFeature are not strongly typed:
const counterFeature = createFeature({
name: 'counter',
reducer: createReducer({ count: 0 }),
});
counterFeature.selectCount.projector;
// type: (...args: any[]) => number
AFTER:
Projector function arguments of selectors generated by createFeature are strongly typed:
const counterFeature = createFeature({
name: 'counter',
reducer: createReducer({ count: 0 }),
});
counterFeature.selectCount.projector;
// type: (featureState: { count: number; }) => number
15.4.0 (2023-03-16)
- data: correctly handle HttpOptions when provided (#3795) (cbdf524), closes #3794
- eslint-plugin: ignore select name within createFeature (#3788) (b58f9a3), closes #3786
- store: rename getMockStore to createMockStore (#3789) (6d615b3), closes #3781
- store: use createFeature in feature schematics (#3776) (9b3647f), closes #3741
15.3.0 (2023-02-13)
15.2.1 (2023-01-26)
15.2.0 (2023-01-26)
- data: add loadWithQuery method (#3717) (06b97bf), closes #3088
- effects: add ability to create functional effects (#3669) (dd76c63), closes #3668
- router-store: add migration for getRouterSelectors (#3753) (a785331)
- router-store: rename getSelectors to getRouterSelectors (#3745) (7ad76b8), closes #3738
- store: add ability to create extra selectors with createFeature (#3744) (e4f873b), closes #3719
- store: add createFeature migration (#3759) (b3c5931)
- store: deprecate createFeature signature with root state (#3756) (ccb3b93), closes #3737
15.1.0 (2022-12-21)
- component-store: revert throwError usages with factory for RxJS 6 compatibility (726dfb7)
- data: revert throwError usages with factory for RxJS 6 compatibility (a137b59), closes #3702
- eslint-plugin: remove @angular-devkit/schematics dependency (#3710) (f0ae915), closes #3709
- schematics: disable package json peer dep updates during build (#3692) (9cfc103), closes #3691
- store: support using
createActionGroup
with props typed as unions (#3713) (e75fa1a), closes #3712
- router-store: add new selectRouteDataParam selector (#3673) (#3686) (81bc0d9)
- store: support using
createSelector
with selectors dictionary (#3703) (5c87dda), closes #3677
15.0.0 (2022-11-29)
15.0.0-rc.0 (2022-11-23)
- component: clear
LetDirective
view when replaced observable is in suspense state (#3671) (ec59c4b) - component: remove $ prefix from LetViewContext property names (#3670) (b3b21e6)
- component: The
LetDirective
view will be cleared when the replaced observable is in a suspense state. Also, thesuspense
property is removed from theLetViewContext
because it would always befalse
when theLetDirective
view is rendered. Instead ofsuspense
property, use the suspense template to handle the suspense state.
BEFORE:
The LetDirective
view will not be cleared when the replaced observable is in a suspense state and the suspense template is not passed:
@Component({
template: `
<!-- When button is clicked, the 'LetDirective' view won't be cleared. -->
<!-- Instead, the value of 'o' will be 'undefined' until the replaced -->
<!-- observable emits the first value (after 1 second). -->
<p *ngrxLet="obs$ as o">{{ o }}</p>
<button (click)="replaceObs()">Replace Observable</button>
`,
})
export class TestComponent {
obs$ = of(1);
replaceObs(): void {
this.obs$ = of(2).pipe(delay(1000));
}
}
AFTER:
The LetDirective
view will be cleared when the replaced observable is in a suspense state and the suspense template is not passed:
@Component({
template: `
<!-- When button is clicked, the 'LetDirective' view will be cleared. -->
<!-- The view will be created again when the replaced observable -->
<!-- emits the first value (after 1 second). -->
<p *ngrxLet="obs$ as o">{{ o }}</p>
<button (click)="replaceObs()">Replace Observable</button>
`,
})
export class TestComponent {
obs$ = of(1);
replaceObs(): void {
this.obs$ = of(2).pipe(delay(1000));
}
}
- component: The
$
prefix is removed fromLetViewContext
property names.
BEFORE:
<ng-container *ngrxLet="obs$; $error as e; $complete as c"> ... </ng-container>
AFTER:
<ng-container *ngrxLet="obs$; error as e; complete as c"> ... </ng-container>
15.0.0-beta.1 (2022-11-18)
- data: add initial standalone APIs (#3647) (aa7ed66), closes #3553
- data: add withEffects feature for provideEntityData (#3656) (a6959e8)
- effects: forRoot and forFeature accept spreaded array (#3638) (0eaa536)
- router-store: return resolved title via selectTitle (#3648) (cc04e2f), closes #3622
- schematics: add display block flag (e0d368d)
- schematics: add standalone flag (b0bd2ff)
- schematics: replace environments usage with isDevMode (#3645) (4f61b63), closes #3618
- router-store: Property
title: string | undefined
is added to theMinimalActivatedRouteSnapshot
interface.
BEFORE:
The MinimalActivatedRouteSnapshot
interface doesn't contain the title
property.
AFTER:
The MinimalActivatedRouteSnapshot
interface contains the required title
property.
15.0.0-beta.0 (2022-11-03)
- component: add migration for replacing ReactiveComponentModule (#3506) (49c6cf3), closes #3491
- component: handle observable dictionaries (#3602) (42efccb), closes #3545
- component: remove ReactiveComponentModule (#3643) (4bdf345), closes #3623
- component-store: Add SelectorObject to
select
(#3629) (f8d0241), closes #3632 #3631 - effects: change the signature of provideEffect (#3587) (899afe7)
- effects: migration for provideEffects argument (#3601) (f7dfeab)
- effects: remove @Effect decorator (#3634) (96c5bdd), closes #3617
- eslint-plugin: remove rules using @Effect (#3635) (5f74e61)
- schematics: drop support for TypeScript <4.8 (#3631) (b9c1ab6)
- store: make reducers arg of StoreModule.forRoot optional (#3632) (e5177aa)
- store: strict projector for selectors with props (#3640) (351459f), closes #3571
- store: strict projectors (#3581) (43198a2), closes #3571
- component:
ReactiveComponentModule
is removed in favor ofLetModule
andPushModule
.
BEFORE:
import { ReactiveComponentModule } from '@ngrx/component';
@NgModule({
imports: [
// ... other imports
ReactiveComponentModule,
],
})
export class MyFeatureModule {}
AFTER:
import { LetModule, PushModule } from '@ngrx/component';
@NgModule({
imports: [
// ... other imports
LetModule,
PushModule,
],
})
export class MyFeatureModule {}
- store: The projector method has become strict
BEFORE:
You could pass any arguments to the projector method
const selector = createSelector( selectString, // returning a string selectNumber, // returning a number (s, n, prefix: string) => { return prefix + s.repeat(n); } )
// you could pass any argument selector.projector(1, 'a', true);
AFTER:
const selector = createSelector( selectString, // returning a string selectNumber, // returning a number (s, n, prefix: string) => { return prefix + s.repeat(n); } )
// this throws selector.projector(1, 'a', true); // this does not throw because the arguments have the correct type selector.projector(1, 'a', 'prefix');
- store: The projector function on the selector is type-safe by default.
BEFORE:
The projector is not type-safe by default, allowing for potential mismatch types in the projector function.
const mySelector = createSelector(
() => 'one',
() => 2,
(one, two) => 3
);
mySelector.projector(); // <- type is projector(...args: any[]): number
AFTER:
The projector is strict by default, but can be bypassed with an any
generic parameter.
const mySelector = createSelector(
() => 'one',
() => 2,
(one, two) => 3
);
mySelector.projector(); // <- Results in type error. Type is projector(s1: string, s2: number): number
To retain previous behavior
const mySelector = createSelector(
() => 'one',
() => 2,
(one, two) => 3
)(mySelector.projector as any)();
- effects: The @Effect decorator is removed
BEFORE:
Defining an effect is done with @Effect
@Effect() data$ = this.actions$.pipe();
AFTER:
Defining an effect is done with createEffect
data$ = createEffect(() => this.actions$.pipe());
- effects: The signature of
provideEffects
is changed to expect a spreaded array of effects.
BEFORE:
provideEffects
expecteded the effects to be passed as an array.
// single effect
provideEffects([MyEffect])
// multiple effects
provideEffects([MyEffect, MySecondEffect])
```ts
AFTER:
`provideEffects` expects the effects as a spreaded array as argument.
```ts
// single effect
provideEffects(MyEffect)
// multiple effects
provideEffects(MyEffect, MySecondEffect)
```ts
<a name="14.3.2"></a>
## [14.3.2](https://github.com/ngrx/platform/compare/14.3.1...14.3.2) (2022-10-04)
### Bug Fixes
* **component:** replace animationFrameScheduler with requestAnimationFrame ([#3592](https://github.com/ngrx/platform/issues/3592)) ([0a4d2dd](https://github.com/ngrx/platform/commit/0a4d2dd)), closes [#3591](https://github.com/ngrx/platform/issues/3591)
* **component-store:** use asapScheduler to schedule lifecycle hooks check ([#3580](https://github.com/ngrx/platform/issues/3580)) ([02431b4](https://github.com/ngrx/platform/commit/02431b4)), closes [#3573](https://github.com/ngrx/platform/issues/3573)
* **eslint-plugin:** avoid-combining-selectors with arrays should warn ([#3566](https://github.com/ngrx/platform/issues/3566)) ([4b0c6de](https://github.com/ngrx/platform/commit/4b0c6de))
* **router-store:** set undefined for unserializable route title ([#3593](https://github.com/ngrx/platform/issues/3593)) ([8eb4001](https://github.com/ngrx/platform/commit/8eb4001)), closes [#3495](https://github.com/ngrx/platform/issues/3495)
* **store:** fix typing of on fn ([#3577](https://github.com/ngrx/platform/issues/3577)) ([d054aa9](https://github.com/ngrx/platform/commit/d054aa9)), closes [#3576](https://github.com/ngrx/platform/issues/3576)
<a name="14.3.1"></a>
## [14.3.1](https://github.com/ngrx/platform/compare/14.3.0...14.3.1) (2022-09-08)
### Bug Fixes
* add support for TypeScript 4.8 ([#3548](https://github.com/ngrx/platform/issues/3548)) ([d558ce1](https://github.com/ngrx/platform/commit/d558ce1)), closes [#3547](https://github.com/ngrx/platform/issues/3547)
* **eslint-plugin:** avoid-mapping-selectors don't report on ThisExpression ([#3546](https://github.com/ngrx/platform/issues/3546)) ([a28175c](https://github.com/ngrx/platform/commit/a28175c)), closes [#3511](https://github.com/ngrx/platform/issues/3511)
<a name="14.3.0"></a>
# [14.3.0](https://github.com/ngrx/platform/compare/14.2.0...14.3.0) (2022-08-25)
### Features
* **effects:** add provideEffects function ([#3524](https://github.com/ngrx/platform/issues/3524)) ([db35bfe](https://github.com/ngrx/platform/commit/db35bfe)), closes [#3522](https://github.com/ngrx/platform/issues/3522)
* **router-store:** add provideRouterStore function ([#3532](https://github.com/ngrx/platform/issues/3532)) ([511b7cf](https://github.com/ngrx/platform/commit/511b7cf)), closes [#3528](https://github.com/ngrx/platform/issues/3528)
* **store:** add provideStore and provideState functions for standalone APIs ([#3539](https://github.com/ngrx/platform/issues/3539)) ([5639c1e](https://github.com/ngrx/platform/commit/5639c1e)), closes [#3526](https://github.com/ngrx/platform/issues/3526)
* **store-devtools:** add provideStoreDevtools function ([#3537](https://github.com/ngrx/platform/issues/3537)) ([6b0db4e](https://github.com/ngrx/platform/commit/6b0db4e)), closes [#3527](https://github.com/ngrx/platform/issues/3527)
<a name="14.2.0"></a>
# [14.2.0](https://github.com/ngrx/platform/compare/14.1.0...14.2.0) (2022-08-18)
### Bug Fixes
* **component-store:** make synchronous updater errors catchable ([#3490](https://github.com/ngrx/platform/issues/3490)) ([1a906fd](https://github.com/ngrx/platform/commit/1a906fd))
* **component-store:** move isInitialized check to queueScheduler context on state update ([#3492](https://github.com/ngrx/platform/issues/3492)) ([53636e4](https://github.com/ngrx/platform/commit/53636e4)), closes [#2991](https://github.com/ngrx/platform/issues/2991)
### Features
* **component-store:** handle errors in next callback ([#3533](https://github.com/ngrx/platform/issues/3533)) ([551c8eb](https://github.com/ngrx/platform/commit/551c8eb))
<a name="14.1.0"></a>
# [14.1.0](https://github.com/ngrx/platform/compare/14.0.2...14.1.0) (2022-08-09)
### Bug Fixes
* **eslint-plugin:** allow sequential dispatches in a different block context ([#3515](https://github.com/ngrx/platform/issues/3515)) ([faf446f](https://github.com/ngrx/platform/commit/faf446f)), closes [#3513](https://github.com/ngrx/platform/issues/3513)
* **eslint-plugin:** Remove the md suffix from the docsUrl path ([#3518](https://github.com/ngrx/platform/issues/3518)) ([71d4d4b](https://github.com/ngrx/platform/commit/71d4d4b))
* **store:** improve error for forbidden characters in createActionGroup ([#3496](https://github.com/ngrx/platform/issues/3496)) ([398fbed](https://github.com/ngrx/platform/commit/398fbed))
### Features
* **component:** add RenderScheduler to the public API ([#3516](https://github.com/ngrx/platform/issues/3516)) ([4642919](https://github.com/ngrx/platform/commit/4642919))
* **component:** replace markDirty with custom TickScheduler ([#3488](https://github.com/ngrx/platform/issues/3488)) ([3fcd8af](https://github.com/ngrx/platform/commit/3fcd8af))
### Performance Improvements
* **component:** do not schedule render for synchronous events ([#3487](https://github.com/ngrx/platform/issues/3487)) ([bb9071c](https://github.com/ngrx/platform/commit/bb9071c))
<a name="14.0.2"></a>
## [14.0.2](https://github.com/ngrx/platform/compare/14.0.1...14.0.2) (2022-07-12)
### Bug Fixes
* **component:** import operators from rxjs/operators ([#3479](https://github.com/ngrx/platform/issues/3479)) ([20ef7a4](https://github.com/ngrx/platform/commit/20ef7a4))
* **component-store:** effect handles generics that extend upon a type ([#3485](https://github.com/ngrx/platform/issues/3485)) ([9d2bda7](https://github.com/ngrx/platform/commit/9d2bda7)), closes [#3482](https://github.com/ngrx/platform/issues/3482)
* **data:** add TSDoc annotations ([#3483](https://github.com/ngrx/platform/issues/3483)) ([cbbc49f](https://github.com/ngrx/platform/commit/cbbc49f))
* **eslint-plugin:** fix configuration guide link ([#3480](https://github.com/ngrx/platform/issues/3480)) ([8219b1d](https://github.com/ngrx/platform/commit/8219b1d))
<a name="14.0.1"></a>
## [14.0.1](https://github.com/ngrx/platform/compare/14.0.0...14.0.1) (2022-06-29)
### Bug Fixes
* **component-store:** allow void callbacks in effect ([#3466](https://github.com/ngrx/platform/issues/3466)) ([e6dedd6](https://github.com/ngrx/platform/commit/e6dedd6)), closes [#3462](https://github.com/ngrx/platform/issues/3462)
* **component-store:** import operators from rxjs/operators ([#3465](https://github.com/ngrx/platform/issues/3465)) ([f9ba513](https://github.com/ngrx/platform/commit/f9ba513))
* **schematics:** add workingDirectory to schemas ([#3473](https://github.com/ngrx/platform/issues/3473)) ([50ea6b3](https://github.com/ngrx/platform/commit/50ea6b3)), closes [#3469](https://github.com/ngrx/platform/issues/3469)
* **schematics:** create schematicCollections if not exists ([#3470](https://github.com/ngrx/platform/issues/3470)) ([011cbcc](https://github.com/ngrx/platform/commit/011cbcc))
<a name="14.0.0"></a>
# [14.0.0](https://github.com/ngrx/platform/compare/14.0.0-rc.0...14.0.0) (2022-06-20)
### Bug Fixes
* **component:** do not exclude falsy types from LetDirective's input type ([#3460](https://github.com/ngrx/platform/issues/3460)) ([7028adb](https://github.com/ngrx/platform/commit/7028adb))
<a name="14.0.0-rc.0"></a>
# [14.0.0-rc.0](https://github.com/ngrx/platform/compare/14.0.0-beta.0...14.0.0-rc.0) (2022-06-08)
### Code Refactoring
* **router-store:** change name for full router state serializer ([#3430](https://github.com/ngrx/platform/issues/3430)) ([d443f50](https://github.com/ngrx/platform/commit/d443f50)), closes [#3416](https://github.com/ngrx/platform/issues/3416)
### Features
* **component:** add separate modules for PushPipe and LetDirective ([#3449](https://github.com/ngrx/platform/issues/3449)) ([eacc4b4](https://github.com/ngrx/platform/commit/eacc4b4)), closes [#3341](https://github.com/ngrx/platform/issues/3341)
* **component:** deprecate ReactiveComponentModule ([#3451](https://github.com/ngrx/platform/issues/3451)) ([b4dd2c8](https://github.com/ngrx/platform/commit/b4dd2c8))
* **eslint-plugin:** improve install flow ([#3447](https://github.com/ngrx/platform/issues/3447)) ([8ddaf60](https://github.com/ngrx/platform/commit/8ddaf60))
* **schematics:** use schematicCollections instead of defaultCollection ([#3441](https://github.com/ngrx/platform/issues/3441)) ([5abf828](https://github.com/ngrx/platform/commit/5abf828)), closes [#3383](https://github.com/ngrx/platform/issues/3383)
### BREAKING CHANGES
* **router-store:** The full router state serializer has been renamed.
BEFORE:
The full router state serializer is named `DefaultRouterStateSerializer`
AFTER:
The full router state serializer is named `FullRouterStateSerializer`. A migration is provided to rename the export in affected projects.
<a name="14.0.0-beta.0"></a>
# [14.0.0-beta.0](https://github.com/ngrx/platform/compare/13.1.0...14.0.0-beta.0) (2022-05-30)
* Closes #3344, #3345 ([70056a8](https://github.com/ngrx/platform/commit/70056a8)), closes [#3344](https://github.com/ngrx/platform/issues/3344) [#3345](https://github.com/ngrx/platform/issues/3345)
### Bug Fixes
* **store:** rename template literal to string literal for createActionGroup ([#3426](https://github.com/ngrx/platform/issues/3426)) ([7d08db1](https://github.com/ngrx/platform/commit/7d08db1))
### Features
* **schematics:** remove creators option ([#3311](https://github.com/ngrx/platform/issues/3311)) ([e86278a](https://github.com/ngrx/platform/commit/e86278a))
* update Angular packages to latest v14 RC ([#3425](https://github.com/ngrx/platform/issues/3425)) ([f15dd1e](https://github.com/ngrx/platform/commit/f15dd1e)), closes [#3417](https://github.com/ngrx/platform/issues/3417)
* **component:** add error as value to LetDirective's context ([#3380](https://github.com/ngrx/platform/issues/3380)) ([6452e24](https://github.com/ngrx/platform/commit/6452e24)), closes [#3343](https://github.com/ngrx/platform/issues/3343)
* **component:** add suspense template input to LetDirective ([#3377](https://github.com/ngrx/platform/issues/3377)) ([345ee53](https://github.com/ngrx/platform/commit/345ee53)), closes [#3340](https://github.com/ngrx/platform/issues/3340)
* **component:** use global render strategy in zone-less mode ([#3379](https://github.com/ngrx/platform/issues/3379)) ([f233dae](https://github.com/ngrx/platform/commit/f233dae)), closes [#3342](https://github.com/ngrx/platform/issues/3342)
* **component-store:** add OnStoreInit and OnStateInit lifecycle hooks ([#3368](https://github.com/ngrx/platform/issues/3368)) ([0ffed02](https://github.com/ngrx/platform/commit/0ffed02)), closes [#3335](https://github.com/ngrx/platform/issues/3335)
* **eslint-plugin:** add NgRx ESLint Plugin ([#3373](https://github.com/ngrx/platform/issues/3373)) ([ae0041b](https://github.com/ngrx/platform/commit/ae0041b))
* **store:** add createActionGroup function ([#3381](https://github.com/ngrx/platform/issues/3381)) ([2cdecb3](https://github.com/ngrx/platform/commit/2cdecb3)), closes [#3337](https://github.com/ngrx/platform/issues/3337)
* **store:** install and configure the [@ngrx](https://github.com/ngrx)/eslint-plugin on ng-add ([#3386](https://github.com/ngrx/platform/issues/3386)) ([bf2672e](https://github.com/ngrx/platform/commit/bf2672e))
### Performance Improvements
* **component:** reset state / trigger CD only if necessary ([#3328](https://github.com/ngrx/platform/issues/3328)) ([f5b055b](https://github.com/ngrx/platform/commit/f5b055b))
### BREAKING CHANGES
* 1. The context of `LetDirective` is strongly typed when `null` or
`undefined` is passed as input.
BEFORE:
```html
<p *ngrxLet="null as n">{{ n }}</p>
<p *ngrxLet="undefined as u">{{ u }}</p>
- The type of
n
isany
. - The type of
u
isany
.
AFTER:
<p *ngrxLet="null as n">{{ n }}</p>
<p *ngrxLet="undefined as u">{{ u }}</p>
- The type of
n
isnull
. - The type of
u
isundefined
.
- schematics: BEFORE:
Creating actions, reducers, and effects is possible without using the creator syntax is possible.
AFTER:
- All schematics use the non-creator syntax to scaffold the code.
- The option
--creators
(and-c
) is removed from the schematic options. - The
skipTests
option is removed while generating actions.
- Minimum version of Angular has been updated
BEFORE:
Minimum version of Angular was 13.x
AFTER:
Minimum version of Angular is 14.x
- component: The native local rendering strategy is replaced by global in zone-less mode for better performance.
BEFORE:
The change detection is triggered via changeDetectorRef.detectChanges
in zone-less mode.
AFTER:
The change detection is triggered via ɵmarkDirty
in zone-less mode.
- component: The
$error
property fromLetDirective
's view context is a thrown error orundefined
instead oftrue
/false
.
BEFORE:
<p *ngrxLet="obs$; $error as e">{{ e }}</p>
e
will betrue
whenobs$
emits error event.e
will befalse
whenobs$
emits next/complete event.
AFTER:
<p *ngrxLet="obs$; $error as e">{{ e }}</p>
e
will be thrown error whenobs$
emits error event.e
will beundefined
whenobs$
emits next/complete event.
13.1.0 (2022-03-28)
- component-store: memoization not working when passing selectors directly to select (#3356) (38bce88)
- entity: add default options to entity adapter when undefined is passed (#3287) (17fe494)
- store: add explicit overloads for createSelector (#3354) (2f82101), closes #3268
- data: add ability to configure trailing slashes (#3357) (56aedfd)
- store-devtools: add REDUX_DEVTOOLS_EXTENSION injection token to public API (#3338) (b55b0e4)
13.0.2 (2021-12-07)
- component: fixes recursive rendering (#3255) (d24dde1), closes #3246
- store: remove afterEach hook in mock store (#3245) (0640085), closes #3243
- store: update installation of the NgRx ESLint Plugin (#3259) (df211fe)
- set correct dist paths for testing packages (#3249) (ed9f6f1), closes #3248
13.0.1 (2021-11-17)
13.0.0 (2021-11-16)
13.0.0-rc.0 (2021-11-11)
- store: use variadic tuple types for createSelector (#3023) (367d9b4), closes #2715
- update Angular packages to version 13.0.0 (#3184) (996f1e8), closes #3189
- store: When manually specifying the generic arguments, you have to specify the selector's list of selector return values.
BEFORE:
createSelector<Story[], Story[], Story[][]>;
AFTER:
// needs to be a tuple 👇
createSelector<Story[], [Story[]], Story[][]>;
- data: Now both the
getWithQuery
andgetAll
methods are consistent and do setloaded
property to true on dispatching their success actions respectively.
BEFORE:
The getWithQuery
method would not set the loaded
property to true upon success
AFTER:
The getWithQuery
method sets the loaded
property to true upon success
13.0.0-beta.0 (2021-11-04)
- component: remove class-level generic from PushPipe (#3127) (548c72c), closes #3114
- store: infer initial store state properly with metareducers (#3102) (d003b85), closes #3007
- store: remove store config from forFeature signature with slice (#3218) (b1a64dd), closes #3216
- effects: move createEffect migration to ng-update migration (#3074) (5974913)
- store: add createFeatureSelector migration (#3214) (62334f9)
- store: provide better TS errors for action creator props (#3060) (5ed3c3d), closes #2892
- The minimum version required for Angular and RxJS has been updated
BEFORE:
Angular 12.x is the minimum version RxJS 6.5.x is the minimum required version
AFTER:
Angular 13.0.0-RC.0 is the minimum version RxJS 7.4.x is the minimum required version
- store: The
StoreConfig
argument is removed from theStoreModule.forFeature
signature withFeatureSlice
.
BEFORE:
The StoreModule.forFeature
signature with FeatureSlice
has StoreConfig
as the second input argument, but the configuration isn't registered if passed.
AFTER:
The StoreModule.forFeature
signature with FeatureSlice
no longer has StoreConfig
as the second input argument.
- store:
initialState
needs to match the interface of the store/feature.
BEFORE:
Missing properties were valid
StoreModule.forRoot(reducers, {
initialState: { notExisting: 3 },
metaReducers: [metaReducer],
});
AFTER:
A type error is produced for initialState that does not match the store/feature
StoreModule.forRoot(reducers, {
initialState: { notExisting: 3 },
metaReducers: [metaReducer],
});
- component: PushPipe no longer has a class-level generic type parameter.
BEFORE:
Use of PushPipe outside of component templates required a generic
AFTER:
Use of PushPipe outside of component templates no longer requires a generic
- store: Types for props outside an action creator is more strictly checked
BEFORE:
Usage of props
outside of an action creator with invalid types was allowed
AFTER:
Usage of props
outside of an action creator now breaks for invalid types
- effects: The create-effect-migration migration is removed
BEFORE:
The Effect decorator removal and migration are done manually through schematics.
AFTER:
The Effect decorator removal and migration are performed automatically on upgrade to version 13 of NgRx Effects.
12.5.1 (2021-10-25)
12.5.0 (2021-10-14)
- entity: set correct input argument types for removeMutably methods (#3148) (9611415)
- schematics: add missing method (#3157) (2a927a2)
- schematics: use prefix option in feature schematic (#3139) (5fa8890), closes #3116
12.4.0 (2021-08-11)
- component: capture errors from observable when using
ngrxPush
pipe andngrxLet
directive (23c846b), closes #3100
12.3.0 (2021-07-22)
- component-store: accept error type in tapResponse with strict generic checks (#3068) (3e02e37), closes #3056
- data: immutably delete an entity (#3040) (a6c199f), closes #2553
- data: SAVE_ENTITIES_CANCELED type in SaveEntitiesCanceled (#3079) (b24c1e0), closes #3065
- store: make readonly usage consistent (#3050) (#3069) (a39b278)
12.2.0 (2021-06-29)
- component: avoid early destruction of view in ngrxLet which interfered with animations (#2890) (#3045) (7515e36)
- data: make options optional on add with partial (#3043) (1620df9)
12.1.0 (2021-06-09)
- data: remove strict typing for optimistic false (#3020) (3b565b4), closes #2928
- store: add ESLint plugin to TS overrides when possible (#3032) (5102a34), closes #3031
- entity: new
setMany
adapter (#3026) (#3029) (a02ea9f) - schematics: add the ability to create actions with the prefix (#3025) (15bc0df)
- store: add createFeature (#3033) (5fd1c7b), closes #2974
- store-devtools: add autoPause option (#2941) (698bd29), closes #2722
12.0.0 (2021-05-12)
12.0.0-rc.0 (2021-05-05)
12.0.0-beta.1 (2021-04-29)
12.0.0-beta.0 (2021-04-27)
- component: include files in ng-add schematics (ad13c9c)
- component-store: include files in ng-add schematics (bfef622)
- data: include files in ng-add schematics (526edd9)
- effects: ng-add schematics will generate effects files properly (4389307)
- entity: include files in ng-add schematics (4d9f647)
- router-store: include files in ng-add schematics (eb71d5c)
- store: ng-add schematics will generate router files if minimal set to false (74a2671)
- store-devtools: include files in ng-add schematics (ac706de)
- update to Angular libraries to version 12 RC.0 (#3000) (4fb030e)
- update to Nx version 12.0.x and TypeScript 4.1.x (#2999) (cb258cb)
- Minimum versions of Angular and TypeScript have been updated
BEFORE:
Minimum of Angular version 11.x Minimum of TypeScript 4.1.x
AFTER:
Minimum of Angular version 12.x Minimum of TypeScript 4.2.x
- The minimum TypeScript version has been updated to 4.1.x
BEFORE:
The minimum TypeScript version is 4.0.x
AFTER:
The minimum TypeScript version is 4.1.x
11.1.1 (2021-04-20)
11.1.0 (2021-03-31)
- effects: add support for Proxy objects in Effects (#2976) (5f5b679), closes #2975
- store: allow default parameters in function action (#2954) (9b23403), closes #2948
- store: allow primitive types (#2967) (eecc8ce), closes #2966
- component-store: add ability for patchState to accept Observable (#2937) (8930e22), closes #2852
- schematics: add component store schematics (#2886) (f086f80), closes #2570
11.0.1 (2021-02-15)
- schematics: add index file (#2923) (775c794), closes #2917
- store: forFeature using instanceof instead of typeof (#2922) (2bea205), closes #2919
11.0.0 (2021-02-09)
11.0.0-rc.0 (2021-02-04)
11.0.0-beta.2 (2021-02-02)
- component: remove ? from LetViewContext props to prevent 'possibly undefined' error in strict mode (#2876) (c3ac252)
- component: transform to Observable if Input is Promise (b611367)
- data: make entity param partial when is not optimistic (#2899) (bb70e6c), closes #2870
- data: type overloaded add for is optimistic true | undefined (#2906) (6d46ac4)
- push: fix return typing for observables to include undefined (#2907) (abcc599), closes #2888
- router-store: cast return type as RouterReducerState (#2887) (d489484)
- effects: concatLatestFrom operator (#2760) (55f0f7a)
- effects: deprecate @Effect decorator (#2855) (dbd1ecf)
- store: add object-style StoreModule.forFeature overload w/fixes (#2885) (a9468e1), closes #2821 #2809
- store-devtools: pass entire error object to the error handler (#2853) (ce28b44), closes #2824
- push: BEFORE:
ngrxPush typing doesn't consider undefined
when the input type is an observable
AFTER:
ngrxPush typing considers undefined
when the input type is an observable
11.0.0-beta.0 (2021-01-05)
- update Angular peer dependencies to version 11 (#2843) (f63d281), closes #2842
- component: add schematic assets to ng-package.json (9598527), closes #2819
- component-store: add schematic assets to ng-package.json (0e3b52d), closes #2819
- component-store: adjust updater to accept partials (#2765) (b54b9b6), closes #2754
- router-store: ingore slash when comparing routes (#2834) (cad3f60), closes #2829 #1781
- schematics: add schematics to devDependencies (#2784) (daf1889)
- store: add noop for all methods in MockReducerManager (#2777) (a489b48), closes #2776
- store: correct types for SelectorFactoryConfig (#2752) (aa9bf1a)
- component-store: add patchState method (#2788) (ecedadb)
- component-store: add tapResponse operator (#2763) (d1873c9)
- component-store: allow more than 4 selects (#2841) (7c29320)
- effects: add support for provideMockActions outside of the TestBed (#2762) (c47114c)
- effects: allow usage of empty forRoot array multiple times (#2774) (5219ff5)
- entity: remove addAll (#2783) (93a4754)
- router-store: add selectParamFromRouterState selector (#2771) (3a1f359), closes #2758
- router-store: Add urlAfterRedirects (#2775) (14553f6)
- store: add object-style StoreModule.forFeature overload (#2821) (17571e5), closes #2809
- store: add support for provideMockStore outside of the TestBed (#2759) (1650582), closes #2745
- router-store: optimize selectQueryParams, selectQueryParam and selectFragment selectors (#2764) (918f184)
- router-store: Router-store selectors for query params and fragment select from the root router state node. This could potentially break unit tests, but is functionally equivalent to the current behavior at runtime.
BEFORE:
selectQueryParams - returns query params from the last router state node selectQueryParam - returns a query param from the last router state node selectFragment - returns the fragment from the last router state node
AFTER:
selectQueryParams - returns query params from routerState.root selectQueryParam - returns a query param from routerState.root selectFragment - returns the fragment from routerState.root
- Angular peer dependency versions are bumped to latest major (11)
BEFORE:
Minimum Angular peer dependency version is ^10.0.0
AFTER:
Minimum Angular peer dependency version is ^11.0.0
- entity: To overwrite the entities, we previously used the
addAll
method but the method name was confusing.
BEFORE:
adapter.addAll(action.entities, state);
AFTER:
The new method name setAll
describes the intention better.
adapter.setAll(action.entities, state);
- refactor(data): use the setAll adapter method
- The initial state Injection Token for
@ngrx/component-store
has been renamed
BEFORE:
Injection Token is initialStateToken
AFTER:
Injection Token is INITIAL_STATE_TOKEN
10.0.1 (2020-10-07)
- component: add entry point for schematic (#2688) (d937275), closes #2683
- component-store: add entry point for schematic (#2687) (f8928e3), closes #2682
- schematics: prevent ng-add from rewriting other workspace cli options (#2731) (37354aa)
- store: prevent unexpected behavior of {} as a props type (#2728) (63510a8)
10.0.0 (2020-08-10)
10.0.0-rc.0 (2020-08-06)
- component-store: EffectReturnFn has been removed and the effect type is stricter and more predictable.
BEFORE:
If effect was const e = effect((o: Observable) => ....) it was still possible to call e() without passing any strings
AFTER:
If effect was const e = effect((o: Observable) => ....) its not allowed to call e() without passing any strings
10.0.0-beta.1 (2020-07-20)
- component: add ng-add and ng-update schematics (#2611) (3f2bea4)
- component-store: add config for debounce selectors (#2606) (ddf0271)
- component-store: add imperative reads (#2614) (2146774)
- component-store: add ng-add and ng-update schematics (#2598) (af7b2cc), closes #2569
- The skipTest option has been renamed to skipTests
BEFORE:
ng generate container UsersPage --skipTest
AFTER:
ng generate container UsersPage --skipTests
10.0.0-beta.0 (2020-06-25)
- component: detect zone.js using instanceof comparison (#2547) (7128667)
- component: removed ivy checks as obsolete (#2579) (e239950)
- component-store: export EffectReturnFn interface (#2555) (f2a2212)
- data: mergeQuerySet uses mergeStrategy (#2430) (e1720b4), closes #2368
- entity: remove incorrect ComparerStr type (#2584) (4796c97)
- schematics: add comma before devtools for empty imports (#2542) (f2d4ebc)
- component-store: add support for selectors (#2539) (47e7ba3)
- component-store: add support for side effects (#2544) (f892cc8)
- component-store: make library compatible with ViewEngine (#2580) (ba0818e)
- router-store: add route fragment selector (#2543) (aba7368)
- component-store: push updates to queueScheduler and single selectors to asapSchedulers (#2586) (58073ab)
- entity: The compare function is used in two places, neither of which expect it to be able to return a string: The first caller is the Array prototype sort function, and there it "should return a negative, zero, or positive value, depending on the arguments". The second caller does a numerical comparison with the result.
Even though an id can be a string, the result of a comparison shouldn't be.
BEFORE:
The sortComparer types allow for a string to be returned
AFTER:
The sortComparer types only allow a number to be returned
- BEFORE:
Angular v9 are minimum dependencies
AFTER:
Angular v10 are minimum dependencies
9.2.0 (2020-05-28)
- router-store: selects should return selectors (#2517) (831e1e4), closes #2516
- schematics: components should inject the store without generic (#2512) (4f7dcdc)
- schematics: use skipTests flag consistently, deprecate skipTest option (#2522) (83033d7), closes #2521
- store: remove circular dependency for mock import (#2540) (4892fa2)
- component: add ngrxPush migration (#2452) (0775093), closes #2450
- component-store: add initial setup (#2519) (a2657ac)
- component-store: initialization + updater/setState (#2528) (3545df2)
- effects: catch action creators being returned in effect without being called (#2536) (100970b)
- store: add ngrxMockEnvironment function to control output during testing (#2513) (da1a0c0), closes #2363
- store: add runtime check for action type uniqueness (#2520) (2972980)
9.1.2 (2020-05-06)
9.1.1 (2020-05-05)
- router-store: selectors should return MemoizedSelector (#2492) (39a4b91)
- schematics: use Angular default properties when not defined (#2507) (7cd0624), closes #1036
- store: ignore Ivy in runtime checks (#2491) (46d752f), closes #2404
9.1.0 (2020-04-07)
- component: add docs overview (#2444) (a279dd1), closes #2442
- example: optimistically add/remove book from collection (#2429) (b0aacf7), closes #2417
- schematics: install v9 with ng-add (#2455) (19f1bda)
- toObservableValue: accommodate all observable inputs (#2471) (468303a)
- component: add ngrxPush pipe and ngrxLet directive to @ngrx/component package (#2046) (464073d)
- effects: add user provided effects to EffectsModule.forFeature (#2231) (59ce3e2), closes #2232
- schematics: export reducer directly when Ivy is enabled (#2440) (b68fa67)
9.0.0 (2020-03-09)
9.0.0-rc.0 (2020-03-02)
- data: correct AppEntityServices example in ngrx data doc page (#2413) (711ba0e), closes #2280
- example: fix a typo selectShowSidenav (#2414) (c9ebb06)
9.0.0-beta.2 (2020-02-25)
- docs: replace duplicate link (#2399) (d4502b4)
- effects: use source instance for ngrxOnRunEffects to retain context (#2401) (79c830c)
9.0.0-beta.1 (2020-02-18)
- 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
- 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)
- 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)
- schematics: Flag minimal is set to true (#2258) (7ecaa22), closes #2250
- schematics: migrate from styleext to style (#2254) (2801018), closes #2248
- 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
- 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 touseEffectsErrorHandler
increateEffect
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 tostyle
.
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)
8.5.2 (2019-11-21)
- 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)
- effects: add action creator for root effects init action (#2219) (de9a590), closes #2218
- effects: export CreateEffectMetadata (#2245) (bfe4c81), closes #2243
8.5.0 (2019-11-07)
- effects: resubscribe every time an error occurs (#2165) (0d59783)
- store: disallow arrays in action creators (#2155) (1e4c0be)
- store: improve createFeatureSelector warning (#2163) (e4765d6), closes #2116
- store: improve types for string selectors (#2174) (46a8467)
- 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)
- 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
- 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)
- 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
- store: add verbose error message for undefined feature state in development mode (#2078) (6946e2e), closes #1897
8.2.0 (2019-07-31)
- effects: resubscribe every time an error occurs (#2023) (#2026) (5b48912)
- store: add missing StoreConfig and RootStoreConfig exports (#2009) (5e01e50), closes #2007
- 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)
- 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
- 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)
- store: prevent passing of action creator function to store dispatch and effects (#1914) (78153cb), closes #1906
8.0.0 (2019-06-06)
- store: add protection from type property use (#1923) (bb9add7), closes #1917
- store: capture the type of a selector projector function (#1920) (4e39cc1), closes #1908
8.0.0-rc.1 (2019-06-04)
8.0.0-rc.0 (2019-05-30)
- 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
- 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)
- 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)
- data: update the package name for replacement to ngrx-data (#1805) (00c00e0), closes #1802
- example: resolve circular dependency (#1833) (1fbd59c)
- 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
8.0.0-beta.1 (2019-04-24)
- data: add schematics and migrations (#1782) (c79362d)
- schematics: add support for reducer creators (#1785) (8a0a049), closes #1764
- store: change createReducer to avoid generic (#1796) (8f2cb7b)
8.0.0-beta.0 (2019-04-17)
- 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
- schematics: add support for action creators to schematics (#1765) (876f80a), closes #1670
- store: add createReducer function (#1746) (f954e14), closes #1724
- introduce @ngrx/data library to the platform (#1733) (5d569c3)
- introduce @ngrx/data library to the platform (#1754) (dbfdbaf)
- effects: add createEffect function (#1667) (ced2d3d), closes #1368
- effects: allow non-dispatching effects to not return an action (#1689) (04e07a6)
- effects: allow ofType to handle ActionCreator (#1676) (a41d1d6)
- entity: add undefined to Dictionary's index signature (#1719) (d472757)
- example: update ofType in effects per #1676 (#1691) (c9c9a0e)
- router-store: add v8 migration schematic (#1699) (0b794ce)
- router-store: Make usage of forRoot required (#1662) (#1672) (c7e1406)
- schematics: add support for effect creators to schematics (#1725) (8901abd), closes #1682
- store: add API to mock selectors (#1688) (2a9b067), closes #1504
- store: add immutability and serializability runtime checks (#1613) (60633b7), closes #857
- store: add META_REDUCERS replacement migration (#1640) (57bacf5)
- store: run migration schema for v8 beta (#1716) (0abc948)
- 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 toactionsSafelist
actionsBlacklist
is renamed toactionsBlocklist
BEFORE:
StoreDevtoolsModule.instrument({
actionsWhitelist: ['...'],
actionsBlacklist: ['...'],
});
AFTER:
StoreDevtoolsModule.instrument({
actionsSafelist: ['...'],
actionsBlocklist: ['...'],
});
7.4.0 (2019-03-29)
- example-app: add visual testing with Applitools (#1605) (8856210)
- schematics: use plural for entity schematics reducer key (#1596) (1e49530), closes #1412
- store: add action creator functions (#1654) (e7fe28b), closes #1480 #1634
7.3.0 (2019-02-27)
- 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)
7.2.0 (2019-01-29)
- 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
- 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)
- 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
- example: make the example app more user friendly (#1508) (ac4fb88)
- router-store: add routerState to action payload (#1511) (283424f)
- schematics: add ng add support for @ngrx/entity (#1503) (da1c955)
- schematics: implement router store ng-add (#1487) (9da4aac), closes #1479
- store: support store config factory for feature (#1445) (6aa5645), closes #1414
7.0.0 (2018-12-20)
- 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
7.0.0-beta.1 (2018-12-04)
- 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)
- 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)
- routerstore: change default state key to router (#1258) (e8173d9)
- RouterStore: normalize actions (#1302) (466e2cd)
- 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
- router-store: The default router serializer now returns a
null
value forrouteConfig
whenrouteConfig
doesn't exist on theActivatedRouteSnapshot
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)
- 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)
- 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)
- 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)
- 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)
- implement ng add for store and effects packages (db94db7)
6.0.0-beta.3 (2018-05-12)
6.0.0-beta.2 (2018-05-11)
- 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)
- Add ng update support to ngrx packages (#1053) (4f91e9e)
- Schematics: Rename default action type for action blueprint (#1047) (4c4e6a9), closes #1040
- Store: Add support ng update (#1032) (5b4f067)
- 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
andstateInterface
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)
6.0.0-beta.0 (2018-03-31)
- 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)
- Schematcis: Extend from @schematics/angular (0e17aad)
- Schematics: Add support for custom store interface name (#810) (1352d83)
- 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)
- 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)
- 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)
- 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)
- 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)
5.0.0 (2018-01-22)
- 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)
- 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
-
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)
- Add support for Angular 5 (30a8c56)
- Entity: Fix type error for id selectors (#533) (88f672c), closes #525
- 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)
- 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
- 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)
- 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)
- 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)
- 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
4.0.2 (2017-08-02)
- 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
- 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)
- 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)
- 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)
- Effects: Simplified AP, added better error reporting and effects stream control (015107f)
- 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)
- 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 {}