@jsdoc/parse
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -104,8 +104,3 @@ /* | ||
// is this a method definition? if so, we usually get the scope from the node directly | ||
if ( | ||
doclet.meta && | ||
doclet.meta.code && | ||
doclet.meta.code.node && | ||
doclet.meta.code.node.type === Syntax.MethodDefinition | ||
) { | ||
if (doclet.meta?.code?.node?.type === Syntax.MethodDefinition) { | ||
// special case for constructors of classes that have @alias tags | ||
@@ -115,3 +110,3 @@ if (doclet.meta.code.node.kind === 'constructor') { | ||
if (parentDoclet && parentDoclet.alias) { | ||
if (parentDoclet?.alias) { | ||
// the constructor should use the same name as the class | ||
@@ -131,9 +126,3 @@ doclet.addTag('alias', parentDoclet.alias); | ||
// is this something that the module exports? if so, it's a static member | ||
else if ( | ||
doclet.meta && | ||
doclet.meta.code && | ||
doclet.meta.code.node && | ||
doclet.meta.code.node.parent && | ||
doclet.meta.code.node.parent.type === Syntax.ExportNamedDeclaration | ||
) { | ||
else if (doclet.meta?.code?.node?.parent?.type === Syntax.ExportNamedDeclaration) { | ||
doclet.addTag('static'); | ||
@@ -300,3 +289,3 @@ } | ||
// otherwise, get the symbol name from the code | ||
else if (e.code && typeof e.code.name !== 'undefined' && e.code.name !== '') { | ||
else if (typeof e.code?.name !== 'undefined' && e.code?.name !== '') { | ||
newDoclet.addTag('name', e.code.name); | ||
@@ -303,0 +292,0 @@ if (!newDoclet.memberof) { |
@@ -634,3 +634,3 @@ /* | ||
delete e.doclet.undocumented; | ||
e.doclet.undocumented = undefined; | ||
e.doclet.defaultvalue = e.doclet.meta.code.value; | ||
@@ -637,0 +637,0 @@ |
{ | ||
"name": "@jsdoc/parse", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Parses, and extracts information from, source code.", | ||
@@ -16,5 +16,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@jsdoc/ast": "^0.2.3", | ||
"@jsdoc/core": "^0.5.3", | ||
"@jsdoc/doclet": "^0.2.3", | ||
"@jsdoc/ast": "^0.2.4", | ||
"@jsdoc/core": "^0.5.4", | ||
"@jsdoc/doclet": "^0.2.4", | ||
"@jsdoc/util": "^0.3.0", | ||
@@ -42,3 +42,3 @@ "escape-string-regexp": "^5.0.0" | ||
}, | ||
"gitHead": "bf6e6a45a5696b4273a097e4ce37e4fd257c281a" | ||
"gitHead": "76ac64eaf2ddbccfbe1a1bb62160db724fc56deb" | ||
} |
67071
1592
+ Added@babel/code-frame@7.24.7(transitive)
+ Added@babel/helper-validator-identifier@7.24.7(transitive)
+ Added@babel/highlight@7.24.7(transitive)
+ Added@babel/parser@7.24.7(transitive)
- Removed@babel/code-frame@7.24.6(transitive)
- Removed@babel/helper-validator-identifier@7.24.6(transitive)
- Removed@babel/highlight@7.24.6(transitive)
- Removed@babel/parser@7.24.6(transitive)
Updated@jsdoc/ast@^0.2.4
Updated@jsdoc/core@^0.5.4
Updated@jsdoc/doclet@^0.2.4