Skip to content

Commit 92d919e

Browse files
chore: release 19.2.1
1 parent afb6528 commit 92d919e

File tree

26 files changed

+95
-45
lines changed

26 files changed

+95
-45
lines changed

CHANGELOG.md

Lines changed: 63 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
<a name="19.2.1"></a>
2+
3+
## [19.2.1](https://github.com/ngrx/platform/compare/19.2.0...19.2.1) (2025-05-29)
4+
5+
### Bug Fixes
6+
7+
- **signals:** add current state as second argument of case reducer ([#4800](https://github.com/ngrx/platform/issues/4800)) ([95dbbfa](https://github.com/ngrx/platform/commit/95dbbfa))
8+
- **signals:** expose WritableStateSource to withFeature callback ([#4792](https://github.com/ngrx/platform/issues/4792)) ([afb6528](https://github.com/ngrx/platform/commit/afb6528)), closes [#4766](https://github.com/ngrx/platform/issues/4766)
9+
110
<a name="19.2.0"></a>
211

312
# [19.2.0](https://github.com/ngrx/platform/compare/19.1.0...19.2.0) (2025-05-12)
@@ -65,10 +74,18 @@ BEFORE:
6574

6675
```ts
6776
import { computed, Signal } from '@angular/core';
68-
import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals';
77+
import {
78+
signalStoreFeature,
79+
SignalStoreFeature,
80+
type,
81+
withComputed,
82+
} from '@ngrx/signals';
6983
import { EntityComputed } from '@ngrx/signals/entities';
7084

71-
export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; computed: EntityComputed<Entity>; methods: {} }, { state: {}; computed: { total: Signal<number> }; methods: {} }> {
85+
export function withTotalEntities<Entity>(): SignalStoreFeature<
86+
{ state: {}; computed: EntityComputed<Entity>; methods: {} },
87+
{ state: {}; computed: { total: Signal<number> }; methods: {} }
88+
> {
7289
return signalStoreFeature(
7390
{ computed: type<EntityComputed<Entity>>() },
7491
withComputed(({ entities }) => ({
@@ -82,10 +99,18 @@ AFTER:
8299

83100
```ts
84101
import { computed, Signal } from '@angular/core';
85-
import { signalStoreFeature, SignalStoreFeature, type, withComputed } from '@ngrx/signals';
102+
import {
103+
signalStoreFeature,
104+
SignalStoreFeature,
105+
type,
106+
withComputed,
107+
} from '@ngrx/signals';
86108
import { EntityProps } from '@ngrx/signals/entities';
87109

88-
export function withTotalEntities<Entity>(): SignalStoreFeature<{ state: {}; props: EntityProps<Entity>; methods: {} }, { state: {}; props: { total: Signal<number> }; methods: {} }> {
110+
export function withTotalEntities<Entity>(): SignalStoreFeature<
111+
{ state: {}; props: EntityProps<Entity>; methods: {} },
112+
{ state: {}; props: { total: Signal<number> }; methods: {} }
113+
> {
89114
return signalStoreFeature(
90115
{ props: type<EntityProps<Entity>>() },
91116
withComputed(({ entities }) => ({
@@ -685,15 +710,17 @@ const authApiActions = createActionGroup({
685710
});
686711

687712
// generated actions:
688-
const { loginSuccess, loginFailure, logoutSuccess, logoutfailure } = authApiActions;
713+
const { loginSuccess, loginFailure, logoutSuccess, logoutfailure } =
714+
authApiActions;
689715
```
690716

691717
AFTER:
692718

693719
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.
694720

695721
```ts
696-
const { logInSuccess, loginFailure, logoutSuccess, logoutFailure } = authApiActions;
722+
const { logInSuccess, loginFailure, logoutSuccess, logoutFailure } =
723+
authApiActions;
697724
```
698725

699726
- **store:** The `createFeature` signature with root state is removed in favor of a signature without root state.
@@ -920,13 +947,17 @@ export class TestComponent {
920947
BEFORE:
921948

922949
```html
923-
<ng-container *ngrxLet="obs$; $error as e; $complete as c"> ... </ng-container>
950+
<ng-container *ngrxLet="obs$; $error as e; $complete as c">
951+
...
952+
</ng-container>
924953
```
925954

926955
AFTER:
927956

928957
```html
929-
<ng-container *ngrxLet="obs$; error as e; complete as c"> ... </ng-container>
958+
<ng-container *ngrxLet="obs$; error as e; complete as c">
959+
...
960+
</ng-container>
930961
```
931962

932963
<a name="15.0.0-beta.1"></a>
@@ -2454,7 +2485,10 @@ login$ = createEffect(() =>
24542485
ofType(LoginPageActions.login),
24552486
mapToAction(
24562487
// Happy path callback
2457-
(action) => this.authService.login(action.credentials).pipe(map((user) => AuthApiActions.loginSuccess({ user }))),
2488+
(action) =>
2489+
this.authService
2490+
.login(action.credentials)
2491+
.pipe(map((user) => AuthApiActions.loginSuccess({ user }))),
24582492
// error callback
24592493
(error) => AuthApiActions.loginFailure({ error })
24602494
)
@@ -2471,7 +2505,12 @@ login$ = createEffect(
24712505
ofType(LoginPageActions.login),
24722506
mapToAction(
24732507
// Happy path callback
2474-
(action) => this.authService.login(action.credentials).pipe(map((user) => AuthApiActions.loginSuccess({ user }))),
2508+
(action) =>
2509+
this.authService
2510+
.login(action.credentials)
2511+
.pipe(
2512+
map((user) => AuthApiActions.loginSuccess({ user }))
2513+
),
24752514
// error callback
24762515
(error) => AuthApiActions.loginFailure({ error })
24772516
)
@@ -2579,7 +2618,10 @@ export class AppModule {}
25792618
BEFORE:
25802619

25812620
```ts
2582-
const getTodosById = createSelector((state: TodoAppSchema, id: number) => state.todos.find((p) => p.id === id));
2621+
const getTodosById = createSelector(
2622+
(state: TodoAppSchema, id: number) =>
2623+
state.todos.find((p) => p.id === id)
2624+
);
25832625
```
25842626

25852627
AFTER:
@@ -3129,7 +3171,9 @@ Router state snapshot is returned as a SerializedRouterStateSnapshot with cyclic
31293171
After:
31303172

31313173
```ts
3132-
actions$.ofType('SOME_ACTION').map((action: SomeActionWithPayload) => action.payload);
3174+
actions$
3175+
.ofType('SOME_ACTION')
3176+
.map((action: SomeActionWithPayload) => action.payload);
31333177
```
31343178

31353179
- **ErrorHandler:** The ErrorReporter has been replaced with ErrorHandler
@@ -3334,7 +3378,13 @@ AFTER:
33343378
export class AppModule {}
33353379

33363380
@NgModule({
3337-
imports: [EffectsModule.forFeature([FeatureSourceA, FeatureSourceB, FeatureSourceC])],
3381+
imports: [
3382+
EffectsModule.forFeature([
3383+
FeatureSourceA,
3384+
FeatureSourceB,
3385+
FeatureSourceC,
3386+
]),
3387+
],
33383388
})
33393389
export class SomeFeatureModule {}
33403390
```

modules/component-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngrx/component-store",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"description": "Reactive store for component state",
55
"repository": {
66
"type": "git",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const platformVersion = '^19.2.0';
1+
export const platformVersion = '^19.2.1';

modules/component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngrx/component",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"description": "Reactive Extensions for Angular Components",
55
"repository": {
66
"type": "git",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const platformVersion = '^19.2.0';
1+
export const platformVersion = '^19.2.1';

modules/data/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngrx/data",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"description": "API management for NgRx",
55
"repository": {
66
"type": "git",
@@ -22,9 +22,9 @@
2222
"peerDependencies": {
2323
"@angular/common": "^19.0.0",
2424
"@angular/core": "^19.0.0",
25-
"@ngrx/store": "19.2.0",
26-
"@ngrx/effects": "19.2.0",
27-
"@ngrx/entity": "19.2.0",
25+
"@ngrx/store": "19.2.1",
26+
"@ngrx/effects": "19.2.1",
27+
"@ngrx/entity": "19.2.1",
2828
"rxjs": "^6.5.3 || ^7.5.0"
2929
},
3030
"schematics": "./schematics/collection.json",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const platformVersion = '^19.2.0';
1+
export const platformVersion = '^19.2.1';

modules/effects/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngrx/effects",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"description": "Side effect model for @ngrx/store",
55
"repository": {
66
"type": "git",
@@ -22,7 +22,7 @@
2222
"homepage": "https://github.com/ngrx/platform#readme",
2323
"peerDependencies": {
2424
"@angular/core": "^19.0.0",
25-
"@ngrx/store": "19.2.0",
25+
"@ngrx/store": "19.2.1",
2626
"rxjs": "^6.5.3 || ^7.5.0"
2727
},
2828
"schematics": "./schematics/collection.json",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const platformVersion = '^19.2.0';
1+
export const platformVersion = '^19.2.1';

modules/entity/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngrx/entity",
3-
"version": "19.2.0",
3+
"version": "19.2.1",
44
"description": "Common utilities for entity reducers",
55
"repository": {
66
"type": "git",
@@ -21,7 +21,7 @@
2121
"homepage": "https://github.com/ngrx/platform#readme",
2222
"peerDependencies": {
2323
"@angular/core": "^19.0.0",
24-
"@ngrx/store": "19.2.0",
24+
"@ngrx/store": "19.2.1",
2525
"rxjs": "^6.5.3 || ^7.5.0"
2626
},
2727
"schematics": "./schematics/collection.json",

0 commit comments

Comments
 (0)