-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(RouterStore): don't navigate on NavigationStart router event #1378
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…moved (#1240) BREAKING CHANGE: BEFORE: ```ts {type: '@ngrx/store/update-reducers', feature: 'feature1'} {type: '@ngrx/store/update-reducers', feature: 'feature2'} ``` AFTER: ```ts {type: '@ngrx/store/update-reducers', features: ['feature1', 'feature2']} ```
We can't link directly to https://stackblitz.com/github/ngrx/platform due to schematics source files being parsed as TypeScript files. This generates an HTML file that will open with just the example application. Closes #1215
BREAKING CHANGE: The default state key is changed from routerReducer to router
…rnal router hook, more typesafety for router state
BREAKING CHANGE: 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 }
lint staged was processing all files with the update it only processes the modified files
use ngrx branding
this does not fix the issue but makes it more readable
It is based on TS2.8 introduced conditional types. Upgrade package.json to that version. Also remove the deprecated non-pipable version of `ofType` so that we don't have to keep complicated types in two places. Fixes some tests post removal of non-pipeable version. Original implementation by @mtaran-google. BREAKING CHANGES: 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')) ```
Introduces `@ngrx/store/testing` that provides a mock store for using in test setup Closes #915 ```ts import { Store } from '@ngrx/store'; import { provideMockStore, MockStore } from '@ngrx/store/testing'; import { take } from 'rxjs/operators'; describe('Mock Store', () => { let mockStore: MockStore<{ counter1: number, counter2: number }>; beforeEach(() => { const initialState = { counter1: 0, counter2: 1 }; TestBed.configureTestingModule({ providers: [provideMockStore({ initialState })], }); mockStore = TestBed.get(Store); }); it('should set the new state', () => { mockStore.setState({ counter1: 1, counter2: 2 }); mockStore.pipe(take(1)).subscribe(state => { expect(state.counter1).toBe(1); }); }); }); ```
3 tasks
I started from the wrong branch, one second... 😅 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: #1373
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Closes #1373