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

react-docgen

Package Overview
Dependencies
Maintainers
1
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.14.0 to 2.14.1

2

dist/babylon.js

@@ -39,3 +39,3 @@ 'use strict';

exports.default = {
parse(src) {
parse: function parse(src) {
var file = babylon.parse(src, options);

@@ -42,0 +42,0 @@ file.program.comments = file.comments;

@@ -70,4 +70,4 @@ 'use strict';

description: jsDoc.description || null,
returns,
params
returns: returns,
params: params
});

@@ -74,0 +74,0 @@ });

@@ -221,3 +221,3 @@ 'use strict';

} else if (node.type in flowLiteralTypes) {
type = { name: 'literal', value: node.raw || `${node.value}` };
type = { name: 'literal', value: node.raw || '' + node.value };
} else if (node.type in namedTypes) {

@@ -224,0 +224,0 @@ type = namedTypes[node.type](path);

@@ -77,3 +77,3 @@ 'use strict';

_recast2.default.visit(program, {
visitAssignmentExpression(path) {
visitAssignmentExpression: function visitAssignmentExpression(path) {
var memberPath = path.get('left');

@@ -80,0 +80,0 @@ if (!types.MemberExpression.check(memberPath.node)) {

@@ -74,5 +74,5 @@ 'use strict';

result.push({
path,
path: path,
computed: false,
argumentsPath
argumentsPath: argumentsPath
});

@@ -79,0 +79,0 @@ }

@@ -6,2 +6,19 @@ 'use strict';

});
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
var _LOOKUP_METHOD; /*
* 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.
*
*
*
*/
exports.default = getMemberValuePath;

@@ -27,14 +44,2 @@

/*
* 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.
*
*
*
*/
var types = _recast2.default.types.namedTypes;

@@ -48,11 +53,3 @@

var LOOKUP_METHOD = {
[types.ArrowFunctionExpression.name]: _getMemberExpressionValuePath2.default,
[types.FunctionExpression.name]: _getMemberExpressionValuePath2.default,
[types.FunctionDeclaration.name]: _getMemberExpressionValuePath2.default,
[types.VariableDeclaration.name]: _getMemberExpressionValuePath2.default,
[types.ObjectExpression.name]: _getPropertyValuePath2.default,
[types.ClassDeclaration.name]: _getClassMemberValuePath2.default,
[types.ClassExpression.name]: _getClassMemberValuePath2.default
};
var LOOKUP_METHOD = (_LOOKUP_METHOD = {}, (0, _defineProperty3.default)(_LOOKUP_METHOD, types.ArrowFunctionExpression.name, _getMemberExpressionValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.FunctionExpression.name, _getMemberExpressionValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.FunctionDeclaration.name, _getMemberExpressionValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.VariableDeclaration.name, _getMemberExpressionValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.ObjectExpression.name, _getPropertyValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.ClassDeclaration.name, _getClassMemberValuePath2.default), (0, _defineProperty3.default)(_LOOKUP_METHOD, types.ClassExpression.name, _getClassMemberValuePath2.default), _LOOKUP_METHOD);

@@ -59,0 +56,0 @@ function isSupportedDefinitionType(_ref) {

@@ -64,3 +64,3 @@ 'use strict';

optional: paramPath.node.optional,
type
type: type
};

@@ -111,4 +111,4 @@

return {
name,
docblock,
name: name,
docblock: docblock,
modifiers: getMethodModifiers(methodPath),

@@ -115,0 +115,0 @@ params: getMethodParamsDoc(methodPath),

@@ -41,4 +41,4 @@ 'use strict';

default:
throw new TypeError('Parameter name must be an Identifier, an AssignmentPattern an ' + `ObjectPattern or a RestElement, got ${parameterPath.node.type}`);
throw new TypeError('Parameter name must be an Identifier, an AssignmentPattern an ' + ('ObjectPattern or a RestElement, got ' + parameterPath.node.type));
}
}

@@ -217,3 +217,3 @@ 'use strict';

if (simplePropTypes.hasOwnProperty(name)) {
descriptor = { name };
descriptor = { name: name };
return true;

@@ -220,0 +220,0 @@ } else if (propTypes.hasOwnProperty(name) && member.argumentsPath) {

@@ -91,3 +91,3 @@ 'use strict';

_recast2.default.visit(path, {
visitReturnStatement(returnPath) {
visitReturnStatement: function visitReturnStatement(returnPath) {
var resolvedPath = (0, _resolveToValue2.default)(returnPath.get('argument'));

@@ -94,0 +94,0 @@ if (isJSXElementOrReactCreateElement(resolvedPath) && isSameBlockScope(returnPath)) {

@@ -6,3 +6,11 @@ 'use strict';

});
var _typeof2 = require('babel-runtime/helpers/typeof');
var _typeof3 = _interopRequireDefault(_typeof2);
exports.default = match;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/*

@@ -33,3 +41,3 @@ * Copyright (c) 2015, Facebook, Inc.

}
if (pattern[prop] && typeof pattern[prop] === 'object') {
if (pattern[prop] && (0, _typeof3.default)(pattern[prop]) === 'object') {
if (!match(node[prop], pattern[prop])) {

@@ -36,0 +44,0 @@ return false;

{
"name": "react-docgen",
"version": "2.14.0",
"version": "2.14.1",
"description": "A CLI and toolkit to extract information from React components for documentation generation.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

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