New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

documental

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

documental - npm Package Compare versions

Comparing version 0.2.90 to 0.3.0

1

lib/index.ts

@@ -78,2 +78,3 @@ import ts from "typescript";

if (!exportData) continue;
if (exportData["hide"] !== undefined) continue;

@@ -80,0 +81,0 @@ // TODO: we should exclude from data/exportData any fields whose names match those in type that are non-string values, as well as the field.

2

lib/parsing/isComponentType.ts

@@ -14,3 +14,3 @@ import ts from "typescript";

return (typeName === "FunctionComponent" || typeName === "VoidFunctionComponent");
return (typeName === "FunctionComponent" || typeName === "VoidFunctionComponent" || typeName === "ForwardRefExoticComponent");
}

@@ -20,6 +20,6 @@ import ts, { nodeModuleNameResolver } from "typescript";

const { type } = valueDeclaration;
if (!type) continue;
const { type: typeNode } = valueDeclaration;
if (!typeNode) continue;
const propertyType = typeChecker.getTypeFromTypeNode(type);
const propertyType = typeChecker.getTypeOfSymbolAtLocation(property, valueDeclaration);
const name = property.name;

@@ -30,2 +30,3 @@ const description = parseDescription(typeChecker, property);

let types = [typeChecker.typeToString(propertyType)];
types[0] = types[0].replace(" | undefined", ""); // Hacky but does the job. Need to investigate the typeToString flags.

@@ -32,0 +33,0 @@ /*

@@ -35,3 +35,6 @@ import ts from "typescript";

if (componentType && isComponentType(componentType)) {
const propsType = componentType.aliasTypeArguments?.[0];
const propsType = (componentType.symbol?.name === "ForwardRefExoticComponent") ?
componentType.aliasTypeArguments?.[1] :
componentType.aliasTypeArguments?.[0];
const properties = (propsType) ? parseFields(typeChecker, propsType) : [];

@@ -38,0 +41,0 @@

{
"name": "documental",
"version": "0.2.90",
"version": "0.3.00",
"description": "Documental React Component Documentation Generator",

@@ -5,0 +5,0 @@ "main": "./lib/index.ts",

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