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

docworks-jsdoc2spec

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docworks-jsdoc2spec - npm Package Compare versions

Comparing version 1.5.3 to 1.5.4

2

dist/jsdoc-handler-messages.js

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

return function (prop) {
return (0, _docworksModel.MessageMember)(prop.name, (0, _jsdocHandlerShared.handleType)(prop.type, find, onError, context), prop.description);
return (0, _docworksModel.MessageMember)(prop.name, (0, _jsdocHandlerShared.handleType)(prop.type, find, onError, context), prop.description, prop.optional);
};

@@ -31,0 +31,0 @@ };

@@ -19,3 +19,3 @@ import {handleMeta, handleType, typeContext, handleDoc} from './jsdoc-handler-shared';

handleType(prop.type, find, onError, context),
prop.description
prop.description, prop.optional
);

@@ -22,0 +22,0 @@ };

{
"name": "docworks-jsdoc2spec",
"version": "1.5.3",
"version": "1.5.4",
"description": "extractor for jsdoc apis to api spec",

@@ -14,3 +14,3 @@ "main": "dist/index.js",

"dependencies": {
"docworks-model": "^1.5.0",
"docworks-model": "^1.5.4",
"intercept-stdout": "^0.1.2",

@@ -17,0 +17,0 @@ "jsdoc": "3.4.0",

@@ -38,2 +38,9 @@

/**
* @typedef MessageWithOptionalMembers
* @memberof aNamespace.ServiceMessages
* @property {string} name is mandatory
* @property {string|number} [age] is optional
*/
/**
* @member prop

@@ -40,0 +47,0 @@ * @memberof aNamespace.ServiceMessages

@@ -165,2 +165,22 @@ import runJsDoc from '../lib/jsdoc-runner';

it.only('should support a optional members of a message', function() {
expect(jsDocRes).to.containSubset({
services: [
{
name: 'ServiceMessages',
messages: [
{
name: 'MessageWithOptionalMembers',
members: [
{name: 'name', type: 'string', doc: 'is mandatory'},
{name: 'age', type: ['string', 'number'], doc: 'is optional', optional: true}
]
}
]
}
]
});
});
it('should support messages defined using @typedef namespace~message', function() {

@@ -167,0 +187,0 @@

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