Skip to content

Commit

Permalink
* update dependecies
Browse files Browse the repository at this point in the history
* cleanup
* fix linting errors
* replace deep-freeze with deep-freeze-strict
* bump version
  • Loading branch information
aegyed91 committed Dec 15, 2016
1 parent 963d70a commit 26ab611
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngrx-store-freeze",
"version": "0.1.4",
"version": "0.1.5",
"description": "@ngrx/store meta reducer that prevents state from being mutated.",
"main": "./dist/index.js",
"scripts": {
Expand Down Expand Up @@ -38,23 +38,22 @@
},
"homepage": "https://github.com/codewareio/ngrx-store-freeze/issues#readme",
"peerDependencies": {
"rxjs": "5.0.0-beta.12",
"@angular/core": "^2.0.2",
"@ngrx/store": "^2.0.0"
"rxjs": "5.0.0-rc.4",

This comment has been minimized.

Copy link
@kondi

kondi Dec 21, 2016

At the time of your commit the rxjs final was already out. Is there a reason you have not upgraded to "^5.0.1" or at least "~5.0.1"?

This comment has been minimized.

Copy link
@aegyed91

aegyed91 Dec 21, 2016

Author Collaborator

Yes, because angular 2.3.0 used rxjs 5.0.0-rc.4 at the time. I see now there is angular 4.0.0-beta.0 which uses the final version of rxjs.

This comment has been minimized.

Copy link
@kondi

kondi Dec 21, 2016

I see, thanks. 2.4.0 depends on the final one as well. I have upgraded angular minor version, then it was conflicting with ngrx-store-freeze.
Actually, do you have to specify the peerDependency at all here? @angular/core and @ngrx/core already specifying it and you are not even using it directly. Btw @ngrx/store is using a less strict "^5.0.0-beta.12" semver version.

This comment has been minimized.

Copy link
@aegyed91

aegyed91 Dec 21, 2016

Author Collaborator

You are right, published 0.1.6 and removed the rxjs dependencies. 💃

This comment has been minimized.

Copy link
@kondi

kondi Dec 21, 2016

Szuper, köszi ;)

This comment has been minimized.

Copy link
@aegyed91

aegyed91 Dec 21, 2016

Author Collaborator

nm :D ha valami miatt veletlen nem menne pingelj meg

"@angular/core": "^2.3.0",
"@ngrx/store": "^2.2.1"
},
"dependencies": {
"deep-freeze": "^0.0.1"
"deep-freeze-strict": "^1.1.1"
},
"devDependencies": {
"@angular/core": "^2.0.2",
"@angular/core": "^2.3.0",
"@ngrx/core": "^1.2.0",
"@ngrx/store": "^2.2.1",
"@types/core-js": "^0.9.34",
"@types/deep-freeze": "0.0.29",
"@types/core-js": "^0.9.35",
"rimraf": "^2.5.4",
"rxjs": "5.0.0-beta.12",
"tslint": "^3.15.1",
"typescript": "^2.0.3"
"rxjs": "5.0.0-rc.4",
"tslint": "^4.0.2",
"typescript": "^2.1.4"
},
"typings": "./dist/index.d.ts"
}
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionReducer } from '@ngrx/store';
import * as deepFreeze from 'deep-freeze';
import * as deepFreeze from 'deep-freeze-strict';

/**
* Middleware that prevents state from being mutated anywhere in the app.
Expand All @@ -9,7 +9,7 @@ export function storeFreeze(reducer): ActionReducer<any> {
return function (state = {}, action) {

deepFreeze(state);

// guard against trying to freeze null or undefined types
if (action.payload) {
deepFreeze(action.payload);
Expand Down
4 changes: 1 addition & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
"outDir": "dist",
"declaration": true,
"types": [
"core-js",
"deep-freeze"
"core-js"
]
},
"sources": [
"typings/index.d.ts",
"src/index.ts"
]
}

0 comments on commit 26ab611

Please sign in to comment.