Skip to content

Commit a2978e8

Browse files
jquensedanez
authored andcommitted
chore: update ast-types
1 parent 71e78b3 commit a2978e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+1182
-1161
lines changed

package.json

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"description": "A CLI and toolkit to extract information from React components for documentation generation.",
55
"repository": {
66
"type": "git",
7-
"url": "https://github.com/reactjs/react-docgen.git"
7+
"url": "git+https://github.com/reactjs/react-docgen.git"
8+
},
9+
"bugs": {
10+
"url": "https://github.com/reactjs/react-docgen/issues"
811
},
9-
"bugs": "https://github.com/reactjs/react-docgen/issues",
1012
"bin": {
1113
"react-docgen": "bin/react-docgen.js"
1214
},
@@ -34,38 +36,40 @@
3436
"react",
3537
"documentation-generation"
3638
],
37-
"author": "Felix Kling",
39+
"author": {
40+
"name": "Felix Kling"
41+
},
3842
"license": "MIT",
3943
"dependencies": {
40-
"@babel/core": "^7.4.4",
41-
"@babel/runtime": "^7.0.0",
42-
"ast-types": "^0.12.4",
44+
"@babel/core": "^7.7.5",
45+
"@babel/runtime": "^7.7.6",
46+
"ast-types": "^0.13.2",
4347
"async": "^2.1.4",
4448
"commander": "^2.19.0",
4549
"doctrine": "^3.0.0",
4650
"node-dir": "^0.1.10",
4751
"strip-indent": "^3.0.0"
4852
},
4953
"devDependencies": {
50-
"@babel/cli": "^7.0.0",
51-
"@babel/plugin-transform-runtime": "^7.0.0",
52-
"@babel/preset-env": "^7.0.0",
53-
"@babel/preset-flow": "^7.0.0",
54-
"babel-eslint": "^10.0.1",
55-
"babel-jest": "^24.1.0",
54+
"@babel/cli": "^7.7.5",
55+
"@babel/plugin-transform-runtime": "^7.7.6",
56+
"@babel/preset-env": "^7.7.6",
57+
"@babel/preset-flow": "^7.7.4",
58+
"babel-eslint": "^10.0.3",
59+
"babel-jest": "^24.9.0",
5660
"benchmark": "^2.1.4",
5761
"cli-table": "^0.3.1",
5862
"cross-spawn": "^6.0.4",
5963
"eslint": "^5.7.0",
6064
"eslint-config-prettier": "^4.0.0",
61-
"eslint-plugin-prettier": "^3.0.0",
65+
"eslint-plugin-prettier": "^3.1.1",
6266
"flow-bin": "^0.98.0",
63-
"jest": "^24.1.0",
64-
"jest-diff": "^24.0.0",
65-
"jest-matcher-utils": "^24.0.0",
66-
"prettier": "^1.14.3",
67-
"rimraf": "^2.3.2",
68-
"temp": "^0.9.0"
67+
"jest": "^24.9.0",
68+
"jest-diff": "^24.9.0",
69+
"jest-matcher-utils": "^24.9.0",
70+
"prettier": "^1.19.1",
71+
"rimraf": "^3.0.0",
72+
"temp": "^0.9.1"
6973
},
7074
"jest": {
7175
"snapshotSerializers": [

src/handlers/componentDocblockHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import type Documentation from '../Documentation';
1212
import { getDocblock } from '../utils/docblock';
1313

14-
const { namedTypes: t } = types;
15-
1614
function isClassDefinition(nodePath) {
1715
const node = nodePath.node;
1816
return t.ClassDeclaration.check(node) || t.ClassExpression.check(node);

src/handlers/componentMethodsHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getMemberValuePath from '../utils/getMemberValuePath';
1212
import getMethodDocumentation from '../utils/getMethodDocumentation';
1313
import isReactComponentClass from '../utils/isReactComponentClass';
1414
import isReactComponentMethod from '../utils/isReactComponentMethod';
1515
import type Documentation from '../Documentation';
1616

17-
const { namedTypes: t } = types;
18-
1917
/**
2018
* The following values/constructs are considered methods:
2119
*

src/handlers/defaultPropsHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getPropertyName from '../utils/getPropertyName';
1212
import getMemberValuePath from '../utils/getMemberValuePath';
1313
import printValue from '../utils/printValue';
@@ -17,8 +17,6 @@ import isReactComponentClass from '../utils/isReactComponentClass';
1717
import isReactForwardRefCall from '../utils/isReactForwardRefCall';
1818
import type Documentation from '../Documentation';
1919

20-
const { namedTypes: t } = types;
21-
2220
function getDefaultValue(path: NodePath) {
2321
let node = path.node;
2422
let defaultValue;

src/handlers/displayNameHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getMemberValuePath from '../utils/getMemberValuePath';
1212
import getNameOrValue from '../utils/getNameOrValue';
1313
import resolveToValue from '../utils/resolveToValue';
1414
import resolveFunctionDefinitionToReturnValue from '../utils/resolveFunctionDefinitionToReturnValue';
1515
import type Documentation from '../Documentation';
1616

17-
const { namedTypes: t } = types;
18-
1917
export default function displayNameHandler(
2018
documentation: Documentation,
2119
path: NodePath,

src/handlers/flowTypeHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import type Documentation from '../Documentation';
1212
import { unwrapUtilityType } from '../utils/flowUtilityTypes';
1313
import getFlowType from '../utils/getFlowType';
@@ -20,8 +20,6 @@ import { type TypeParameters } from '../utils/getTypeParameters';
2020
import resolveToValue from '../utils/resolveToValue';
2121
import setPropDescription from '../utils/setPropDescription';
2222

23-
const { namedTypes: t } = types;
24-
2523
function setPropDescriptor(
2624
documentation: Documentation,
2725
path: NodePath,

src/handlers/index.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,16 @@
77
* @flow
88
*/
99

10-
export {
11-
default as componentDocblockHandler,
12-
} from './componentDocblockHandler';
10+
export { default as componentDocblockHandler } from './componentDocblockHandler';
1311
export { default as componentMethodsHandler } from './componentMethodsHandler';
14-
export {
15-
default as componentMethodsJsDocHandler,
16-
} from './componentMethodsJsDocHandler';
12+
export { default as componentMethodsJsDocHandler } from './componentMethodsJsDocHandler';
1713
export { default as defaultPropsHandler } from './defaultPropsHandler';
1814
export {
1915
propTypeHandler,
2016
contextTypeHandler,
2117
childContextTypeHandler,
2218
} from './propTypeHandler';
23-
export {
24-
default as propTypeCompositionHandler,
25-
} from './propTypeCompositionHandler';
19+
export { default as propTypeCompositionHandler } from './propTypeCompositionHandler';
2620
export { default as propDocBlockHandler } from './propDocBlockHandler';
2721
export { default as displayNameHandler } from './displayNameHandler';
2822
export { default as flowTypeHandler } from './flowTypeHandler';

src/handlers/propDocBlockHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getMemberValuePath from '../utils/getMemberValuePath';
1212
import resolveToValue from '../utils/resolveToValue';
1313
import setPropDescription from '../utils/setPropDescription';
1414
import type Documentation from '../Documentation';
1515

16-
const { namedTypes: t } = types;
17-
1816
function resolveDocumentation(
1917
documentation: Documentation,
2018
path: NodePath,

src/handlers/propTypeCompositionHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getMemberValuePath from '../utils/getMemberValuePath';
1212
import resolveToModule from '../utils/resolveToModule';
1313
import resolveToValue from '../utils/resolveToValue';
1414
import type Documentation from '../Documentation';
1515

16-
const { namedTypes: t } = types;
17-
1816
/**
1917
* It resolves the path to its module name and adds it to the "composes" entry
2018
* in the documentation.

src/handlers/propTypeHandler.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @flow
88
*/
99

10-
import types from 'ast-types';
10+
import { namedTypes as t } from 'ast-types';
1111
import getPropType from '../utils/getPropType';
1212
import getPropertyName from '../utils/getPropertyName';
1313
import getMemberValuePath from '../utils/getMemberValuePath';
@@ -18,8 +18,6 @@ import resolveToModule from '../utils/resolveToModule';
1818
import resolveToValue from '../utils/resolveToValue';
1919
import type Documentation from '../Documentation';
2020

21-
const { namedTypes: t } = types;
22-
2321
function isPropTypesExpression(path) {
2422
const moduleName = resolveToModule(path);
2523
if (moduleName) {

0 commit comments

Comments
 (0)