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

tap-arc

Package Overview
Dependencies
Maintainers
3
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-arc - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

10

package.json

@@ -5,3 +5,3 @@ {

"author": "tbeseda",
"version": "1.0.0",
"version": "1.0.1",
"license": "Apache-2.0",

@@ -46,2 +46,3 @@ "type": "module",

"tap-arc.upstream-error": "npm run --silent tape.upstream-error | node index.js",
"tap-arc.runtime-error": "npm run --silent tape.runtime-error | node index.js",
"tape.diff": "tape test/mock/create-diff-tap.cjs",

@@ -54,2 +55,3 @@ "tape.empty": "tape test/mock/create-empty-tap.cjs",

"tape.upstream-error": "tape test/mock/create-upstream-error-tap.cjs",
"tape.runtime-error": "tape test/mock/create-runtime-error-tap.js",
"tape": "tape test/**/*-test.js | tap-min",

@@ -64,8 +66,8 @@ "test": "npm run lint && npm run tape"

"strip-ansi": "^7.1.0",
"tap-parser": "^13.0.1",
"tcompare": "^6.0.0"
"tap-parser": "^15.0.0",
"tcompare": "^6.1.0"
},
"devDependencies": {
"@architect/eslint-config": "^2.1.2",
"@types/node": "^16.18.50",
"@types/node": "^16.18.53",
"eslint": "^8.49.0",

@@ -72,0 +74,0 @@ "tap-min": "^3.0.0",

3

src/_make-diff.js

@@ -1,2 +0,3 @@

import { strict } from 'tcompare'
// eslint-disable-next-line import/no-unresolved
import { strict } from 'tcompare' // what's going on with @tapjs packages?
import JSON5 from 'json5'

@@ -3,0 +4,0 @@

@@ -41,4 +41,4 @@ import { Chalk } from 'chalk'

},
fail ({ id, name }) {
return `${failMark} [${id}] ${red(name)}`
fail ({ id, name, tapError }) {
return `${failMark} ${tapError ? red(`"${tapError}"`) : `[${id}] ${red(name)}`}`
},

@@ -45,0 +45,0 @@ skip ({ id, name }) {

@@ -0,3 +1,4 @@

// eslint-disable-next-line import/no-unresolved
import { Parser } from 'tap-parser' // what's going on with @tapjs packages?
import { PassThrough } from 'stream'
import { Parser } from 'tap-parser'
import duplexer from 'duplexer3' // TODO: write a custom, simpler duplexer

@@ -173,12 +174,17 @@ import stripAnsi from 'strip-ansi'

if (!result.ok) {
if (
result.failures[0] &&
result.failures[0].tapError &&
result.failures[0].tapError.startsWith('incorrect number of tests')
) {
// custom failure was created by tap-parser
result.badCount = true // persisted to CLI process handler
result.failures.shift()
result.fail--
P(_.realBad(`\nExpected ${result.plan.end || '?'} assertions, parsed ${result.count || '?'}`))
const tapFailures = result.failures.filter((f) => f.tapError)
for (const tapFailure of tapFailures){
const { tapError } = tapFailure
if (tapError.startsWith('incorrect number of tests')) {
// custom failure was created by tap-parser
P(_.realBad(`\nExpected ${result.plan.end || '?'} assertions, parsed ${result.count || '?'}`))
result.badCount = true // persisted to CLI process handler
result.failures.shift()
result.fail--
}
else if (tapError.startsWith('no plan'))
P(_.realBad(`\nTAP test plan not found`))
else
P(_.realBad(`\n${tapError}`))
}

@@ -185,0 +191,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