Skip to content

Commit 754bfcd

Browse files
committed
bump: deps
1 parent 788d1d1 commit 754bfcd

File tree

7 files changed

+1532
-928
lines changed

7 files changed

+1532
-928
lines changed

package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
"roots": [
3535
"<rootDir>/test"
3636
],
37-
"setupTestFrameworkScriptFile": "./test/index.js"
37+
"setupFilesAfterEnv": [
38+
"./test/index.js"
39+
]
3840
},
3941
"scripts": {
4042
"test": "jest",
@@ -54,43 +56,42 @@
5456
"chain-function": "^1.0.0",
5557
"classnames": "^2.2.5",
5658
"invariant": "^2.2.4",
57-
"lodash": "^4.17.10",
58-
"memoize-one": "^4.0.2",
59+
"lodash": "^4.17.11",
60+
"memoize-one": "^5.0.0",
5961
"prop-types": "^15.6.1",
6062
"prop-types-extra": "^1.1.0",
6163
"property-expr": "^1.4.0",
62-
"react-context-toolbox": "^1.2.2",
64+
"react-context-toolbox": "^2.0.2",
6365
"shallowequal": "^1.1.0",
6466
"topeka": "^3.3.0",
6567
"uncontrollable": "^6.0.0",
6668
"warning": "^4.0.1",
6769
"yup": "^0.26.10"
6870
},
6971
"devDependencies": {
70-
"@4c/rollout": "^1.1.0",
71-
"@babel/cli": "7.0.0",
72-
"@babel/core": "7.0.0",
73-
"babel-core": "^7.0.0-0",
74-
"babel-eslint": "^9.0.0",
75-
"babel-jest": "^23.6.0",
72+
"@4c/rollout": "^1.2.0",
73+
"@babel/cli": "7.2.3",
74+
"@babel/core": "7.2.2",
75+
"babel-eslint": "^10.0.1",
76+
"babel-jest": "^24.0.0",
7677
"babel-preset-jason": "^6.0.1",
77-
"chai": "^4.1.2",
78+
"chai": "^4.2.0",
7879
"chai-as-promised": "^7.1.1",
7980
"dirty-chai": "^2.0.1",
80-
"enzyme": "^3.3.0",
81-
"enzyme-adapter-react-16": "^1.5.0",
82-
"eslint": "^5.5.0",
81+
"enzyme": "^3.8.0",
82+
"enzyme-adapter-react-16": "^1.8.0",
83+
"eslint": "^5.12.1",
8384
"eslint-config-jason": "^4.0.1",
84-
"eslint-plugin-import": "^2.12.0",
85-
"eslint-plugin-react": "^7.9.1",
86-
"jest": "^23.6.0",
87-
"react": "^16.4.1",
85+
"eslint-plugin-import": "^2.16.0",
86+
"eslint-plugin-react": "^7.12.4",
87+
"jest": "^24.0.0",
88+
"react": "^16.7.0",
8889
"react-bootstrap": "^0.32.1",
89-
"react-dom": "^16.4.1",
90+
"react-dom": "^16.7.0",
9091
"react-formal": "^0.28.2",
9192
"react-tackle-box": "^2.1.0",
92-
"rimraf": "^2.5.2",
93-
"sinon": "^6.2.0",
94-
"sinon-chai": "^3.1.0"
93+
"rimraf": "^2.6.3",
94+
"sinon": "^7.2.3",
95+
"sinon-chai": "^3.3.0"
9596
}
9697
}

src/Contexts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react'
2-
import forwardRef from 'react-context-toolbox/lib/forwardRef'
2+
import forwardRef from 'react-context-toolbox/forwardRef'
33
import shallowequal from 'shallowequal'
44
import { EMPTY_ERRORS } from './utils/ErrorUtils'
55

src/Field.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function getValueProps(type, value, props) {
3535
return { value }
3636
}
3737
}
38-
function isFilterErrorsEqual(a, b) {
38+
function isFilterErrorsEqual([a], [b]) {
3939
let isEqual =
4040
(a.errors === b.errors || shallowequal(a.errors, b.errors)) &&
4141
a.names === b.names &&
@@ -216,7 +216,7 @@ class Field extends React.PureComponent {
216216
let resolvedType = type || (meta.schema && meta.schema._type)
217217

218218
meta.resolvedType = resolvedType
219-
219+
// console.log(meta, events(meta))
220220
let eventHandlers = this.getEventHandlers(
221221
typeof events === 'function' ? events(meta) : events
222222
)

src/FieldArray.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import invariant from 'invariant'
22
import PropTypes from 'prop-types'
33
import React from 'react'
4-
import elementType from 'prop-types-extra/lib/elementType'
54
import { move, remove, shift, unshift } from './utils/ErrorUtils'
65

76
import Field from './Field'
@@ -69,8 +68,10 @@ class FieldArray extends React.Component {
6968
/**
7069
* The same signature as providing a function to `<Field>` but with an
7170
* additional `arrayHelpers` object passed to the render function
71+
*
72+
* @type {Function}
7273
*/
73-
children: PropTypes.func.isRequired,
74+
children: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
7475
}
7576

7677
onAdd = item => {

src/FormSubmit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FormSubmit extends React.Component {
7979

8080
this.memoFilterAndMapErrors = memoize(
8181
filterAndMapErrors,
82-
(a, b) =>
82+
([a], [b]) =>
8383
a.errors === b.errors &&
8484
a.names === b.names &&
8585
a.maperrors === b.maperrors

test/Field.spec.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { mount } from 'enzyme'
22
import React from 'react'
3-
import ReactDOMServer from 'react-dom/server'
43
import * as yup from 'yup'
54
import Form from '../src'
65

@@ -392,7 +391,7 @@ describe('Field', () => {
392391
})
393392
})
394393

395-
it('should set events via a function', done => {
394+
it.only('should set events via a function', done => {
396395
let schema = yup.object({
397396
number: yup.number().min(5),
398397
})
@@ -410,12 +409,13 @@ describe('Field', () => {
410409
/>
411410
</Form>
412411
)
413-
412+
// Field is valid only; `onBlur`
414413
wrapper.find('input').simulate('change', { target: { value: '4' } })
415414
wrapper.find('input').simulate('blur', { target: { value: '4' } })
416415

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

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

425425
spy.callCount.should.equal(2)
426426
done()
427-
}, 10)
427+
}, 100)
428428
})
429429

430430
it('should field onError should replace field errors', () => {

0 commit comments

Comments
 (0)