Skip to content

Commit be55d2a

Browse files
committed
Upgrade dependencies and fix compatibility with newer versions
1 parent f9c34d3 commit be55d2a

File tree

6 files changed

+487
-519
lines changed

6 files changed

+487
-519
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@
3838
"commander": "^2.9.0",
3939
"doctrine": "^2.0.0",
4040
"node-dir": "^0.1.10",
41-
"recast": "^0.14.7"
41+
"recast": "^0.15.0"
4242
},
4343
"devDependencies": {
4444
"babel-cli": "^6.26.0",
4545
"babel-core": "^6.26.0",
4646
"babel-eslint": "^8.2.2",
47-
"babel-jest": "^22.2.2",
47+
"babel-jest": "^23.0.1",
4848
"babel-plugin-transform-object-rest-spread": "^6.26.0",
4949
"babel-plugin-transform-runtime": "^6.23.0",
5050
"babel-preset-env": "^1.6.1",
5151
"babel-preset-flow": "^6.23.0",
5252
"cross-spawn": "^6.0.4",
5353
"eslint": "^4.18.1",
54-
"flow-bin": "^0.70.0",
55-
"jest": "^22.3.0",
56-
"jest-diff": "^22.1.0",
57-
"jest-matcher-utils": "^22.2.0",
54+
"flow-bin": "^0.73.0",
55+
"jest": "^23.1.0",
56+
"jest-diff": "^23.0.1",
57+
"jest-matcher-utils": "^23.0.1",
5858
"rimraf": "^2.3.2",
5959
"temp": "^0.8.1"
6060
},

src/handlers/__tests__/flowTypeHandler-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('flowTypeHandler', () => {
2121

2222
beforeEach(() => {
2323
({statement, expression} = require('../../../tests/utils'));
24-
getFlowTypeMock = jest.genMockFunction().mockImplementation(() => ({}));
24+
getFlowTypeMock = jest.fn(() => ({}));
2525
jest.setMock('../../utils/getFlowType', getFlowTypeMock);
2626
jest.mock('../../utils/getFlowType');
2727

src/handlers/__tests__/propTypeCompositionHandler-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ describe('propTypeCompositionHandler', () => {
2121

2222
beforeEach(() => {
2323
({statement, expression} = require('../../../tests/utils'));
24-
getPropTypeMock = jest.genMockFunction().mockImplementation(() => ({}));
24+
getPropTypeMock = jest.fn(() => ({}));
2525
jest.setMock('../../utils/getPropType', getPropTypeMock);
2626
jest.mock('../../utils/getPropType');
2727

src/utils/getFlowType.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ function getFlowTypeWithResolvedTypes(path: NodePath): FlowTypeDescriptor {
237237
visitedTypes[path.parentPath.node.id.name] = true;
238238
}
239239

240-
if (types.Type.check(node)) {
240+
if (types.FlowType.check(node)) {
241241
if (node.type in flowTypes) {
242242
type = { name: flowTypes[node.type] };
243243
} else if (node.type in flowLiteralTypes) {

src/utils/getTypeAnnotation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function getTypeAnnotation(path: NodePath): ?NodePath {
2727
let resultPath: NodePath = path;
2828
do {
2929
resultPath = resultPath.get('typeAnnotation');
30-
} while (hasTypeAnnotation(resultPath) && !types.Type.check(resultPath.node));
30+
} while (hasTypeAnnotation(resultPath) && !types.FlowType.check(resultPath.node));
3131

3232
return resultPath;
3333
}

0 commit comments

Comments
 (0)