tap-parser
Advanced tools
Comparing version 9.3.2 to 9.3.3
#!/usr/bin/env node | ||
var Parser = require('../') | ||
var etoa = require('events-to-array') | ||
var util = require('util') | ||
const Parser = require('../') | ||
const etoa = require('events-to-array') | ||
const util = require('util') | ||
var args = process.argv.slice(2) | ||
var json = null | ||
var flat = false | ||
var bail = false | ||
var preserveWhitespace = true | ||
var omitVersion = false | ||
var strict = false | ||
const args = process.argv.slice(2) | ||
let json = null | ||
let flat = false | ||
let bail = false | ||
let preserveWhitespace = true | ||
let omitVersion = false | ||
let strict = false | ||
@@ -31,3 +31,3 @@ function version () { | ||
} else { | ||
var m = arg.match(/^--json(?:=([0-9]+))?$/) | ||
const m = arg.match(/^--json(?:=([0-9]+))?$/) | ||
if (m) { | ||
@@ -132,3 +132,3 @@ if (+m[1] >= 0) | ||
var yaml = require('tap-yaml') | ||
const yaml = require('tap-yaml') | ||
let id = 1 | ||
@@ -139,4 +139,4 @@ function tapFormat (msg, indent) { | ||
case 'child': | ||
var comment = item[1][0] | ||
var child = item[1].slice(1) | ||
const comment = item[1][0] | ||
const child = item[1].slice(1) | ||
return tapFormat([comment], '') + tapFormat(child, ' ') | ||
@@ -152,6 +152,4 @@ | ||
} | ||
var p = item[1].start + '..' + item[1].end | ||
if (item[1].comment) | ||
p += ' # ' + item[1].comment | ||
return p + '\n' | ||
return item[1].start + '..' + item[1].end | ||
+ (item[1].comment ? ' # ' + item[1].comment : '') + '\n' | ||
@@ -162,11 +160,15 @@ case 'pragma': | ||
case 'bailout': | ||
var r = item[1] ? (' ' + item[1]) : '' | ||
return 'Bail out!' + r + '\n' | ||
return 'Bail out!' + (item[1] ? (' ' + item[1]) : '') + '\n' | ||
case 'result': | ||
case 'assert': | ||
var res = item[1] | ||
const res = item[1] | ||
if (item[0] === 'result') { | ||
res.id = id++ | ||
res.name = (res.fullname + ' > ' + (res.name || '')).trim() | ||
const name = [] | ||
if (res.fullname) | ||
name.push(res.fullname) | ||
if (res.name) | ||
name.push(res.name) | ||
res.name = name.join(' > ').trim() | ||
} | ||
@@ -203,3 +205,3 @@ return (res.ok ? '' : 'not ') + 'ok ' + res.id + | ||
var options = { | ||
const options = { | ||
bail: bail, | ||
@@ -211,3 +213,3 @@ preserveWhitespace: preserveWhitespace, | ||
var parser = new Parser(options) | ||
const parser = new Parser(options) | ||
const ignore = [ | ||
@@ -229,3 +231,3 @@ 'pipe', | ||
var events = etoa(parser, ignore) | ||
const events = etoa(parser, ignore) | ||
@@ -232,0 +234,0 @@ if (json === 'lines') |
{ | ||
"name": "tap-parser", | ||
"version": "9.3.2", | ||
"version": "9.3.3", | ||
"description": "parse the test anything protocol", | ||
@@ -16,3 +16,3 @@ "main": "index.js", | ||
"glob": "^7.0.5", | ||
"tap": "^13.0.0-rc.22" | ||
"tap": "^14.4.1" | ||
}, | ||
@@ -22,6 +22,5 @@ "scripts": { | ||
"test": "tap", | ||
"regen-fixtures": "node scripts/generate-test.js test/fixtures/*.tap", | ||
"preversion": "npm test", | ||
"postversion": "npm publish", | ||
"postpublish": "git push origin --all; git push origin --tags" | ||
"postpublish": "git push origin --follow-tags" | ||
}, | ||
@@ -42,5 +41,5 @@ "testling": { | ||
"type": "git", | ||
"url": "git://github.com/substack/tap-parser.git" | ||
"url": "git://github.com/tapjs/tap-parser.git" | ||
}, | ||
"homepage": "https://github.com/substack/tap-parser", | ||
"homepage": "https://github.com/tapjs/tap-parser", | ||
"keywords": [ | ||
@@ -51,7 +50,2 @@ "tap", | ||
], | ||
"author": { | ||
"name": "James Halliday", | ||
"email": "mail@substack.net", | ||
"url": "http://substack.net" | ||
}, | ||
"license": "MIT", | ||
@@ -58,0 +52,0 @@ "optionalDependencies": {}, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1075
45327
2