Process -> BunProcess

This commit is contained in:
dave caruso
2023-10-18 22:34:13 -07:00
parent c9fa15d0c2
commit 11d4e85aa1
6 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
#include "Process.h"
#include "BunProcess.h"
#include "JavaScriptCore/InternalFieldTuple.h"
#include "JavaScriptCore/JSMicrotask.h"
#include "JavaScriptCore/ObjectConstructor.h"

View File

@@ -94,7 +94,7 @@
#include "JSStringDecoder.h"
#include "JSReadableState.h"
#include "JSReadableHelper.h"
#include "Process.h"
#include "BunProcess.h"
#include "AsyncContextFrame.h"
#include "WebCoreJSBuiltins.h"

View File

@@ -27,7 +27,7 @@
#include "wtf/MemoryFootprint.h"
#include "wtf/text/WTFString.h"
#include "Process.h"
#include "BunProcess.h"
#include <JavaScriptCore/SourceProviderCache.h>
#if ENABLE(REMOTE_INSPECTOR)
#include "JavaScriptCore/RemoteInspectorServer.h"

View File

@@ -53,6 +53,8 @@ export function checkAscii(str: string) {
}
export function writeIfNotChanged(file: string, contents: string) {
if (Array.isArray(contents)) contents = contents.join("");
if (fs.existsSync(file)) {
const oldContents = fs.readFileSync(file, "utf8");
if (oldContents === contents) {
@@ -63,7 +65,7 @@ export function writeIfNotChanged(file: string, contents: string) {
try {
fs.writeFileSync(file, contents);
} catch (error) {
fs.mkdirSync(path.dirname(file));
fs.mkdirSync(path.dirname(file), { recursive: true });
fs.writeFileSync(file, contents);
}
}