Skip to content

Commit d7e3388

Browse files
authored
Version 2.0.0 Alpha 5 (#178)
* [`babel-plugin-es6-promise`](https://www.npmjs.com/package/babel-plugin-es6-promise) removed from `.babelrc` and dependencies (attempt to fix #175) * [`babel-preset-stage-1`]() removed from `.babelrc` and dependencies (unneeded) * Properties on `FirebaseConnect` initialized using [property initializers syntax](https://babeljs.io/docs/plugins/transform-class-properties/) instead of constructor * [`transform-decorators-legacy`](https://www.npmjs.com/package/babel-preset-decorators-legacy) only applied in test environment
1 parent 78fc2fa commit d7e3388

File tree

3 files changed

+15
-17
lines changed

3 files changed

+15
-17
lines changed

.babelrc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
2-
"presets": ["es2015", "stage-1", "react"],
2+
"presets": ["es2015", "react"],
33
"plugins": [
4-
"es6-promise",
54
"add-module-exports",
65
"lodash",
76
"transform-object-rest-spread",
87
"transform-object-assign",
9-
"transform-class-properties",
10-
"transform-decorators-legacy"
11-
]
8+
"transform-class-properties"
9+
],
10+
"env": {
11+
"test": {
12+
"plugins": ["transform-decorators-legacy"]
13+
}
14+
}
1215
}

package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-firebase",
3-
"version": "2.0.0-alpha.4",
3+
"version": "2.0.0-alpha.5",
44
"description": "Redux integration for Firebase. Comes with a Higher Order Component for use with React.",
55
"main": "lib/index.js",
66
"module": "es/index.js",
@@ -10,8 +10,8 @@
1010
"clean": "rimraf dist",
1111
"lint": "eslint src/** tests/**",
1212
"lint:fix": "npm run lint -- --fix",
13-
"test": "mocha -R spec --compilers js:babel-core/register ./tests/setup.js ./tests/**/*.spec.js",
14-
"test:cov": "istanbul cover ./node_modules/mocha/bin/_mocha -- ./tests/** --recursive --report lcov --compilers js:babel-register --require babel-polyfill",
13+
"test": "cross-env BABEL_ENV=test mocha -R spec --compilers js:babel-core/register ./tests/setup.js ./tests/**/*.spec.js",
14+
"test:cov": "cross-env BABEL_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha -- ./tests/** --recursive --report lcov --compilers js:babel-register --require babel-polyfill",
1515
"codecov": "cat coverage/*/lcov.info | codecov",
1616
"build:commonjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib",
1717
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
@@ -55,7 +55,6 @@
5555
"redux-react-firebase"
5656
],
5757
"dependencies": {
58-
"es6-promise": "^4.1.0",
5958
"firebase": "^4.1.3",
6059
"hoist-non-react-statics": "^1.2.0",
6160
"jwt-decode": "^2.2.0",
@@ -71,7 +70,6 @@
7170
"babel-eslint": "^7.2.1",
7271
"babel-loader": "^6.4.1",
7372
"babel-plugin-add-module-exports": "^0.2.1",
74-
"babel-plugin-es6-promise": "^1.1.1",
7573
"babel-plugin-lodash": "^3.2.11",
7674
"babel-plugin-transform-class-properties": "^6.23.0",
7775
"babel-plugin-transform-decorators-legacy": "^1.3.4",
@@ -80,7 +78,6 @@
8078
"babel-plugin-transform-runtime": "^6.23.0",
8179
"babel-preset-es2015": "^6.24.0",
8280
"babel-preset-react": "^6.23.0",
83-
"babel-preset-stage-1": "^6.22.0",
8481
"babel-register": "^6.24.0",
8582
"chai": "^3.5.0",
8683
"chai-as-promised": "^6.0.0",

src/connect.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,14 @@ export const createFirebaseConnect = (storeKey = 'store') => (dataOrFn = []) =>
5656
* }))(fbWrapped)
5757
*/
5858
class FirebaseConnect extends Component {
59-
constructor (props, context) {
60-
super(props, context)
61-
this._firebaseEvents = []
62-
this.firebase = null
63-
}
64-
6559
static contextTypes = {
6660
[storeKey]: PropTypes.object.isRequired
6761
};
6862

63+
_firebaseEvents = []
64+
65+
firebase = null
66+
6967
componentWillMount () {
7068
const { firebase, dispatch } = this.context[storeKey]
7169

0 commit comments

Comments
 (0)