Skip to content
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
62 changes: 33 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-redux-firebase",
"version": "1.4.0-beta.4",
"version": "1.4.0-rc.1",
"description": "Redux integration for Firebase. Comes with a Higher Order Component for use with React.",
"browser": "dist/react-redux-firebase.js",
"main": "lib/index.js",
Expand All @@ -17,6 +17,7 @@
"build:es": "cross-env BABEL_ENV=es babel src --out-dir es",
"build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-redux-firebase.js",
"build:umd:min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
"build:size": "cross-env SIZE=true BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-redux-firebase.min.js",
"build": "npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:umd:min",
"watch": "npm run build:commonjs -- --watch",
"prepublish": "npm run clean && npm run build",
Expand Down Expand Up @@ -49,58 +50,61 @@
}
],
"dependencies": {
"es6-promise": "^4.0.5",
"firebase": "^3.7.3",
"es6-promise": "^4.1.0",
"firebase": "^3.7.5",
"hoist-non-react-statics": "^1.2.0",
"immutable": "^3.8.1",
"jwt-decode": "^2.1.0",
"jwt-decode": "^2.2.0",
"lodash": "^4.17.4"
},
"peerDependencies": {
"react": "^0.14.6 || ^15.0.0"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.0",
"babel-cli": "^6.24.0",
"babel-core": "^6.24.0",
"babel-eslint": "^7.2.1",
"babel-loader": "^6.4.1",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-plugin-es6-promise": "^1.0.0",
"babel-plugin-lodash": "^3.2.9",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-es6-promise": "^1.1.1",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-transform-class-properties": "^6.23.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-object-rest-spread": "^6.22.0",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-runtime": "^6.23.0",
"babel-preset-es2015": "^6.18.0",
"babel-preset-react": "^6.16.0",
"babel-preset-stage-1": "^6.16.0",
"babel-register": "^6.3.13",
"babel-preset-es2015": "^6.24.0",
"babel-preset-react": "^6.23.0",
"babel-preset-stage-1": "^6.22.0",
"babel-register": "^6.24.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"codecov": "^1.0.1",
"codecov": "^2.1.0",
"cross-env": "^1.0.7",
"docdown": "^0.7.2",
"documentation": "^4.0.0-beta15",
"documentation-markdown-api-theme": "^1.0.2",
"eslint": "^3.10.2",
"eslint-config-standard": "^6.2.1",
"eslint-config-standard-react": "^4.2.0",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-promise": "^3.0.0",
"eslint-plugin-react": "^6.7.1",
"eslint-plugin-standard": "^2.0.1",
"eslint": "^3.19.0",
"eslint-config-standard": "^10.0.0",
"eslint-config-standard-react": "^4.3.0",
"eslint-plugin-babel": "^4.1.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-node": "^4.2.2",
"eslint-plugin-promise": "^3.5.0",
"eslint-plugin-react": "^6.10.3",
"eslint-plugin-standard": "^2.2.0",
"gitbook-cli": "^2.3.0",
"istanbul": "^1.1.0-alpha.1",
"jsdom": "^9.8.3",
"mocha": "^3.1.2",
"jsdom": "^9.12.0",
"mocha": "^3.2.0",
"react": "^15.4.2",
"react-addons-test-utils": "^15.4.2",
"react-dom": "^15.4.2",
"redux": "3.6.0",
"rimraf": "^2.5.4",
"sinon": "^1.17.6",
"sinon-chai": "^2.8.0",
"rimraf": "^2.6.1",
"sinon": "^2.1.0",
"sinon-chai": "^2.9.0",
"webpack": "^1.14.0",
"webpack-bundle-analyzer": "^2.3.1",
"xmlhttprequest": "^1.8.0"
},
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/actions/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const init = (dispatch, firebase) => {
})
}

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

dispatch({ type: AUTHENTICATION_INIT_FINISHED })
}
Expand Down
1 change: 0 additions & 1 deletion src/connect.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { getEventsFromInput, createCallable } from './utils'
*/
export default (dataOrFn = []) => WrappedComponent => {
class FirebaseConnect extends Component {

constructor (props, context) {
super(props, context)
this._firebaseEvents = []
Expand Down
2 changes: 0 additions & 2 deletions src/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default (state = initialState, action = {}) => {
let retVal

switch (action.type) {

case START:
pathArr = pathToArr(path)
retVal = (requesting !== undefined)
Expand Down Expand Up @@ -161,6 +160,5 @@ export default (state = initialState, action = {}) => {

default:
return state

}
}
46 changes: 29 additions & 17 deletions tests/unit/compose.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,49 @@ describe('Compose', () => {
})
})

describe('set', () =>
helpers.set('test', {some: 'asdf'})
)

describe('setWithMeta', () => {
describe('set', () => {
it('accepts object', () =>
helpers.setWithMeta('test', {some: 'asdf'})
expect(helpers.set('test', {some: 'asdf'})).to.eventually.become(undefined)
)
it('does not attach meta to string', () =>
})

describe('setWithMeta', () => {
describe('accepts object', () => {
it('accepts object', () =>
expect(helpers.setWithMeta('test', {some: 'asdf'})).to.eventually.become(undefined)
)
})

describe('does not attach meta to string', () => {
// TODO: confirm that data set actually does not include meta
helpers.setWithMeta('test', 'asdd')
)
it('accepts object', () =>
expect(helpers.setWithMeta('test', 'asdd')).to.eventually.become(undefined)
)
})
})

describe('push', () =>
helpers.push('test', {some: 'asdf'})
)
describe('push', () => {
it('accepts object', () =>
expect(helpers.push('test', {some: 'asdf'})).to.eventually.have.property('key')
)
})

describe('pushWithMeta', () => {
it('accepts object', () =>
helpers.pushWithMeta('test', {some: 'asdf'})
expect(helpers.pushWithMeta('test', {some: 'asdf'})).to.eventually.have.property('key')
)
})

describe('update', () =>
helpers.update('test', {some: 'asdf'})
)
describe('update', () => {
it('accepts object', () =>
// undefined represents snapshot
expect(helpers.update('test', {some: 'asdf'})).to.eventually.become(undefined)
)
})

describe('updateWithMeta', () => {
it('accepts object', () =>
helpers.updateWithMeta('test', {some: 'asdf'})
expect(helpers.updateWithMeta('test', {some: 'asdf'})).to.eventually.become(undefined)
)
})

Expand Down
8 changes: 8 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const webpack = require('webpack')
const pkg = require('./package.json')
const env = process.env.NODE_ENV
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin

const config = {
module: {
Expand Down Expand Up @@ -41,6 +42,12 @@ if (env === 'production') {
}
})
)

if (process.env.SIZE) {
config.plugins.push(
new BundleAnalyzerPlugin()
)
}
}

config.plugins.push(
Expand All @@ -52,4 +59,5 @@ config.plugins.push(
{ raw: false, entryOnly: true }
)
)

module.exports = config
Loading