Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngrx/platform
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.5.1
Choose a base ref
...
head repository: ngrx/platform
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8.5.2
Choose a head ref
  • 6 commits
  • 8 files changed
  • 4 contributors

Commits on Nov 13, 2019

  1. Copy the full SHA
    ce6ebb3 View commit details

Commits on Nov 17, 2019

  1. Copy the full SHA
    2fdfe17 View commit details

Commits on Nov 20, 2019

  1. Copy the full SHA
    e888977 View commit details
  2. Copy the full SHA
    c42e444 View commit details

Commits on Nov 21, 2019

  1. Copy the full SHA
    abe1f6b View commit details
  2. chore: release 8.5.2

    brandonroberts committed Nov 21, 2019
    Copy the full SHA
    dc2ad62 View commit details
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -84,9 +84,6 @@ jobs:
- node_modules
# required since `publish-*` jobs have tag filters AND requires `test`
# https://circleci.com/docs/2.0/workflows/#executing-workflows-for-a-git-tag
filters:
tags:
only: /.*/

schematics-core-check:
<<: *run_in_browser
@@ -250,13 +247,19 @@ workflows:
version: 2
build-test-deploy:
jobs:
- install
- install:
filters:
tags:
only: /.*/
- lint:
requires:
- install
- test:
requires:
- install
filters:
tags:
only: /.*/
- example-tests:
requires:
- install
@@ -296,22 +299,22 @@ workflows:
- test
filters:
tags:
only: /8\.\d+\.\d+(?!-\w+\.\d)/
only: /9\.\d+\.\d+(?!-\w+\.\d)/
branches:
ignore: /.*/
- deploy-docs-stable:
requires:
- test
filters:
tags:
only: /8\.\d+\.\d+(?!-\w+\.\d)/
only: /9\.\d+\.\d+(?!-\w+\.\d)/
branches:
ignore: /.*/
- publish-next:
requires:
- test
filters:
tags:
only: /8\.\d+\.\d+(-\w+\.\d)/
only: /9\.\d+\.\d+(-\w+\.\d)/
branches:
ignore: /.*/
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="8.5.2"></a>

## [8.5.2](https://github.com/ngrx/platform/compare/8.5.1...8.5.2) (2019-11-21)

### Bug Fixes

