aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/builtins/js/ProcessObjectInternals.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-31 17:55:16 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-01-31 17:55:16 -0800
commitcc4326cd829decc95d1f1f23998f97705637e04b (patch)
tree9ccaa829b6d48af521d5e5fcdbabc0dac8d186af /src/bun.js/builtins/js/ProcessObjectInternals.js
parentc57b37d29f9d04780c7f7917789cf8b424710d23 (diff)
downloadbun-cc4326cd829decc95d1f1f23998f97705637e04b.tar.gz
bun-cc4326cd829decc95d1f1f23998f97705637e04b.tar.zst
bun-cc4326cd829decc95d1f1f23998f97705637e04b.zip
Re-run prettier after changes
Diffstat (limited to 'src/bun.js/builtins/js/ProcessObjectInternals.js')
-rw-r--r--src/bun.js/builtins/js/ProcessObjectInternals.js40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/bun.js/builtins/js/ProcessObjectInternals.js b/src/bun.js/builtins/js/ProcessObjectInternals.js
index e23e516b8..723528fec 100644
--- a/src/bun.js/builtins/js/ProcessObjectInternals.js
+++ b/src/bun.js/builtins/js/ProcessObjectInternals.js
@@ -25,7 +25,7 @@
function getStdioWriteStream(fd_, rawRequire) {
var module = { path: "node:process", require: rawRequire };
- var require = (path) => module.require(path);
+ var require = path => module.require(path);
function createStdioWriteStream(fd_) {
var { Duplex, eos, destroy } = require("node:stream");
@@ -72,18 +72,9 @@ function getStdioWriteStream(fd_, rawRequire) {
_destroy(err, callback) {
if (!err && this.#onClose !== null) {
var AbortError = class AbortError extends Error {
- constructor(
- message = "The operation was aborted",
- options = void 0,
- ) {
+ constructor(message = "The operation was aborted", options = void 0) {
if (options !== void 0 && typeof options !== "object") {
- throw new Error(
- `Invalid AbortError options:\n\n${JSON.stringify(
- options,
- null,
- 2,
- )}`,
- );
+ throw new Error(`Invalid AbortError options:\n\n${JSON.stringify(options, null, 2)}`);
}
super(message, options);
this.code = "ABORT_ERR";
@@ -125,7 +116,7 @@ function getStdioWriteStream(fd_, rawRequire) {
}
});
- eos(stream, (err) => {
+ eos(stream, err => {
this.#writable = false;
if (err) {
destroy(stream, err);
@@ -164,7 +155,7 @@ function getStdioWriteStream(fd_, rawRequire) {
this.push(null);
});
- eos(readStream, (err) => {
+ eos(readStream, err => {
this.#readable = false;
if (err) {
destroy(readStream, err);
@@ -197,12 +188,7 @@ function getStdioWriteStream(fd_, rawRequire) {
if (!encoding) return true;
var normalied = encoding.toLowerCase();
- return (
- normalied === "utf8" ||
- normalied === "utf-8" ||
- normalied === "buffer" ||
- normalied === "binary"
- );
+ return normalied === "utf8" || normalied === "utf-8" || normalied === "buffer" || normalied === "binary";
}
var FastStdioWriteStream = class StdioWriteStream extends EventEmitter {
@@ -356,7 +342,7 @@ function getStdioWriteStream(fd_, rawRequire) {
this.#performCallback(callback);
this.emit("drain");
},
- (err) => this.#performCallback(callback, err),
+ err => this.#performCallback(callback, err),
);
return false;
}
@@ -437,7 +423,7 @@ function getStdioWriteStream(fd_, rawRequire) {
function getStdinStream(fd_, rawRequire, Bun) {
var module = { path: "node:process", require: rawRequire };
- var require = (path) => module.require(path);
+ var require = path => module.require(path);
var { Duplex, eos, destroy } = require("node:stream");
@@ -486,13 +472,7 @@ function getStdinStream(fd_, rawRequire, Bun) {
var AbortError = class AbortError extends Error {
constructor(message = "The operation was aborted", options = void 0) {
if (options !== void 0 && typeof options !== "object") {
- throw new Error(
- `Invalid AbortError options:\n\n${JSON.stringify(
- options,
- null,
- 2,
- )}`,
- );
+ throw new Error(`Invalid AbortError options:\n\n${JSON.stringify(options, null, 2)}`);
}
super(message, options);
this.code = "ABORT_ERR";
@@ -610,7 +590,7 @@ function getStdinStream(fd_, rawRequire, Bun) {
}
});
- eos(writeStream, (err) => {
+ eos(writeStream, err => {
this.#writable = false;
if (err) {
destroy(writeStream, err);