no usingnamespace, organize jsc namespace, enable -fincremental (#19122)

Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
This commit is contained in:
chloe caruso
2025-04-22 16:34:15 -07:00
committed by GitHub
parent 842fe8664e
commit 3349c995b5
271 changed files with 30131 additions and 30868 deletions

View File

@@ -85,7 +85,7 @@ pub const PatchFile = struct {
abs_patch_dir,
todir,
}, .auto);
var nodefs = bun.JSC.Node.NodeFS{};
var nodefs = bun.api.node.fs.NodeFS{};
if (nodefs.mkdirRecursive(.{
.path = .{ .string = bun.PathString.init(path_to_make) },
.recursive = true,
@@ -102,7 +102,7 @@ pub const PatchFile = struct {
const filedir = bun.path.dirname(filepath.slice(), .auto);
const mode = part.file_creation.mode;
var nodefs = bun.JSC.Node.NodeFS{};
var nodefs = bun.api.node.fs.NodeFS{};
if (filedir.len > 0) {
if (nodefs.mkdirRecursive(.{
.path = .{ .string = bun.PathString.init(filedir) },
@@ -1078,7 +1078,7 @@ const PatchLinesParser = struct {
pub const TestingAPIs = struct {
pub fn makeDiff(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
const arguments_ = callframe.arguments_old(2);
var arguments = JSC.Node.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
var arguments = JSC.CallFrame.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
const old_folder_jsval = arguments.nextEat() orelse {
return globalThis.throw("expected 2 strings", .{});
@@ -1141,7 +1141,7 @@ pub const TestingAPIs = struct {
/// Used in JS tests, see `internal-for-testing.ts` and patch tests.
pub fn parse(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSError!JSC.JSValue {
const arguments_ = callframe.arguments_old(2);
var arguments = JSC.Node.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
var arguments = JSC.CallFrame.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
const patchfile_src_js = arguments.nextEat() orelse {
return globalThis.throw("TestingAPIs.parse: expected at least 1 argument, got 0", .{});
@@ -1165,7 +1165,7 @@ pub const TestingAPIs = struct {
pub fn parseApplyArgs(globalThis: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) bun.JSC.Node.Maybe(ApplyArgs, JSC.JSValue) {
const arguments_ = callframe.arguments_old(2);
var arguments = JSC.Node.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
var arguments = JSC.CallFrame.ArgumentsSlice.init(globalThis.bunVM(), arguments_.slice());
const patchfile_js = arguments.nextEat() orelse {
globalThis.throw("apply: expected at least 1 argument, got 0", .{}) catch {};