🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

bare-process

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bare-process - npm Package Compare versions

Comparing version
4.4.0
to
4.4.1
+4
-5
index.d.ts

@@ -13,5 +13,4 @@ import abort from 'bare-abort'

} from 'bare-os'
import tty from 'bare-tty'
import fs from 'bare-fs'
import hrtime from 'bare-hrtime'
import stdio from 'bare-stdio'

@@ -36,5 +35,5 @@ interface ProcessEvents extends EventMap {

interface Process<M extends ProcessEvents = ProcessEvents> extends EventEmitter<M> {
readonly stdin: tty.ReadStream | fs.ReadStream
readonly stdout: tty.WriteStream | fs.WriteStream
readonly stderr: tty.WriteStream | fs.WriteStream
readonly stdin: typeof stdio.in
readonly stdout: typeof stdio.out
readonly stderr: typeof stdio.err

@@ -41,0 +40,0 @@ readonly arch: ReturnType<typeof arch>

const abort = require('bare-abort')
const EventEmitter = require('bare-events')
const Signal = require('bare-signals')
const tty = require('bare-tty')
const fs = require('bare-fs')
const os = require('bare-os')
const env = require('bare-env')
const hrtime = require('bare-hrtime')
const stdio = require('bare-stdio')

@@ -14,6 +13,2 @@ class Process extends EventEmitter {

this._stdin = null
this._stdout = null
this._stderr = null
this._startTime = hrtime.bigint()

@@ -40,29 +35,11 @@

get stdin() {
if (this._stdin === null) {
this._stdin = tty.isTTY(0)
? new tty.ReadStream(0)
: fs.createReadStream(null, { fd: 0, eagerOpen: false })
}
return this._stdin
return stdio.in
}
get stdout() {
if (this._stdout === null) {
this._stdout = tty.isTTY(1)
? new tty.WriteStream(1)
: fs.createWriteStream(null, { fd: 1, eagerOpen: false })
}
return this._stdout
return stdio.out
}
get stderr() {
if (this._stderr === null) {
this._stderr = tty.isTTY(2)
? new tty.WriteStream(2)
: fs.createWriteStream(null, { fd: 2, eagerOpen: false })
}
return this._stderr
return stdio.err
}

@@ -69,0 +46,0 @@

{
"name": "bare-process",
"version": "4.4.0",
"version": "4.4.1",
"description": "Node.js-compatible process control for Bare",

@@ -23,3 +23,5 @@ "exports": {

"scripts": {
"test": "prettier . --check && bare test.js"
"format": "prettier --write . && lunte --fix",
"lint": "prettier --check . && lunte",
"test": "brittle-bare --coverage test.js"
},

@@ -40,10 +42,10 @@ "repository": {

"bare-events": "^2.3.1",
"bare-fs": "^4.5.6",
"bare-hrtime": "^2.0.0",
"bare-os": "^3.7.1",
"bare-signals": "^4.0.0",
"bare-tty": "^5.0.0"
"bare-stdio": "^1.0.1"
},
"devDependencies": {
"brittle": "^3.2.1",
"lunte": "^1.6.0",
"prettier": "^3.4.1",

@@ -50,0 +52,0 @@ "prettier-config-holepunch": "^2.0.0"