Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngrx/router-store

Package Overview
Dependencies
Maintainers
4
Versions
140
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/router-store - npm Package Versions

1
14

9.0.0-beta.0

Diff

Changelog

Source

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

Bug Fixes

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

Chores

Code Refactoring

Features

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

BREAKING CHANGES

  • router: The MinimalRouterStateSerializer is enabled by default.

BEFORE:

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

AFTER:

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

  • effects: resubscribeOnError renamed to useEffectsErrorHandler in createEffect metadata

BEFORE:

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

AFTER:

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

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

AFTER:

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

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

BEFORE:


ng generate action User --spec

AFTER:


ng generate action User

  • store: BEFORE:

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

AFTER:

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

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

BEFORE:

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

AFTER:

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

BEFORE:

Immutability checks are opt-in.

AFTER:

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

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

BEFORE:

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

AFTER:

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

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

AFTER:

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

sh ng generate reducer ReducerName --creators=false

  • Libraries will depend on Angular version 9

<a name="8.6.0"></a>

brandonroberts
published 8.6.0 •

Changelog

Source

8.6.0 (2019-12-18)

Features

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

<a name="8.5.2"></a>

brandonroberts
published 8.5.2 •

Changelog

Source

8.5.2 (2019-11-21)

Bug Fixes

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

<a name="8.5.1"></a>

brandonroberts
published 8.5.1 •

Changelog

Source

8.5.1 (2019-11-12)

Bug Fixes

<a name="8.5.0"></a>

brandonroberts
published 8.5.0 •

Changelog

Source

8.5.0 (2019-11-07)

Bug Fixes

Features

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

<a name="8.4.0"></a>

brandonroberts
published 8.4.0 •

Changelog

Source

8.4.0 (2019-10-09)

Bug Fixes

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

Features

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

<a name="8.3.0"></a>

brandonroberts
published 8.3.0 •

Changelog

Source

8.3.0 (2019-08-29)

Bug Fixes

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

Features

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

<a name="8.2.0"></a>

brandonroberts
published 8.2.0 •

Changelog

Source

8.2.0 (2019-07-31)

Bug Fixes

Features

<a name="8.1.0"></a>

brandonroberts
published 8.1.0 •

Changelog

Source

8.1.0 (2019-07-09)

Bug Fixes

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

Features

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

<a name="8.0.1"></a>

brandonroberts
published 8.0.1 •

Changelog

Source

8.0.1 (2019-06-10)

Bug Fixes

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

<a name="8.0.0"></a>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc