Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

react-docgen

Package Overview
Dependencies
Maintainers
2
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-docgen - npm Package Compare versions

Comparing version 2.17.0 to 2.18.0

bin/__tests__/example/customResolver.js

7

dist/utils/getFlowTypeFromReactComponent.js

@@ -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');

40

dist/utils/getPropType.js

@@ -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"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc