fix: main is not readonly in @types/node (#21612)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alistair Smith
2025-08-04 13:07:42 -07:00
committed by GitHub
parent 9785e37e10
commit be5c69df79
6 changed files with 25 additions and 25 deletions

View File

@@ -1284,7 +1284,7 @@ interface ImportMeta {
* )
* ```
*/
readonly main: boolean;
main: boolean;
/** Alias of `import.meta.dir`. Exists for Node.js compatibility */
dirname: string;

View File

@@ -4116,7 +4116,7 @@ pub const umask = switch (Environment.os) {
.windows => @extern(*const fn (mode: u16) callconv(.c) u16, .{ .name = "_umask" }),
};
pub const File = @import("sys/File.zig");
pub const File = @import("./sys/File.zig");
const builtin = @import("builtin");
const sys = @This(); // to avoid ambiguous references.
@@ -4126,14 +4126,11 @@ const Environment = bun.Environment;
const FD = bun.FD;
const MAX_PATH_BYTES = bun.MAX_PATH_BYTES;
const c = bun.c; // translated c headers
const default_allocator = bun.default_allocator;
const jsc = bun.jsc;
const libc_stat = bun.Stat;
const assertIsValidWindowsPath = bun.strings.assertIsValidWindowsPath;
const darwin_nocancel = bun.darwin.nocancel;
const jsc = bun.jsc;
const SystemError = jsc.SystemError;
const windows = bun.windows;
const kernel32 = bun.windows.kernel32;
const ntdll = bun.windows.ntdll;

View File

@@ -326,14 +326,16 @@ pub fn toJS(this: Error, ptr: *jsc.JSGlobalObject) jsc.JSValue {
return this.toSystemError().toErrorInstance(ptr);
}
const bun = @import("bun");
const std = @import("std");
const sys = bun.sys;
const bun = @import("bun");
const Environment = bun.Environment;
const jsc = bun.jsc;
const Environment = bun.Environment;
const SystemError = jsc.SystemError;
const sys = bun.sys;
const E = sys.E;
const SystemErrno = sys.SystemErrno;
const coreutils_error_map = sys.coreutils_error_map;
const libuv_error_map = sys.libuv_error_map;
const SystemError = jsc.SystemError;
const SystemErrno = sys.SystemErrno;

View File

@@ -432,20 +432,21 @@ pub fn toSource(path: anytype, allocator: std.mem.Allocator, opts: ToSourceOptio
return toSourceAt(std.fs.cwd(), path, allocator, opts);
}
const std = @import("std");
const bun = @import("bun");
const sys = bun.sys;
const O = sys.O;
const posix = std.posix;
const windows = bun.windows;
const default_allocator = bun.default_allocator;
const Maybe = bun.sys.Maybe;
const Error = bun.sys.Error;
const SystemErrno = bun.sys.SystemErrno;
const Environment = bun.Environment;
const default_allocator = bun.default_allocator;
const windows = bun.windows;
const sys = bun.sys;
const Error = bun.sys.Error;
const Maybe = bun.sys.Maybe;
const O = sys.O;
const SystemErrno = bun.sys.SystemErrno;
const fstat = sys.fstat;
const pread = sys.pread;
const getFileSize = sys.getFileSize;
const getFdPath = sys.getFdPath;
const getFileSize = sys.getFileSize;
const openatWindowsTMaybeNormalize = sys.openatWindowsTMaybeNormalize;
const pread = sys.pread;
const std = @import("std");
const posix = std.posix;

View File

@@ -263,7 +263,8 @@ pub const coreutils_error_map = brk: {
break :brk map;
};
const bun = @import("bun");
const std = @import("std");
const bun = @import("bun");
const Environment = bun.Environment;
const SystemErrno = bun.sys.SystemErrno;

View File

@@ -102,5 +102,4 @@ pub const libuv_error_map = brk: {
const bun = @import("bun");
const std = @import("std");
const Environment = bun.Environment;
const SystemErrno = bun.sys.SystemErrno;