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

coffee

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffee - npm Package Compare versions

Comparing version 5.2.2 to 5.3.0

6

HISTORY.md
5.3.0 / 2020-04-22
==================
**features**
* [[`462c583`](http://github.com/node-modules/coffee/commit/462c5837246a9b4d0fd757f4982f1c3cafb95ce4)] - feat: support on event (#80) (TZ | 天猪 <<atian25@qq.com>>)
5.2.2 / 2019-07-30

@@ -3,0 +9,0 @@ ==================

3

index.d.ts
import { EventEmitter } from 'events';
import { ForkOptions, SpawnOptions } from 'child_process';
import { ForkOptions, SpawnOptions, ChildProcess } from 'child_process';
import { Readable } from 'stream';

@@ -26,2 +26,3 @@

error: Error | null;
proc: ChildProcess | null;
}

@@ -28,0 +29,0 @@

@@ -61,2 +61,3 @@ 'use strict';

this.stdout += buf;
this.emit('stdout', buf.toString());
});

@@ -67,2 +68,3 @@ this.on('stderr_data', buf => {

this.stderr += buf;
this.emit('stderr', buf.toString());
});

@@ -86,2 +88,3 @@ this.on('error', err => {

error: this.error,
proc: this.proc,
};

@@ -91,2 +94,3 @@ this.emit('complete_success', result);

} catch (err) {
err.proc = this.proc;
this.emit('complete_error', err);

@@ -273,2 +277,3 @@ return this.cb && this.cb(err);

debug(`coffee exit with ${code}`);
cmd.exitCode = code;
cmd.kill();

@@ -275,0 +280,0 @@ });

{
"name": "coffee",
"version": "5.2.2",
"version": "5.3.0",
"description": "Test command line on Node.js.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -284,2 +284,17 @@ # Coffee

#### coffee.on(event, callback)
Emit `stdout/stderr` event.
```js
coffee.fork('path/to/cli')
.on('stdout', function (buf) {
if (buf.toString().includes('egg-ready')) {
this.proc.kill();
}
})
.expect('stdout', 'egg-ready')
.end(done);
```
#### coffee.debug(level)

@@ -286,0 +301,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