New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tap-bark

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tap-bark - npm Package Compare versions

Comparing version 2.0.0-alpha.1 to 2.0.0-beta.1

.nyc_output/227dbcfb87f5afcc042866b519fe5185.json

26

dist/tap-bark.d.ts
import { Assertion } from "./external/tap-parser";
import { Component as InkComponent, InkElement } from "ink";
declare const Component: any;
export { Component };
export declare class TapBarkOutput extends Component {
export interface TapBarkOutputState {
logs: Array<string>;
warnings: Array<string>;
results?: {
pass: number;
fail: number;
ignore: number;
failures: Array<Assertion>;
};
totalTests?: number;
currentTest?: number;
}
export interface TapBarkOutputProps {
showProgress: boolean;
}
declare class TapBarkOutputComponent extends Component {
getPipeable(): any;

@@ -9,5 +24,6 @@ private FIXTURE_REGEXP;

private _completeCalled;
private state;
constructor(props: any);
getFailureMessage(assertion: Assertion): string;
render(): any;
render(): InkElement;
private handleNewPlan;

@@ -20,2 +36,3 @@ private readonly warnings;

}
export declare const TapBarkOutput: new (props: TapBarkOutputProps) => InkComponent<TapBarkOutputProps, TapBarkOutputState, {}>;
export declare class TapBark {

@@ -25,3 +42,4 @@ static readonly tapParser: {

};
static create(showProgress?: boolean): TapBarkOutput;
static create(showProgress?: boolean): InkElement & TapBarkOutputComponent;
}
export { Component, TapBarkOutputComponent };

24

dist/tap-bark.js

@@ -7,6 +7,7 @@ "use strict";

const duplexer = require("duplexer");
const { h, render, Component, Color, Indent } = require("ink");
const ink_1 = require("ink");
const { Component, Indent } = require("ink");
exports.Component = Component;
const TAP_PARSER = parser();
class TapBarkOutput extends Component {
class TapBarkOutputComponent extends Component {
constructor(props) {

@@ -46,5 +47,5 @@ super(props);

if (this.state.results) {
return h(Indent, null,
return ink_1.h(Indent, null,
this.state.warnings.join("\n"),
h(Color, { green: true },
ink_1.h(ink_1.Color, { green: true },
"Pass: ",

@@ -55,3 +56,3 @@ results.pass,

"\n"),
h(Color, { red: true },
ink_1.h(ink_1.Color, { red: true },
"Fail: ",

@@ -62,3 +63,3 @@ results.fail,

"\n"),
h(Color, { yellow: true },
ink_1.h(ink_1.Color, { yellow: true },
"Ignore: ",

@@ -73,5 +74,5 @@ results.ignore,

if (this.props.showProgress === false) {
return h(Indent, null, "running alsatian tests");
return ink_1.h(Indent, null, "running alsatian tests");
}
return h(Indent, null,
return ink_1.h(Indent, null,
Math.floor(this.state.currentTest / total * 100 || 0),

@@ -136,7 +137,8 @@ "% complete");

}
exports.TapBarkOutput = TapBarkOutput;
exports.TapBarkOutputComponent = TapBarkOutputComponent;
exports.TapBarkOutput = TapBarkOutputComponent;
class TapBark {
static create(showProgress = true) {
const tapBarkOutput = h(TapBarkOutput, { showProgress: showProgress });
render(tapBarkOutput);
const tapBarkOutput = ink_1.h(exports.TapBarkOutput, { showProgress: showProgress });
ink_1.render(tapBarkOutput);
return tapBarkOutput.instance;

@@ -143,0 +145,0 @@ }

{
"name": "tap-bark",
"version": "2.0.0-alpha.1",
"version": "2.0.0-beta.1",
"description": "TAP parser for Alsatian",

@@ -44,2 +44,3 @@ "main": "dist/tap-bark.js",

"devDependencies": {
"@types/ink": "^0.5.1",
"@types/through2": "^2.0.34",

@@ -49,3 +50,2 @@ "alsatian": "^3.0.0-alpha.1",

"codeclimate-test-reporter": "^0.4.0",
"coveralls": "^2.11.15",
"install-self": "^1.0.0-beta.7",

@@ -56,4 +56,4 @@ "nyc": "^10.0.0",

"tslint-plugin-prettier": "^1.3.0",
"typescript": "^2.0.3"
"typescript": "^3.5.2"
}
}
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {

@@ -12,9 +15,12 @@ extendStatics(d, b);

})();
var __assign = (this && this.__assign) || Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};

@@ -26,8 +32,9 @@ Object.defineProperty(exports, "__esModule", { value: true });

var duplexer = require("duplexer");
var _a = require("ink"), h = _a.h, render = _a.render, Component = _a.Component, Color = _a.Color, Indent = _a.Indent;
var ink_1 = require("ink");
var _a = require("ink"), Component = _a.Component, Indent = _a.Indent;
exports.Component = Component;
var TAP_PARSER = parser();
var TapBarkOutput = (function (_super) {
__extends(TapBarkOutput, _super);
function TapBarkOutput(props) {
var TapBarkOutputComponent = (function (_super) {
__extends(TapBarkOutputComponent, _super);
function TapBarkOutputComponent(props) {
var _this = _super.call(this, props) || this;

@@ -45,6 +52,6 @@ _this.FIXTURE_REGEXP = /^# FIXTURE (.*)/;

}
TapBarkOutput.prototype.getPipeable = function () {
TapBarkOutputComponent.prototype.getPipeable = function () {
return duplexer(TAP_PARSER, through());
};
TapBarkOutput.prototype.getFailureMessage = function (assertion) {
TapBarkOutputComponent.prototype.getFailureMessage = function (assertion) {
var failureTitle = chalk_1.default.red("FAIL: ") + chalk_1.default.bold(assertion.name) + "\n";

@@ -64,9 +71,9 @@ if (assertion.diag) {

};
TapBarkOutput.prototype.render = function () {
TapBarkOutputComponent.prototype.render = function () {
var results = this.state.results;
var total = this.state.totalTests;
if (this.state.results) {
return h(Indent, null,
return ink_1.h(Indent, null,
this.state.warnings.join("\n"),
h(Color, { green: true },
ink_1.h(ink_1.Color, { green: true },
"Pass: ",

@@ -77,3 +84,3 @@ results.pass,

"\n"),
h(Color, { red: true },
ink_1.h(ink_1.Color, { red: true },
"Fail: ",

@@ -84,3 +91,3 @@ results.fail,

"\n"),
h(Color, { yellow: true },
ink_1.h(ink_1.Color, { yellow: true },
"Ignore: ",

@@ -95,9 +102,9 @@ results.ignore,

if (this.props.showProgress === false) {
return h(Indent, null, "running alsatian tests");
return ink_1.h(Indent, null, "running alsatian tests");
}
return h(Indent, null,
return ink_1.h(Indent, null,
Math.floor(this.state.currentTest / total * 100 || 0),
"% complete");
};
TapBarkOutput.prototype.handleNewPlan = function (plan) {
TapBarkOutputComponent.prototype.handleNewPlan = function (plan) {
this.setState({

@@ -107,3 +114,3 @@ totalTests: plan.end

};
TapBarkOutput.prototype.handleComment = function (comment) {
TapBarkOutputComponent.prototype.handleComment = function (comment) {
var fixtureParse = this.FIXTURE_REGEXP.exec(comment);

@@ -125,3 +132,3 @@ if (fixtureParse !== null) {

};
TapBarkOutput.prototype.handleAssert = function (assertion) {
TapBarkOutputComponent.prototype.handleAssert = function (assertion) {
this.setState({

@@ -132,3 +139,3 @@ currentTest: assertion.id,

};
TapBarkOutput.prototype.handleComplete = function (results) {
TapBarkOutputComponent.prototype.handleComplete = function (results) {
var _results = {

@@ -152,3 +159,3 @@ pass: results.pass || 0,

};
TapBarkOutput.prototype.setupListeners = function () {
TapBarkOutputComponent.prototype.setupListeners = function () {
if (this.props.showProgress) {

@@ -161,5 +168,6 @@ TAP_PARSER.on("comment", this.handleComment.bind(this));

};
return TapBarkOutput;
return TapBarkOutputComponent;
}(Component));
exports.TapBarkOutput = TapBarkOutput;
exports.TapBarkOutputComponent = TapBarkOutputComponent;
exports.TapBarkOutput = TapBarkOutputComponent;
var TapBark = (function () {

@@ -170,4 +178,4 @@ function TapBark() {

if (showProgress === void 0) { showProgress = true; }
var tapBarkOutput = h(TapBarkOutput, { showProgress: showProgress });
render(tapBarkOutput);
var tapBarkOutput = ink_1.h(exports.TapBarkOutput, { showProgress: showProgress });
ink_1.render(tapBarkOutput);
return tapBarkOutput.instance;

@@ -174,0 +182,0 @@ };

import { Assertion } from "./external/tap-parser";
import { Component as InkComponent, InkElement } from "ink";
declare const Component: any;
export { Component };
export declare class TapBarkOutput extends Component {
export interface TapBarkOutputState {
logs: Array<string>;
warnings: Array<string>;
results?: {
pass: number;
fail: number;
ignore: number;
failures: Array<Assertion>;
};
totalTests?: number;
currentTest?: number;
}
export interface TapBarkOutputProps {
showProgress: boolean;
}
declare class TapBarkOutputComponent extends Component {
getPipeable(): any;

@@ -9,5 +24,6 @@ private FIXTURE_REGEXP;

private _completeCalled;
private state;
constructor(props: any);
getFailureMessage(assertion: Assertion): string;
render(): any;
render(): InkElement;
private handleNewPlan;

@@ -20,2 +36,3 @@ private readonly warnings;

}
export declare const TapBarkOutput: new (props: TapBarkOutputProps) => InkComponent<TapBarkOutputProps, TapBarkOutputState, {}>;
export declare class TapBark {

@@ -25,3 +42,4 @@ static readonly tapParser: {

};
static create(showProgress?: boolean): TapBarkOutput;
static create(showProgress?: boolean): InkElement & TapBarkOutputComponent;
}
export { Component, TapBarkOutputComponent };

@@ -7,6 +7,7 @@ "use strict";

const duplexer = require("duplexer");
const { h, render, Component, Color, Indent } = require("ink");
const ink_1 = require("ink");
const { Component, Indent } = require("ink");
exports.Component = Component;
const TAP_PARSER = parser();
class TapBarkOutput extends Component {
class TapBarkOutputComponent extends Component {
constructor(props) {

@@ -46,5 +47,5 @@ super(props);

if (this.state.results) {
return h(Indent, null,
return ink_1.h(Indent, null,
this.state.warnings.join("\n"),
h(Color, { green: true },
ink_1.h(ink_1.Color, { green: true },
"Pass: ",

@@ -55,3 +56,3 @@ results.pass,

"\n"),
h(Color, { red: true },
ink_1.h(ink_1.Color, { red: true },
"Fail: ",

@@ -62,3 +63,3 @@ results.fail,

"\n"),
h(Color, { yellow: true },
ink_1.h(ink_1.Color, { yellow: true },
"Ignore: ",

@@ -73,5 +74,5 @@ results.ignore,

if (this.props.showProgress === false) {
return h(Indent, null, "running alsatian tests");
return ink_1.h(Indent, null, "running alsatian tests");
}
return h(Indent, null,
return ink_1.h(Indent, null,
Math.floor(this.state.currentTest / total * 100 || 0),

@@ -136,7 +137,8 @@ "% complete");

}
exports.TapBarkOutput = TapBarkOutput;
exports.TapBarkOutputComponent = TapBarkOutputComponent;
exports.TapBarkOutput = TapBarkOutputComponent;
class TapBark {
static create(showProgress = true) {
const tapBarkOutput = h(TapBarkOutput, { showProgress: showProgress });
render(tapBarkOutput);
const tapBarkOutput = ink_1.h(exports.TapBarkOutput, { showProgress: showProgress });
ink_1.render(tapBarkOutput);
return tapBarkOutput.instance;

@@ -143,0 +145,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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