- **effects:** add EffectsRootModule and EffectsFeatureModule to public API ([#2273](https://github.com/ngrx/platform/issues/2273)) ([abe1f6b](https://github.com/ngrx/platform/commit/abe1f6b))
- **store:** added noop for addFeature in MockReducerManager ([#2265](https://github.com/ngrx/platform/issues/2265)) ([c42e444](https://github.com/ngrx/platform/commit/c42e444)), closes [#2263](https://github.com/ngrx/platform/issues/2263)
- **store-devtools:** escaping the safelist and blocklist strings ([#2259](https://github.com/ngrx/platform/issues/2259)) ([e888977](https://github.com/ngrx/platform/commit/e888977)), closes [#2228](https://github.com/ngrx/platform/issues/2228)

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

## [8.5.1](https://github.com/ngrx/platform/compare/8.5.0...8.5.1) (2019-11-12)
7 changes: 6 additions & 1 deletion modules/effects/src/index.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,12 @@ export { Actions, ofType } from './actions';
export { EffectsModule } from './effects_module';
export { EffectSources } from './effect_sources';
export { EffectNotification } from './effect_notification';
export { ROOT_EFFECTS_INIT, rootEffectsInit } from './effects_root_module';
export { EffectsFeatureModule } from './effects_feature_module';
export {
ROOT_EFFECTS_INIT,
rootEffectsInit,
EffectsRootModule,
} from './effects_root_module';
export { act } from './act';
export {
OnIdentifyEffects,
30 changes: 21 additions & 9 deletions modules/store-devtools/spec/extension.spec.ts
Original file line number Diff line number Diff line change
@@ -374,14 +374,15 @@ describe('DevtoolsExtension', () => {
});

describe('with Action and actionsBlocklist', () => {
const NORMAL_ACTION = 'NORMAL_ACTION';
const BLOCKED_ACTION = 'BLOCKED_ACTION';
const NORMAL_ACTION = '[Test] NORMAL_ACTION';
const BLOCKED_ACTION_1 = '[Test] BLOCKED_ACTION #1';
const BLOCKED_ACTION_2 = '[Test] BLOCKED_ACTION #2';

beforeEach(() => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({
actionsBlocklist: [BLOCKED_ACTION],
actionsBlocklist: [BLOCKED_ACTION_1, BLOCKED_ACTION_2],
}),
<any>null
);
@@ -402,22 +403,28 @@ describe('DevtoolsExtension', () => {
state
);
devtoolsExtension.notify(
new PerformAction({ type: BLOCKED_ACTION }, 1234567),
new PerformAction({ type: BLOCKED_ACTION_1 }, 1234567),
state
);
devtoolsExtension.notify(
new PerformAction({ type: BLOCKED_ACTION_2 }, 1234567),
state
);

expect(extensionConnection.send).toHaveBeenCalledTimes(2);
});
});

describe('with Action and actionsSafelist', () => {
const NORMAL_ACTION = 'NORMAL_ACTION';
const SAFE_ACTION = 'SAFE_ACTION';
const NORMAL_ACTION = '[Test] NORMAL_ACTION';
const SAFE_ACTION_1 = '[Test] SAFE_ACTION #1';
const SAFE_ACTION_2 = '[Test] SAFE_ACTION #2';

beforeEach(() => {
devtoolsExtension = new DevtoolsExtension(
reduxDevtoolsExtension,
createConfig({
actionsSafelist: [SAFE_ACTION],
actionsSafelist: [SAFE_ACTION_1, SAFE_ACTION_2],
}),
<any>null
);
@@ -438,10 +445,15 @@ describe('DevtoolsExtension', () => {
state
);
devtoolsExtension.notify(
new PerformAction({ type: SAFE_ACTION }, 1234567),
new PerformAction({ type: SAFE_ACTION_1 }, 1234567),
state
);
expect(extensionConnection.send).toHaveBeenCalledTimes(1);
devtoolsExtension.notify(
new PerformAction({ type: SAFE_ACTION_2 }, 1234567),
state
);

expect(extensionConnection.send).toHaveBeenCalledTimes(2);
});
});

14 changes: 12 additions & 2 deletions modules/store-devtools/src/utils.ts
Original file line number Diff line number Diff line change
@@ -166,8 +166,18 @@ export function isActionFiltered(
) {
const predicateMatch = predicate && !predicate(state, action.action);
const safelistMatch =
safelist && !action.action.type.match(safelist.join('|'));
safelist &&
!action.action.type.match(safelist.map(s => escapeRegExp(s)).join('|'));
const blocklistMatch =
blockedlist && action.action.type.match(blockedlist.join('|'));
blockedlist &&
action.action.type.match(blockedlist.map(s => escapeRegExp(s)).join('|'));
return predicateMatch || safelistMatch || blocklistMatch;
}

/**
* Return string with escaped RegExp special characters
* https://stackoverflow.com/a/6969486/1337347
*/
function escapeRegExp(s: string): string {
return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
8 changes: 8 additions & 0 deletions modules/store/testing/src/mock_reducer_manager.ts
Original file line number Diff line number Diff line change
@@ -9,4 +9,12 @@ export class MockReducerManager extends BehaviorSubject<
constructor() {
super(() => undefined);
}

addFeature(feature: any) {
/* noop */
}

addFeatures(feature: any) {
/* noop */
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ngrx/platform",
"version": "8.5.1",
"version": "8.5.2",
"description": "monorepo for ngrx development",
"scripts": {
"build": "bazel build //modules/...",
2 changes: 1 addition & 1 deletion projects/ngrx.io/content/guide/effects/index.md
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ Effects handle external data and interactions, allowing your services to be less
`
})
export class MoviesPageComponent {
movies$: Observable<Movie[]> = this.store.select(state => state.movies);
movies$: Observable&lt;Movie[]&gt; = this.store.select(state => state.movies);

constructor(private store: Store&lt;{ movies: Movie[] }&gt;) {}