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 0.3.6-RC.0 to 0.3.6-RC.1

src/tap-arc.js

13

index.js
#!/usr/bin/env node
import minimist from 'minimist'
import helpText from './src/_help-text.js'
import tapArc from './src/arc-tap.js'
import tapArc from './src/tap-arc.js'

@@ -25,7 +24,9 @@ const alias = {

const parser = tapArc(options, (error, result) => {
process.exit(result.ok ? 0 : 1)
// process.exit(result.ok && result.count > 0 ? 0 : 1)
const parser = tapArc(options)
// @ts-ignore - DuplexWrapper is not typed
parser.on('end', () => {
if (!parser._writable.results.ok) process.exit(1)
})
process.stdin.pipe(parser)
// @ts-ignore
process.stdin.pipe(parser).pipe(process.stdout)

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

"author": "tbeseda",
"version": "0.3.6-RC.0",
"version": "0.3.6-RC.1",
"license": "Apache-2.0",

@@ -33,36 +33,38 @@ "type": "module",

"scripts": {
"lint": "eslint . --fix",
"lint:check": "eslint .",
"tap-arc:diff:-v": "npm run --silent tape:diff | ./index.js -v",
"tap-arc:diff": "npm run --silent tape:diff | ./index.js",
"tap-arc:empty": "npm run --silent tape:empty | ./index.js",
"tap-arc:mixed": "npm run --silent tape:mixed | ./index.js",
"tap-arc:upstream-error": "npm run --silent tape:upstream-error | ./index.js",
"tap-arc:passing": "npm run --silent tape:passing | ./index.js",
"tap-arc:simple:-p": "npm run --silent tape:simple | ./index.js -p",
"tap-arc:simple:-v": "npm run --silent tape:simple | ./index.js -v",
"tap-arc:simple": "npm run --silent tape:simple | ./index.js",
"tap-arc:throws": "npm run --silent tape:throws | ./index.js",
"tape:diff": "tape test/create-diff-tap.cjs",
"tape:empty": "tape test/create-empty-tap.cjs",
"tape:mixed": "tape test/create-mixed-tap.cjs",
"tape:upstream-error": "tape test/create-upstream-error-tap.cjs",
"tape:passing": "tape test/create-passing-tap.cjs",
"tape:simple": "tape test/create-simple-tap.cjs",
"tape:throws": "tape test/create-throws-tap.cjs",
"test": "npm run lint:check && tape test/index.cjs | ./index.js"
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"tap-arc.diff:-v": "npm run --silent tape.diff | tap-arc -v",
"tap-arc.diff": "npm run --silent tape.diff | tap-arc",
"tap-arc.empty": "npm run --silent tape.empty | tap-arc",
"tap-arc.mixed": "npm run --silent tape.mixed | tap-arc",
"tap-arc.upstream-error": "npm run --silent tape.upstream-error | tap-arc",
"tap-arc.passing": "npm run --silent tape.passing | tap-arc",
"tap-arc.simple.-p": "npm run --silent tape.simple | tap-arc -p",
"tap-arc.simple.-v": "npm run --silent tape.simple | tap-arc -v",
"tap-arc.simple": "npm run --silent tape.simple | tap-arc",
"tap-arc.throws": "npm run --silent tape.throws | tap-arc",
"tape.diff": "tape test/create-diff-tap.cjs",
"tape.empty": "tape test/create-empty-tap.cjs",
"tape.mixed": "tape test/create-mixed-tap.cjs",
"tape.upstream-error": "tape test/create-upstream-error-tap.cjs",
"tape.passing": "tape test/create-passing-tap.cjs",
"tape.simple": "tape test/create-simple-tap.cjs",
"tape.throws": "tape test/create-throws-tap.cjs",
"tape": "tape test/index.js | tap-arc",
"test": "npm link && npm run lint && npm run tape"
},
"dependencies": {
"chalk": "^5.2.0",
"chalk": "^5.3.0",
"duplexer3": "^1.0.0",
"json5": "^2.2.3",
"minimist": "^1.2.8",
"strip-ansi": "6.0.1",
"tap-parser": "^13.0.0",
"strip-ansi": "^7.1.0",
"tap-parser": "^13.0.1",
"tcompare": "^6.0.0"
},
"devDependencies": {
"@architect/eslint-config": "^2.1.1",
"@types/node": "^18.0.03",
"eslint": "^8.39.0",
"tape": "5.6.3"
"@architect/eslint-config": "^2.1.2",
"@types/node": "^16.18.50",
"eslint": "^8.49.0",
"tape": "5.6.6"
},

@@ -69,0 +71,0 @@ "eslintConfig": {

@@ -16,3 +16,3 @@ # `tap-arc`

> Compatible with Node.js 14+.
> Compatible with Node.js 16+.

@@ -37,8 +37,2 @@ Save `tap-arc` as a development dependency:

Alternatively, use `tap-arc` globally:
```sh
npm i -g tap-arc
```
### `tap-arc --help`

@@ -68,8 +62,18 @@

When building `tap-arc`, it's helpful to try various TAP outputs. See `package.json` `"scripts"` for useful "tap-arc:*" commands to test passing and failing TAP.
When building `tap-arc`, it's helpful to try various TAP outputs. See `package.json` `"scripts"` for useful "tap-arc.*" commands to test passing and failing TAP.
```sh
npm run tap-arc:simple # used to create the screen shot above
npm run tap-arc.simple # used to create the screen shot above
```
### Tip!
Use
```sh
echo $?
```
to see previous exit code.
### Tests

@@ -79,4 +83,2 @@

Snapshot testing became too arduous to maintain for the sake of aesthetics.
Testing could be improved by unit testing the printer and diff maker.

@@ -83,0 +85,0 @@

@@ -7,3 +7,8 @@ import { Chalk } from 'chalk'

export default function (options) {
function prettyMs (start) {
const ms = Date.now() - start
return ms < 1000 ? `${ms} ms` : `${ms / 1000} s`
}
export default function (options, output) {
const {

@@ -19,3 +24,2 @@ blue,

yellow,
} = new Chalk({ level: options.color ? 3 : 0 })

@@ -33,4 +37,7 @@

return {
end (start) {
output.end(`${dim(prettyMs(start))}\n`)
},
print (s, p = 0) {
console.log(`${pad(p)}${s}`)
output.write(`${pad(p)}${s}\n`)
},

@@ -60,7 +67,3 @@ pass (s) {

actual,
prettyMs (start) {
const ms = Date.now() - start
return ms < 1000 ? `${ms} ms` : `${ms / 1000} s`
},
}
}
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