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

dollar-shell

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dollar-shell - npm Package Compare versions

Comparing version 1.0.5 to 1.1.0

4

package.json
{
"name": "dollar-shell",
"description": "Run shell commands and use them in streams with ease in Node, Deno, Bun. Tiny, simple, no dependency package.",
"version": "1.0.5",
"version": "1.1.0",
"type": "module",

@@ -49,3 +49,3 @@ "main": "./src/index.js",

"devDependencies": {
"tape-six": "^0.12.1",
"tape-six": "^0.12.2",
"typescript": "^5.6.2"

@@ -52,0 +52,0 @@ },

@@ -207,2 +207,3 @@ # dollar-shell [![NPM version][npm-image]][npm-url]

* 1.1.0 *Added `asDuplex` to the sub-process object.*
* 1.0.5 *Updated dev dependencies.*

@@ -209,0 +210,0 @@ * 1.0.4 *Fixed `raw()` for spawn commands.*

@@ -33,2 +33,16 @@ /**

/**
* Object with readable and writable streams. It can be used as a duplex stream.
*/
interface DuplexPair<R = any> {
/**
* The readable stream.
*/
readable: ReadableStream<R>;
/**
* The writable stream.
*/
writable: WritableStream<R>;
}
/**
* Sub-process object.

@@ -82,2 +96,7 @@ */

/**
* Returns a duplex stream that can be used to pipe the input and output.
* It is defined as `{readable: this.stdout, writable: this.stdin}`.
*/
readonly asDuplex: DuplexPair<R>;
/**
* Kill the process.

@@ -187,16 +206,2 @@ */

/**
* Object with readable and writable streams. It can be used as a duplex stream.
*/
interface DuplexPair<R = any> {
/**
* The readable stream.
*/
readable: ReadableStream<R>;
/**
* The writable stream.
*/
writable: WritableStream<R>;
}
/**
* The type of the {@link $} function.

@@ -203,0 +208,0 @@ */

@@ -53,3 +53,3 @@ // @ts-self-types="./index.d.ts"

const sp = spawn(command, Object.assign({}, options, {stdin: 'pipe', stdout: 'pipe'}));
return {readable: sp.stdout, writable: sp.stdin};
return sp.asDuplex;
});

@@ -83,3 +83,3 @@

const sp = spawn(buildShellCommand(options?.shellPath, options?.shellArgs, command), Object.assign({}, options, {stdin: 'pipe', stdout: 'pipe'}));
return {readable: sp.stdout, writable: sp.stdin};
return sp.asDuplex;
});

@@ -86,0 +86,0 @@

@@ -57,2 +57,6 @@ 'use strict';

get asDuplex() {
return {readable: this.stdout, writable: this.stdin};
}
kill() {

@@ -59,0 +63,0 @@ this.killed = true;

@@ -66,2 +66,6 @@ 'use strict';

get asDuplex() {
return {readable: this.stdout, writable: this.stdin};
}
kill() {

@@ -68,0 +72,0 @@ this.killed = true;

@@ -64,2 +64,6 @@ 'use strict';

get asDuplex() {
return {readable: this.stdout, writable: this.stdin};
}
kill() {

@@ -66,0 +70,0 @@ this.killed = true;

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