raven-for-redux
Advanced tools
Comparing version 0.7.1 to 1.0.0
{ | ||
"name": "raven-for-redux", | ||
"version": "0.7.1", | ||
"version": "1.0.0", | ||
"description": "Middleware for propagating Redux state/actions to Sentry via Raven.", | ||
"main": "built/index.js", | ||
"scripts": { | ||
"format": "prettier --write *.js", | ||
"fix": "eslint --fix .", | ||
"tdd": "jest --watch", | ||
@@ -44,2 +44,3 @@ "test": "jest --coverage && npm run lint", | ||
"eslint-config-prettier": "^1.0.2", | ||
"eslint-plugin-prettier": "^2.0.1", | ||
"jest": "^18.1.0", | ||
@@ -51,3 +52,13 @@ "jest-cli": "^18.1.0", | ||
"webpack-dev-server": "^2.4.1" | ||
}, | ||
"jest": { | ||
"coverageThreshold": { | ||
"global": { | ||
"branches": 50, | ||
"functions": 100, | ||
"lines": 100, | ||
"statements": 100 | ||
} | ||
} | ||
} | ||
} | ||
} |
@@ -21,3 +21,4 @@ [![Travis](https://img.shields.io/travis/captbaritone/raven-for-redux.svg)]() [![Codecov](https://img.shields.io/codecov/c/github/captbaritone/raven-for-redux.svg)]() | ||
// store.js | ||
import Raven from "raven-js"; | ||
import Raven from "raven-js"; // Or, you might already have this as `window.Raven`. | ||
import { createStore, applyMiddleware } from "redux"; | ||
@@ -28,3 +29,2 @@ import createRavenMiddleware from "raven-for-redux"; | ||
// Or, you might already have Raven as `window.Raven`. | ||
Raven.config("<YOUR_DSN>").install(); | ||
@@ -35,5 +35,7 @@ | ||
applyMiddleware( | ||
// Middlewares, like redux-thunk` that intercept or emit actions should | ||
// preceed raven-for-redux. | ||
createRavenMiddleware(Raven) | ||
// Middlewares, like `redux-thunk` that intercept or emit actions should | ||
// precede `raven-for-redux`. | ||
createRavenMiddleware(Raven, { | ||
// Optionally pass some options here. | ||
}) | ||
) | ||
@@ -43,2 +45,4 @@ ); | ||
For a working example, see the [example](./example/) directory. | ||
## Improvements | ||
@@ -53,3 +57,4 @@ | ||
`<script>` tag. | ||
2. Adds your state as context to _all_ errors, not just reducer exceptions. | ||
2. Adds your state and last action as context to _all_ errors, not just reducer | ||
exceptions. | ||
@@ -130,2 +135,6 @@ ## API: `createRavenMiddleware(Raven, [options])` | ||
### 1.0.0 | ||
* No changes. Just bringing the project out of beta. | ||
### 0.7.1 | ||
@@ -132,0 +141,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8757
0
155
13