Socket
Socket
Sign inDemoInstall

tap-parser

Package Overview
Dependencies
Maintainers
2
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-parser - npm Package Compare versions

Comparing version 5.0.1 to 5.1.0

48

index.js

@@ -146,3 +146,3 @@ // Transforms a stream of TAP into a stream of result objects

this.buffered = options.buffered || null
this.aborted = false
this.preserveWhitespace = options.preserveWhitespace || false

@@ -327,2 +327,5 @@

Parser.prototype.write = function (chunk, encoding, cb) {
if (this.aborted)
return
if (typeof encoding === 'string' && encoding !== 'utf8')

@@ -636,2 +639,45 @@ chunk = new Buffer(chunk, encoding)

Parser.prototype.abort = function (message, extra) {
if (this.child) {
var b = this.child.buffered
this.child.abort(message, extra)
if (b)
this.write('\n}\n')
}
var dump
if (extra && Object.keys(extra).length) {
try {
dump = yaml.safeDump(extra).trimRight()
} catch (er) {}
}
var y
if (dump)
y = ' ---\n ' + dump.split('\n').join('\n ') + '\n ...\n'
else
y = '\n'
var n = (this.count || 0) + 1
if (this.current)
n += 1
if (this.planEnd !== -1 && this.planEnd < n && this.parent) {
// skip it, let the parent do this.
this.aborted = true
return
}
var ind = '' // new Array(this.level + 1).join(' ')
message = message.replace(/[\n\r\s\t]/g, ' ')
var point = '\nnot ok ' + n + ' - ' + message + '\n' + y
// point = ind + point.trimRight().split('\n').join('\n' + ind) + '\n'
if (this.planEnd === -1)
point += '1..' + n + '\n'
this.write(point)
this.aborted = true
this.end()
}
Parser.prototype.emitComment = function (line, skipLine) {

@@ -638,0 +684,0 @@ if (this.current || this.extraQueue.length) {

2

package.json
{
"name": "tap-parser",
"version": "5.0.1",
"version": "5.1.0",
"description": "parse the test anything protocol",

@@ -5,0 +5,0 @@ "main": "index.js",

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