Skip to content

Commit

Permalink
bump: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jan 29, 2019
1 parent 788d1d1 commit 754bfcd
Show file tree
Hide file tree
Showing 7 changed files with 1,532 additions and 928 deletions.
45 changes: 23 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
"roots": [
"<rootDir>/test"
],
"setupTestFrameworkScriptFile": "./test/index.js"
"setupFilesAfterEnv": [
"./test/index.js"
]
},
"scripts": {
"test": "jest",
Expand All @@ -54,43 +56,42 @@
"chain-function": "^1.0.0",
"classnames": "^2.2.5",
"invariant": "^2.2.4",
"lodash": "^4.17.10",
"memoize-one": "^4.0.2",
"lodash": "^4.17.11",
"memoize-one": "^5.0.0",
"prop-types": "^15.6.1",
"prop-types-extra": "^1.1.0",
"property-expr": "^1.4.0",
"react-context-toolbox": "^1.2.2",
"react-context-toolbox": "^2.0.2",
"shallowequal": "^1.1.0",
"topeka": "^3.3.0",
"uncontrollable": "^6.0.0",
"warning": "^4.0.1",
"yup": "^0.26.10"
},
"devDependencies": {
"@4c/rollout": "^1.1.0",
"@babel/cli": "7.0.0",
"@babel/core": "7.0.0",
"babel-core": "^7.0.0-0",
"babel-eslint": "^9.0.0",
"babel-jest": "^23.6.0",
"@4c/rollout": "^1.2.0",
"@babel/cli": "7.2.3",
"@babel/core": "7.2.2",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.0.0",
"babel-preset-jason": "^6.0.1",
"chai": "^4.1.2",
"chai": "^4.2.0",
"chai-as-promised": "^7.1.1",
"dirty-chai": "^2.0.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.5.0",
"eslint": "^5.5.0",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.8.0",
"eslint": "^5.12.1",
"eslint-config-jason": "^4.0.1",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-react": "^7.9.1",
"jest": "^23.6.0",
"react": "^16.4.1",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-react": "^7.12.4",
"jest": "^24.0.0",
"react": "^16.7.0",
"react-bootstrap": "^0.32.1",
"react-dom": "^16.4.1",
"react-dom": "^16.7.0",
"react-formal": "^0.28.2",
"react-tackle-box": "^2.1.0",
"rimraf": "^2.5.2",
"sinon": "^6.2.0",
"sinon-chai": "^3.1.0"
"rimraf": "^2.6.3",
"sinon": "^7.2.3",
"sinon-chai": "^3.3.0"
}
}
2 changes: 1 addition & 1 deletion src/Contexts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import forwardRef from 'react-context-toolbox/lib/forwardRef'
import forwardRef from 'react-context-toolbox/forwardRef'
import shallowequal from 'shallowequal'
import { EMPTY_ERRORS } from './utils/ErrorUtils'

Expand Down
4 changes: 2 additions & 2 deletions src/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function getValueProps(type, value, props) {
return { value }
}
}
function isFilterErrorsEqual(a, b) {
function isFilterErrorsEqual([a], [b]) {
let isEqual =
(a.errors === b.errors || shallowequal(a.errors, b.errors)) &&
a.names === b.names &&
Expand Down Expand Up @@ -216,7 +216,7 @@ class Field extends React.PureComponent {
let resolvedType = type || (meta.schema && meta.schema._type)

meta.resolvedType = resolvedType

// console.log(meta, events(meta))
let eventHandlers = this.getEventHandlers(
typeof events === 'function' ? events(meta) : events
)
Expand Down
5 changes: 3 additions & 2 deletions src/FieldArray.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import invariant from 'invariant'
import PropTypes from 'prop-types'
import React from 'react'
import elementType from 'prop-types-extra/lib/elementType'
import { move, remove, shift, unshift } from './utils/ErrorUtils'

import Field from './Field'
Expand Down Expand Up @@ -69,8 +68,10 @@ class FieldArray extends React.Component {
/**
* The same signature as providing a function to `<Field>` but with an
* additional `arrayHelpers` object passed to the render function
*
* @type {Function}
*/
children: PropTypes.func.isRequired,
children: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
}

onAdd = item => {
Expand Down
2 changes: 1 addition & 1 deletion src/FormSubmit.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class FormSubmit extends React.Component {

this.memoFilterAndMapErrors = memoize(
filterAndMapErrors,
(a, b) =>
([a], [b]) =>
a.errors === b.errors &&
a.names === b.names &&
a.maperrors === b.maperrors
Expand Down
8 changes: 4 additions & 4 deletions test/Field.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { mount } from 'enzyme'
import React from 'react'
import ReactDOMServer from 'react-dom/server'
import * as yup from 'yup'
import Form from '../src'

Expand Down Expand Up @@ -392,7 +391,7 @@ describe('Field', () => {
})
})

it('should set events via a function', done => {
it.only('should set events via a function', done => {
let schema = yup.object({
number: yup.number().min(5),
})
Expand All @@ -410,12 +409,13 @@ describe('Field', () => {
/>
</Form>
)

// Field is valid only; `onBlur`
wrapper.find('input').simulate('change', { target: { value: '4' } })
wrapper.find('input').simulate('blur', { target: { value: '4' } })

setTimeout(() => {
spy.callCount.should.equal(1)
// field is invalid now: `onChange`
wrapper.find('input').simulate('blur', { target: { value: '4' } })

spy.callCount.should.equal(1)
Expand All @@ -424,7 +424,7 @@ describe('Field', () => {

spy.callCount.should.equal(2)
done()
}, 10)
}, 100)
})

it('should field onError should replace field errors', () => {
Expand Down
Loading

0 comments on commit 754bfcd

Please sign in to comment.