Skip to content

Update to angular 2.0.0 final #224

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

Merged
merged 1 commit into from
Sep 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions examples/counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
},
"homepage": "https://github.com/wbuchwalter/ng2-redux#readme",
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/core": "^2.0.0",
"@angular/http": "^2.0.0",
"@angular/platform-browser": "^2.0.0",
"@angular/platform-browser-dynamic": "^2.0.0",
"core-js": "^2.3.0",
"ng2-redux": "^3.3.9",
"ng2-redux": "^4.0.0-beta.0",
"redux": "^3.5.0",
"redux-logger": "^2.6.1",
"redux-localstorage": "^0.4.0",
"reflect-metadata": "0.1.3",
"rxjs": "5.0.0-beta.11",
"zone.js": "^0.6.15"
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.21"
},
"devDependencies": {
"@types/core-js": "^0.9.32",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"homepage": "https://github.com/angular-redux/ng2-redux#readme",
"devDependencies": {
"@angular/core": "2.0.0-rc.6",
"@angular/core": "^2.0.0",
"@types/chai": "^3.4.31",
"@types/es6-shim": "0.0.30",
"@types/mocha": "^2.2.30",
Expand All @@ -60,10 +60,10 @@
"mocha": "^2.4.5",
"nyc": "^8.1.0",
"proxyquire": "^1.7.10",
"redux": "^3.4.0",
"redux": "^3.5.0",
"reflect-metadata": "0.1.3",
"rimraf": "^2.5.2",
"rxjs": "5.0.0-beta.11",
"rxjs": "5.0.0-beta.12",
"sinon": "^1.16.1",
"sinon-chai": "^2.8.0",
"symbol-observable": "^1.0.1",
Expand All @@ -73,7 +73,7 @@
"zone.js": "^0.6.17"
},
"peerDependencies": {
"@angular/core": "2.0.0-rc.3 || ^2.0.0-rc.4 || ^2.0.0-rc.5 || ^2.0.0-rc.6",
"@angular/core": "^2.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@e-schultz since we're in beta for ng2-redux v4, I took the opportunity to clean this up as well. Does that make sense to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, part of the reason why I was going for a 4.0 bump anyways.

"redux": "^3.5.0"
},
"nyc": {
Expand Down
9 changes: 8 additions & 1 deletion src/components/ng-redux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export type PathSelector = (string | number)[];
export type FunctionSelector<RootState, S> = ((s: RootState) => S);
export type Comparator = (x: any, y: any) => boolean;

// Workaround for Redux issue #1935 - remove once Redux 3.6.0 is
// released.
type RetypedCompose = (func: Function, ...funcs: Function[]) => Function;

@Injectable()
export class NgRedux<RootState> {
private _store: Store<RootState> = null;
Expand Down Expand Up @@ -80,8 +84,11 @@ export class NgRedux<RootState> {

invariant(!this._store, 'Store already configured!');

// Workaround for Redux issue #1935 - remove once Redux 3.6.0 is
// released.
const reTypedCompose = compose as RetypedCompose;
const finalCreateStore
= <Redux.StoreEnhancerStoreCreator<RootState>>compose(
= <Redux.StoreEnhancerStoreCreator<RootState>>reTypedCompose(
applyMiddleware(...middleware),
...enhancers
)(createStore);
Expand Down