Skip to content

Commit 459c222

Browse files
authored
Version v1.4.0 Release Candidate 1 (#110)
* #107 - `build:size` npm script added to generate size report for minified bundle * #109 - Firebase version is not fixed - all v1.4.0-* versions use `^` on firebase * Multiple Dependencies and Dev Dependencies updated (including `firebase` and `jwt-decode`) * Yarn file updated * Compose tests improved promise handling (better use of `chai-as-promised`) * Linting removed from updated `eslint-config-standard` rules
1 parent c960361 commit 459c222

File tree

7 files changed

+489
-190
lines changed

7 files changed

+489
-190
lines changed

package.json

Lines changed: 33 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-redux-firebase",
3-
"version": "1.4.0-beta.4",
3+
"version": "1.4.0-rc.1",
44
"description": "Redux integration for Firebase. Comes with a Higher Order Component for use with React.",
55
"browser": "dist/react-redux-firebase.js",
66
"main": "lib/index.js",
@@ -17,6 +17,7 @@
1717
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
1818
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-redux-firebase.js",
1919
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
20+
"build:size": "cross-env SIZE=true BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
2021
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
2122
"watch": "npm run build:commonjs -- --watch",
2223
"prepublish": "npm run clean && npm run build",
@@ -49,58 +50,61 @@
4950
}
5051
],
5152
"dependencies": {
52-
"es6-promise": "^4.0.5",
53-
"firebase": "^3.7.3",
53+
"es6-promise": "^4.1.0",
54+
"firebase": "^3.7.5",
5455
"hoist-non-react-statics": "^1.2.0",
5556
"immutable": "^3.8.1",
56-
"jwt-decode": "^2.1.0",
57+
"jwt-decode": "^2.2.0",
5758
"lodash": "^4.17.4"
5859
},
5960
"peerDependencies": {
6061
"react": "^0.14.6 || ^15.0.0"
6162
},
6263
"devDependencies": {
63-
"babel-cli": "^6.18.0",
64-
"babel-core": "^6.18.2",
65-
"babel-eslint": "^7.1.0",
66-
"babel-loader": "^6.2.0",
64+
"babel-cli": "^6.24.0",
65+
"babel-core": "^6.24.0",
66+
"babel-eslint": "^7.2.1",
67+
"babel-loader": "^6.4.1",
6768
"babel-plugin-add-module-exports": "^0.2.1",
68-
"babel-plugin-es6-promise": "^1.0.0",
69-
"babel-plugin-lodash": "^3.2.9",
70-
"babel-plugin-transform-class-properties": "^6.22.0",
69+
"babel-plugin-es6-promise": "^1.1.1",
70+
"babel-plugin-lodash": "^3.2.11",
71+
"babel-plugin-transform-class-properties": "^6.23.0",
7172
"babel-plugin-transform-decorators-legacy": "^1.3.4",
72-
"babel-plugin-transform-object-rest-spread": "^6.22.0",
73+
"babel-plugin-transform-object-rest-spread": "^6.23.0",
7374
"babel-plugin-transform-runtime": "^6.23.0",
74-
"babel-preset-es2015": "^6.18.0",
75-
"babel-preset-react": "^6.16.0",
76-
"babel-preset-stage-1": "^6.16.0",
77-
"babel-register": "^6.3.13",
75+
"babel-preset-es2015": "^6.24.0",
76+
"babel-preset-react": "^6.23.0",
77+
"babel-preset-stage-1": "^6.22.0",
78+
"babel-register": "^6.24.0",
7879
"chai": "^3.5.0",
7980
"chai-as-promised": "^6.0.0",
80-
"codecov": "^1.0.1",
81+
"codecov": "^2.1.0",
8182
"cross-env": "^1.0.7",
8283
"docdown": "^0.7.2",
8384
"documentation": "^4.0.0-beta15",
8485
"documentation-markdown-api-theme": "^1.0.2",
85-
"eslint": "^3.10.2",
86-
"eslint-config-standard": "^6.2.1",
87-
"eslint-config-standard-react": "^4.2.0",
88-
"eslint-plugin-babel": "^4.0.0",
89-
"eslint-plugin-promise": "^3.0.0",
90-
"eslint-plugin-react": "^6.7.1",
91-
"eslint-plugin-standard": "^2.0.1",
86+
"eslint": "^3.19.0",
87+
"eslint-config-standard": "^10.0.0",
88+
"eslint-config-standard-react": "^4.3.0",
89+
"eslint-plugin-babel": "^4.1.1",
90+
"eslint-plugin-import": "^2.2.0",
91+
"eslint-plugin-node": "^4.2.2",
92+
"eslint-plugin-promise": "^3.5.0",
93+
"eslint-plugin-react": "^6.10.3",
94+
"eslint-plugin-standard": "^2.2.0",
9295
"gitbook-cli": "^2.3.0",
9396
"istanbul": "^1.1.0-alpha.1",
94-
"jsdom": "^9.8.3",
95-
"mocha": "^3.1.2",
97+
"jsdom": "^9.12.0",
98+
"mocha": "^3.2.0",
9699
"react": "^15.4.2",
97100
"react-addons-test-utils": "^15.4.2",
98101
"react-dom": "^15.4.2",
99102
"redux": "3.6.0",
100-
"rimraf": "^2.5.4",
101-
"sinon": "^1.17.6",
102-
"sinon-chai": "^2.8.0",
103+
"rimraf": "^2.6.1",
104+
"sinon": "^2.1.0",
105+
"sinon-chai": "^2.9.0",
103106
"webpack": "^1.14.0",
107+
"webpack-bundle-analyzer": "^2.3.1",
104108
"xmlhttprequest": "^1.8.0"
105109
},
106110
"license": "MIT",

