Socket
Socket
Sign inDemoInstall

jsdoc-api

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsdoc-api - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

tmp/5cyiu0gsncmr6bt9kax5ng6rh1hpk3xr.js.html

4

es5/explain-stream.js

@@ -51,3 +51,5 @@ 'use strict';

}).catch(function (err) {
return _this2.emit('error', err);
process.nextTick(function () {
_this2.emit('error', err);
});
});

@@ -54,0 +56,0 @@ this.inProgress = true;

@@ -33,3 +33,8 @@ 'use strict'

})
.catch(err => this.emit('error', err))
.catch(err => {
/* emit the error on the next tick to prevent it crashing the rejection handler */
process.nextTick(() => {
this.emit('error', err)
})
})
this.inProgress = true

@@ -36,0 +41,0 @@ }

{
"name": "jsdoc-api",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "1.0.3",
"version": "1.0.4",
"description": "A programmatic interface for jsdoc",

@@ -30,3 +30,3 @@ "repository": "https://github.com/jsdoc2md/jsdoc-api.git",

"jsdoc-to-markdown": "^1.3.1",
"jsdoc2md-testbed": "~0.0.2",
"jsdoc2md-testbed": "0.0.7",
"rimraf": "^2.4.4",

@@ -33,0 +33,0 @@ "tape": "^4.2.2"

@@ -75,4 +75,4 @@ var test = require('tape')

t.plan(1)
var input = path.resolve(__dirname, '..', 'node_modules', 'jsdoc2md-testbed', 'build', 'input/buggy/bad-syntax.js')
jsdoc.createExplainStream({ files: input })
var f = new Fixture('input/buggy', 'bad-syntax.js')
jsdoc.createExplainStream({ files: f.sourcePath })
.on('error', function (err) {

@@ -85,1 +85,13 @@ t.strictEqual(err.name, 'JSDOC_ERROR')

})
test('.createExplainStream: handles jsdoc crash', function (t) {
t.plan(1)
var f = new Fixture('input/buggy', 'broken-javascript.js')
jsdoc.createExplainStream({ files: f.sourcePath })
.on('error', function (err) {
t.strictEqual(err.name, 'JSDOC_ERROR')
})
.pipe(collectJson(function (output) {
t.fail('should not reach here')
}))
})

@@ -8,5 +8,5 @@ var path = require('path')

function Fixture (name) {
function Fixture (name, filePath) {
this.folder = path.resolve(__dirname, '..', '..', 'node_modules', 'jsdoc2md-testbed', 'build', name)
this.sourcePath = path.resolve(this.folder, '0-src.js')
this.sourcePath = path.resolve(this.folder, filePath || '0-src.js')

@@ -13,0 +13,0 @@ this.getSource = function () {

Sorry, the diff of this file is not supported yet

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