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

@tapjs/core

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tapjs/core - npm Package Compare versions

Comparing version 0.0.0-14 to 0.0.0-15

dist/cjs/tap-file.d.ts

1

dist/cjs/index.d.ts

@@ -8,2 +8,3 @@ /**

import { CallSiteLike, CallSiteLikeJSON } from '@tapjs/stack';
export * from './tap-file.js';
export * from './base.js';

@@ -10,0 +11,0 @@ export * from './counts.js';

@@ -24,2 +24,3 @@ "use strict";

exports.tap = void 0;
__exportStar(require("./tap-file.js"), exports);
__exportStar(require("./base.js"), exports);

@@ -26,0 +27,0 @@ __exportStar(require("./counts.js"), exports);

14

dist/cjs/stdin.d.ts
/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Minipass } from 'minipass';
import { Base, BaseOpts, TapBaseEvents } from './base.js';
import { BaseOpts } from './base.js';
import { TapFile } from './tap-file.js';
/**

@@ -11,4 +12,2 @@ * Options that may be provided to the {@link @tapjs/core!stdin.Stdin} class

}
export interface StdinEvents extends TapBaseEvents {
}
/**

@@ -21,8 +20,9 @@ * Class representing standard input as a TAP stream

*/
export declare class Stdin extends Base<StdinEvents> {
inputStream: NodeJS.ReadableStream | Minipass<Buffer> | Minipass<string>;
export declare class Stdin extends TapFile {
caughtName: string;
emitName: string;
filename: '/dev/stdin';
tapStream: NodeJS.ReadableStream | Minipass<Buffer> | Minipass<string>;
constructor(options: StdinOpts);
main(cb: () => void): void;
threw(er: any, extra?: any, proxy?: boolean): void;
}
//# sourceMappingURL=stdin.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Stdin = void 0;
const base_js_1 = require("./base.js");
const tap_file_js_1 = require("./tap-file.js");
/**

@@ -12,36 +12,15 @@ * Class representing standard input as a TAP stream

*/
class Stdin extends base_js_1.Base {
inputStream;
class Stdin extends tap_file_js_1.TapFile {
caughtName = 'stdinError';
emitName = 'stdin';
constructor(options) {
super({
tapStream: process.stdin,
name: '/dev/stdin',
...options,
name: options.name || '/dev/stdin',
filename: '/dev/stdin',
});
this.inputStream = options.tapStream || process.stdin;
this.inputStream.pause();
}
main(cb) {
this.inputStream.on('error', er => {
er.tapCaught = 'stdinError';
this.threw(er);
});
if (this.options.timeout) {
this.setTimeout(this.options.timeout);
}
const s = this.inputStream;
s.pipe(this.parser);
if (this.parent) {
this.parent.emit('stdin', this);
}
this.inputStream.resume();
s.once('end', cb);
}
threw(er, extra, proxy) {
extra = super.threw(er, extra, proxy);
Object.assign(this.options, extra);
this.parser.abort(er.message, extra);
this.parser.end();
}
}
exports.Stdin = Stdin;
//# sourceMappingURL=stdin.js.map

@@ -14,3 +14,3 @@ /// <reference types="node" resolution-mode="require"/>

import { IMPLICIT } from './implicit-end-sigil.js';
import { Counts, Extra, MessageExtra, TapBaseEvents } from './index.js';
import { Counts, Extra, MessageExtra, TapBaseEvents, TapFile } from './index.js';
/**

@@ -120,2 +120,8 @@ * Options that can be passed to TestBase objects

/**
* Emitted when a child tests is initiated that replays a .tap file.
*
* @event
*/
tapFile: [tf: TapFile];
/**
* Emitted when the test is in an idle state, not waiting

@@ -362,3 +368,3 @@ * for anything, with nothing in its queue. Used by the root

new (options: O): T;
}, extra: TestBaseOpts | O | undefined, caller: (...a: any[]) => unknown): PromiseWithSubtest<T>;
}, extra?: O | TestBaseOpts, caller?: (...a: any[]) => unknown): PromiseWithSubtest<T>;
/**

@@ -365,0 +371,0 @@ * Method called when an unrecoverable error is encountered in a test.

@@ -956,3 +956,3 @@ "use strict";

*/
sub(Class, extra = {}, caller) {
sub(Class, extra = {}, caller = this.sub) {
if (this.bailedOut) {

@@ -1005,2 +1005,6 @@ return Object.assign(Promise.resolve(null), {

this.emit('subtestAdd', t);
// this would make its way here eventually anyway, but the
// test bailing out might be waiting for its turn in the pool
// to be processed, and bailout should happen ASAP.
t.on('bailout', reason => this.bailout(reason));
const d = new trivial_deferred_1.Deferred();

@@ -1007,0 +1011,0 @@ t.deferred = d;

@@ -8,2 +8,3 @@ /**

import { CallSiteLike, CallSiteLikeJSON } from '@tapjs/stack';
export * from './tap-file.js';
export * from './base.js';

@@ -10,0 +11,0 @@ export * from './counts.js';

@@ -7,2 +7,3 @@ /**

*/
export * from './tap-file.js';
export * from './base.js';

@@ -9,0 +10,0 @@ export * from './counts.js';

/// <reference types="node" resolution-mode="require"/>
/// <reference types="node" resolution-mode="require"/>
import { Minipass } from 'minipass';
import { Base, BaseOpts, TapBaseEvents } from './base.js';
import { BaseOpts } from './base.js';
import { TapFile } from './tap-file.js';
/**

@@ -11,4 +12,2 @@ * Options that may be provided to the {@link @tapjs/core!stdin.Stdin} class

}
export interface StdinEvents extends TapBaseEvents {
}
/**

@@ -21,8 +20,9 @@ * Class representing standard input as a TAP stream

*/
export declare class Stdin extends Base<StdinEvents> {
inputStream: NodeJS.ReadableStream | Minipass<Buffer> | Minipass<string>;
export declare class Stdin extends TapFile {
caughtName: string;
emitName: string;
filename: '/dev/stdin';
tapStream: NodeJS.ReadableStream | Minipass<Buffer> | Minipass<string>;
constructor(options: StdinOpts);
main(cb: () => void): void;
threw(er: any, extra?: any, proxy?: boolean): void;
}
//# sourceMappingURL=stdin.d.ts.map

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

import { Base } from './base.js';
import { TapFile } from './tap-file.js';
/**

@@ -9,35 +9,14 @@ * Class representing standard input as a TAP stream

*/
export class Stdin extends Base {
inputStream;
export class Stdin extends TapFile {
caughtName = 'stdinError';
emitName = 'stdin';
constructor(options) {
super({
tapStream: process.stdin,
name: '/dev/stdin',
...options,
name: options.name || '/dev/stdin',
filename: '/dev/stdin',
});
this.inputStream = options.tapStream || process.stdin;
this.inputStream.pause();
}
main(cb) {
this.inputStream.on('error', er => {
er.tapCaught = 'stdinError';
this.threw(er);
});
if (this.options.timeout) {
this.setTimeout(this.options.timeout);
}
const s = this.inputStream;
s.pipe(this.parser);
if (this.parent) {
this.parent.emit('stdin', this);
}
this.inputStream.resume();
s.once('end', cb);
}
threw(er, extra, proxy) {
extra = super.threw(er, extra, proxy);
Object.assign(this.options, extra);
this.parser.abort(er.message, extra);
this.parser.end();
}
}
//# sourceMappingURL=stdin.js.map

@@ -14,3 +14,3 @@ /// <reference types="node" resolution-mode="require"/>

import { IMPLICIT } from './implicit-end-sigil.js';
import { Counts, Extra, MessageExtra, TapBaseEvents } from './index.js';
import { Counts, Extra, MessageExtra, TapBaseEvents, TapFile } from './index.js';
/**

@@ -120,2 +120,8 @@ * Options that can be passed to TestBase objects

/**
* Emitted when a child tests is initiated that replays a .tap file.
*
* @event
*/
tapFile: [tf: TapFile];
/**
* Emitted when the test is in an idle state, not waiting

@@ -362,3 +368,3 @@ * for anything, with nothing in its queue. Used by the root

new (options: O): T;
}, extra: TestBaseOpts | O | undefined, caller: (...a: any[]) => unknown): PromiseWithSubtest<T>;
}, extra?: O | TestBaseOpts, caller?: (...a: any[]) => unknown): PromiseWithSubtest<T>;
/**

@@ -365,0 +371,0 @@ * Method called when an unrecoverable error is encountered in a test.

@@ -927,3 +927,3 @@ import * as stack from '@tapjs/stack';

*/
sub(Class, extra = {}, caller) {
sub(Class, extra = {}, caller = this.sub) {
if (this.bailedOut) {

@@ -976,2 +976,6 @@ return Object.assign(Promise.resolve(null), {

this.emit('subtestAdd', t);
// this would make its way here eventually anyway, but the
// test bailing out might be waiting for its turn in the pool
// to be processed, and bailout should happen ASAP.
t.on('bailout', reason => this.bailout(reason));
const d = new Deferred();

@@ -978,0 +982,0 @@ t.deferred = d;

{
"name": "@tapjs/core",
"version": "0.0.0-14",
"version": "0.0.0-15",
"description": "pluggable core of node-tap",

@@ -51,3 +51,3 @@ "author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me)",

"@tapjs/stack": "0.0.0-4",
"@tapjs/test": "0.0.0-14",
"@tapjs/test": "0.0.0-15",
"async-hook-domain": "^4.0.1",

@@ -54,0 +54,0 @@ "is-actual-promise": "^1.0.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

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