src/actions/auth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export const init = (dispatch, firebase) => {
244244
})
245245
}
246246

247-
firebase.auth().currentUser
247+
firebase.auth().currentUser // eslint-disable-line no-unused-expressions
248248

249249
dispatch({ type: AUTHENTICATION_INIT_FINISHED })
250250
}

src/connect.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import { getEventsFromInput, createCallable } from './utils'
3333
*/
3434
export default (dataOrFn = []) => WrappedComponent => {
3535
class FirebaseConnect extends Component {
36-
3736
constructor (props, context) {
3837
super(props, context)
3938
this._firebaseEvents = []

src/reducer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export default (state = initialState, action = {}) => {
4949
let retVal
5050

5151
switch (action.type) {
52-
5352
case START:
5453
pathArr = pathToArr(path)
5554
retVal = (requesting !== undefined)
@@ -161,6 +160,5 @@ export default (state = initialState, action = {}) => {
161160

162161
default:
163162
return state
164-
165163
}
166164
}

tests/unit/compose.spec.js

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,49 @@ describe('Compose', () => {
3737
})
3838
})
3939

40-
describe('set', () =>
41-
helpers.set('test', {some: 'asdf'})
42-
)
43-
44-
describe('setWithMeta', () => {
40+
describe('set', () => {
4541
it('accepts object', () =>
46-
helpers.setWithMeta('test', {some: 'asdf'})
42+
expect(helpers.set('test', {some: 'asdf'})).to.eventually.become(undefined)
4743
)
48-
it('does not attach meta to string', () =>
44+
})
45+
46+
describe('setWithMeta', () => {
47+
describe('accepts object', () => {
48+
it('accepts object', () =>
49+
expect(helpers.setWithMeta('test', {some: 'asdf'})).to.eventually.become(undefined)
50+
)
51+
})
52+
53+
describe('does not attach meta to string', () => {
4954
// TODO: confirm that data set actually does not include meta
50-
helpers.setWithMeta('test', 'asdd')
51-
)
55+
it('accepts object', () =>
56+
expect(helpers.setWithMeta('test', 'asdd')).to.eventually.become(undefined)
57+
)
58+
})
5259
})
5360

54-
describe('push', () =>
55-
helpers.push('test', {some: 'asdf'})
56-
)
61+
describe('push', () => {
62+
it('accepts object', () =>
63+
expect(helpers.push('test', {some: 'asdf'})).to.eventually.have.property('key')
64+
)
65+
})
5766

5867
describe('pushWithMeta', () => {
5968
it('accepts object', () =>
60-
helpers.pushWithMeta('test', {some: 'asdf'})
69+
expect(helpers.pushWithMeta('test', {some: 'asdf'})).to.eventually.have.property('key')
6170
)
6271
})
6372

64-
describe('update', () =>
65-
helpers.update('test', {some: 'asdf'})
66-
)
73+
describe('update', () => {
74+
it('accepts object', () =>
75+
// undefined represents snapshot
76+
expect(helpers.update('test', {some: 'asdf'})).to.eventually.become(undefined)
77+
)
78+
})
6779

6880
describe('updateWithMeta', () => {
6981
it('accepts object', () =>
70-
helpers.updateWithMeta('test', {some: 'asdf'})
82+
expect(helpers.updateWithMeta('test', {some: 'asdf'})).to.eventually.become(undefined)
7183
)
7284
})
7385

webpack.config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const webpack = require('webpack')
44
const pkg = require('./package.json')
55
const env = process.env.NODE_ENV
6+
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
67

78
const config = {
89
module: {
@@ -41,6 +42,12 @@ if (env === 'production') {
4142
}
4243
})
4344
)
45+
46+
if (process.env.SIZE) {
47+
config.plugins.push(
48+
new BundleAnalyzerPlugin()
49+
)
50+
}
4451
}
4552

4653
config.plugins.push(
@@ -52,4 +59,5 @@ config.plugins.push(
5259
{ raw: false, entryOnly: true }
5360
)
5461
)
62+
5563
module.exports = config

0 commit comments

Comments
 (0)