react-docgen
Advanced tools
Comparing version 2.17.0 to 2.18.0
@@ -64,3 +64,8 @@ 'use strict'; | ||
if (superTypes.value) { | ||
typePath = superTypes.get('params').get(1); | ||
var params = superTypes.get('params'); | ||
if (params.value.length === 3) { | ||
typePath = params.get(1); | ||
} else { | ||
typePath = params.get(0); | ||
} | ||
} else { | ||
@@ -67,0 +72,0 @@ var propsMemberPath = (0, _getMemberValuePath2.default)(path, 'props'); |
@@ -39,18 +39,25 @@ 'use strict'; | ||
var _resolveObjectKeysToArray = require('./resolveObjectKeysToArray'); | ||
var _resolveObjectKeysToArray2 = _interopRequireDefault(_resolveObjectKeysToArray); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var types = _recast2.default.types.namedTypes; /* | ||
* Copyright (c) 2015, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* | ||
* | ||
*/ | ||
/* | ||
* Copyright (c) 2015, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* | ||
* | ||
*/ | ||
/*eslint no-use-before-define: 0*/ | ||
var types = _recast2.default.types.namedTypes; | ||
function getEnumValues(path) { | ||
@@ -90,5 +97,10 @@ var values = []; | ||
if (!types.ArrayExpression.check(value.node)) { | ||
// could not easily resolve to an Array, let's print the original value | ||
type.computed = true; | ||
type.value = (0, _printValue2.default)(argumentPath); | ||
value = (0, _resolveObjectKeysToArray2.default)(value); | ||
if (value) { | ||
type.value = getEnumValues(value); | ||
} else { | ||
// could not easily resolve to an Array, let's print the original value | ||
type.computed = true; | ||
type.value = (0, _printValue2.default)(argumentPath); | ||
} | ||
} else { | ||
@@ -95,0 +107,0 @@ type.value = getEnumValues(value); |
{ | ||
"name": "react-docgen", | ||
"version": "2.17.0", | ||
"version": "2.18.0", | ||
"description": "A CLI and toolkit to extract information from React components for documentation generation.", | ||
@@ -13,2 +13,6 @@ "repository": { | ||
}, | ||
"files": [ | ||
"bin", | ||
"dist" | ||
], | ||
"main": "dist/main.js", | ||
@@ -50,4 +54,6 @@ "scripts": { | ||
"eslint": "^4.3.0", | ||
"flow-bin": "^0.50.0", | ||
"flow-bin": "^0.53.1", | ||
"jest": "^20.0.4", | ||
"jest-diff": "^20.0.3", | ||
"jest-matcher-utils": "^20.0.3", | ||
"rimraf": "^2.3.2", | ||
@@ -54,0 +60,0 @@ "temp": "^0.8.1" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4348
184896
15
65
4
1