Socket
Socket
Sign inDemoInstall

vue-docgen-api

Package Overview
Dependencies
Maintainers
3
Versions
271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-docgen-api - npm Package Compare versions

Comparing version 4.39.0 to 4.40.0

27

dist/script-handlers/classPropHandler.js

@@ -137,12 +137,21 @@ "use strict";

var propDecoratorArg = propDecoratorPath.get('arguments', 0);
if (propDecoratorArg && bt.isObjectExpression(propDecoratorArg.node)) {
var propsPath = propDecoratorArg
.get('properties')
.filter(function (p) { return bt.isObjectProperty(p.node); });
// if there is no type annotation, get it from the decorators arguments
if (!propPath.node.typeAnnotation) {
litteralType = propHandler_1.describeType(propsPath, propDescriptor);
if (propDecoratorArg) {
if (bt.isObjectExpression(propDecoratorArg.node)) {
var propsPath = propDecoratorArg
.get('properties')
.filter(function (p) {
return bt.isObjectProperty(p.node);
});
// if there is no type annotation, get it from the decorators arguments
if (!propPath.node.typeAnnotation) {
litteralType = propHandler_1.describeType(propsPath, propDescriptor);
}
propHandler_1.describeDefault(propsPath, propDescriptor, litteralType || '');
propHandler_1.describeRequired(propsPath, propDescriptor);
// this compares the node to its supposed args
// if it finds no args it will return itself
}
propHandler_1.describeDefault(propsPath, propDescriptor, litteralType || '');
propHandler_1.describeRequired(propsPath, propDescriptor);
else if (propDecoratorArg.node !== propDecoratorPath.node) {
propDescriptor.type = propHandler_1.getTypeFromTypePath(propDecoratorArg);
}
}

@@ -149,0 +158,0 @@ }

@@ -18,2 +18,6 @@ import * as bt from '@babel/types';

export declare function describeType(propPropertiesPath: NodePath<bt.ObjectProperty | bt.ObjectMethod>[], propDescriptor: PropDescriptor): string | undefined;
export declare function getTypeFromTypePath(typePath: NodePath<bt.TSAsExpression | bt.Identifier>): {
name: string;
func?: boolean;
};
export declare function getValuesFromTypeAnnotation(type: bt.TSType): string[] | undefined;

@@ -20,0 +24,0 @@ export declare function describeRequired(propPropertiesPath: NodePath<bt.ObjectProperty | bt.ObjectMethod>[], propDescriptor: PropDescriptor): void;

@@ -61,3 +61,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.extractValuesFromTags = exports.describeDefault = exports.describeRequired = exports.getValuesFromTypeAnnotation = exports.describeType = void 0;
exports.extractValuesFromTags = exports.describeDefault = exports.describeRequired = exports.getValuesFromTypeAnnotation = exports.getTypeFromTypePath = exports.describeType = void 0;
var bt = __importStar(require("@babel/types"));

@@ -307,2 +307,3 @@ var recast_1 = require("recast");

}
exports.getTypeFromTypePath = getTypeFromTypePath;
/**

@@ -309,0 +310,0 @@ * When a prop is type annotated with the "as" keyword,

{
"name": "vue-docgen-api",
"version": "4.39.0",
"version": "4.40.0",
"description": "Toolbox to extract information from Vue component files for documentation generation purposes.",

@@ -41,3 +41,3 @@ "homepage": "https://vue-styleguidist.github.io",

"ts-map": "^1.0.3",
"vue-inbrowser-compiler-utils": "^4.39.0"
"vue-inbrowser-compiler-utils": "^4.40.0"
},

@@ -48,9 +48,9 @@ "devDependencies": {

"globby": "10.0.2",
"vue": "2.6.12",
"vue": "2.6.14",
"vue-class-component": "7.2.6",
"vue-clickaway": "2.2.2",
"vue-property-decorator": "7.3.0",
"vuetify": "2.5.0"
"vuetify": "2.5.3"
},
"gitHead": "7810971dde12f93a4d7909a4575afd0e621e2566"
"gitHead": "3d21924976c150f869d165e2b92bb6269e54eaa4"
}
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