From ba78d5b2c332cf7c9749248cfac0122e884dbd3d Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sat, 31 May 2025 17:52:18 -0800 Subject: [PATCH] ci: pass the src directory to 'zig fmt' (#20114) Co-authored-by: nektro <5464072+nektro@users.noreply.github.com> --- .github/workflows/format.yml | 2 +- src/bake/DevServer.zig | 1 - src/bun.js/ModuleLoader.zig | 1 - src/bun.js/bindings/CustomGetterSetter.zig | 1 - src/bun.js/bindings/ErrorCode.zig | 1 - src/bun.js/bindings/GetterSetter.zig | 1 - src/bun.js/bindings/JSPromiseRejectionOperation.zig | 1 - src/bun.js/bindings/ScriptExecutionStatus.zig | 1 - src/bun.js/bindings/SourceType.zig | 1 - src/bun.js/jsc/host_fn.zig | 1 - src/bun.js/node/node_assert.zig | 1 - src/bun.js/node/path.zig | 1 - src/bun.js/node/path_watcher.zig | 1 - src/bun.js/test/expect.zig | 1 - src/bun.js/test/jest.zig | 1 - src/bun.js/unbounded_queue.zig | 1 - src/bun.js/webcore/Response.zig | 2 -- src/bun.js/webcore/fetch.zig | 1 - src/cli/build_command.zig | 2 -- src/cli/filter_arg.zig | 1 - src/cli/install_completions_command.zig | 2 -- src/cli/run_command.zig | 2 -- src/cli/test_command.zig | 1 - src/css/css_modules.zig | 1 - src/css/dependencies.zig | 1 - src/css/logical.zig | 2 -- src/css/printer.zig | 1 - src/css/properties/contain.zig | 2 -- src/css/properties/css_modules.zig | 1 - src/css/properties/display.zig | 2 -- src/css/properties/effects.zig | 2 -- src/css/properties/flex.zig | 1 - src/css/properties/grid.zig | 4 ---- src/css/properties/list.zig | 2 -- src/css/properties/margin_padding.zig | 2 -- src/css/properties/masking.zig | 1 - src/css/properties/outline.zig | 3 --- src/css/properties/overflow.zig | 3 --- src/css/properties/position.zig | 3 --- src/css/properties/prefix_handler.zig | 1 - src/css/properties/shape.zig | 5 ----- src/css/properties/size.zig | 2 -- src/css/properties/svg.zig | 3 --- src/css/properties/text.zig | 2 -- src/css/properties/transform.zig | 2 -- src/css/properties/transition.zig | 3 --- src/css/properties/ui.zig | 2 -- src/css/selectors/builder.zig | 1 - src/css/selectors/selector.zig | 1 - src/css/values/css_string.zig | 1 - src/deps/uws.zig | 1 - src/glob/match.zig | 1 - src/install/PackageManager/CommandLineArguments.zig | 1 - src/install/PackageManager/PackageManagerOptions.zig | 2 -- src/install/npm.zig | 1 - src/libarchive/libarchive.zig | 1 - src/napi/napi.zig | 1 - src/shell/builtin/basename.zig | 1 - src/shell/builtin/dirname.zig | 1 - src/shell/builtin/seq.zig | 1 - src/shell/builtin/yes.zig | 1 - src/string/StringBuilder.zig | 1 - src/valkey/valkey_protocol.zig | 1 - 63 files changed, 1 insertion(+), 95 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 3fbe5c5ccd..753e639934 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -45,7 +45,7 @@ jobs: - name: Zig Format run: | bun scripts/zig-remove-unreferenced-top-level-decls.ts src/ - zig fmt src/**.zig + zig fmt src - name: Commit uses: stefanzweifel/git-auto-commit-action@v5 with: diff --git a/src/bake/DevServer.zig b/src/bake/DevServer.zig index 25b86ca3a6..449bea124d 100644 --- a/src/bake/DevServer.zig +++ b/src/bake/DevServer.zig @@ -8496,7 +8496,6 @@ const BundleV2 = bun.bundle_v2.BundleV2; const Chunk = bun.bundle_v2.Chunk; const ContentHasher = bun.bundle_v2.ContentHasher; - const uws = bun.uws; const AnyWebSocket = uws.AnyWebSocket; const Request = uws.Request; diff --git a/src/bun.js/ModuleLoader.zig b/src/bun.js/ModuleLoader.zig index 972e139397..4df6cf1263 100644 --- a/src/bun.js/ModuleLoader.zig +++ b/src/bun.js/ModuleLoader.zig @@ -2632,7 +2632,6 @@ pub const FetchFlags = enum { } }; - pub const HardcodedModule = enum { bun, @"abort-controller", diff --git a/src/bun.js/bindings/CustomGetterSetter.zig b/src/bun.js/bindings/CustomGetterSetter.zig index c80edff51d..a93e22df42 100644 --- a/src/bun.js/bindings/CustomGetterSetter.zig +++ b/src/bun.js/bindings/CustomGetterSetter.zig @@ -1,4 +1,3 @@ - pub const CustomGetterSetter = opaque { pub fn isGetterNull(this: *CustomGetterSetter) bool { return JSC__CustomGetterSetter__isGetterNull(this); diff --git a/src/bun.js/bindings/ErrorCode.zig b/src/bun.js/bindings/ErrorCode.zig index f9057716f4..c37a28819b 100644 --- a/src/bun.js/bindings/ErrorCode.zig +++ b/src/bun.js/bindings/ErrorCode.zig @@ -1,4 +1,3 @@ - const ErrorCodeInt = u16; pub const ErrorCode = enum(ErrorCodeInt) { diff --git a/src/bun.js/bindings/GetterSetter.zig b/src/bun.js/bindings/GetterSetter.zig index 468aadd2f7..cd755bfd57 100644 --- a/src/bun.js/bindings/GetterSetter.zig +++ b/src/bun.js/bindings/GetterSetter.zig @@ -1,4 +1,3 @@ - pub const GetterSetter = opaque { pub fn isGetterNull(this: *GetterSetter) bool { return JSC__GetterSetter__isGetterNull(this); diff --git a/src/bun.js/bindings/JSPromiseRejectionOperation.zig b/src/bun.js/bindings/JSPromiseRejectionOperation.zig index 05498e2298..0bfa29eb5b 100644 --- a/src/bun.js/bindings/JSPromiseRejectionOperation.zig +++ b/src/bun.js/bindings/JSPromiseRejectionOperation.zig @@ -1,4 +1,3 @@ - pub const JSPromiseRejectionOperation = enum(u32) { Reject = 0, Handle = 1, diff --git a/src/bun.js/bindings/ScriptExecutionStatus.zig b/src/bun.js/bindings/ScriptExecutionStatus.zig index 918e7362d4..3d8f85bf1c 100644 --- a/src/bun.js/bindings/ScriptExecutionStatus.zig +++ b/src/bun.js/bindings/ScriptExecutionStatus.zig @@ -1,4 +1,3 @@ - pub const ScriptExecutionStatus = enum(i32) { running = 0, suspended = 1, diff --git a/src/bun.js/bindings/SourceType.zig b/src/bun.js/bindings/SourceType.zig index 87c05eda2e..6f033b564d 100644 --- a/src/bun.js/bindings/SourceType.zig +++ b/src/bun.js/bindings/SourceType.zig @@ -1,4 +1,3 @@ - // From SourceProvider.h pub const SourceType = enum(u8) { Program = 0, diff --git a/src/bun.js/jsc/host_fn.zig b/src/bun.js/jsc/host_fn.zig index 265bb27db6..a35f67363d 100644 --- a/src/bun.js/jsc/host_fn.zig +++ b/src/bun.js/jsc/host_fn.zig @@ -110,7 +110,6 @@ inline fn parseErrorSet(T: type, errors: []const std.builtin.Type.Error) ParsedH }; } - pub fn wrap1(comptime func: anytype) @"return": { const p = checkWrapParams(func, 1); break :@"return" fn (p[0].type.?) callconv(.c) JSValue; diff --git a/src/bun.js/node/node_assert.zig b/src/bun.js/node/node_assert.zig index 9c2e7f7998..067efb087d 100644 --- a/src/bun.js/node/node_assert.zig +++ b/src/bun.js/node/node_assert.zig @@ -8,7 +8,6 @@ const BunString = bun.String; const JSC = bun.JSC; const JSValue = JSC.JSValue; - /// Compare `actual` and `expected`, producing a diff that would turn `actual` /// into `expected`. /// diff --git a/src/bun.js/node/path.zig b/src/bun.js/node/path.zig index b992f56bee..ce2243e077 100644 --- a/src/bun.js/node/path.zig +++ b/src/bun.js/node/path.zig @@ -72,7 +72,6 @@ const CHAR_STR_BACKWARD_SLASH = "\\"; const CHAR_STR_FORWARD_SLASH = "/"; const CHAR_STR_DOT = "."; - /// Based on Node v21.6.1 path.parse: /// https://github.com/nodejs/node/blob/6ae20aa63de78294b18d5015481485b7cd8fbb60/lib/path.js#L919 /// The structs returned by parse methods. diff --git a/src/bun.js/node/path_watcher.zig b/src/bun.js/node/path_watcher.zig index f3cebdc447..6a0f33144a 100644 --- a/src/bun.js/node/path_watcher.zig +++ b/src/bun.js/node/path_watcher.zig @@ -13,7 +13,6 @@ const string = bun.string; const JSC = bun.JSC; const VirtualMachine = JSC.VirtualMachine; - var default_manager_mutex: Mutex = .{}; var default_manager: ?*PathWatcherManager = null; diff --git a/src/bun.js/test/expect.zig b/src/bun.js/test/expect.zig index 8e30845701..f204094879 100644 --- a/src/bun.js/test/expect.zig +++ b/src/bun.js/test/expect.zig @@ -38,7 +38,6 @@ pub var active_test_expectation_counter: Counter = .{}; pub var is_expecting_assertions: bool = false; pub var is_expecting_assertions_count: bool = false; - /// Helper to retrieve matcher flags from a jsvalue of a class like ExpectAny, ExpectStringMatching, etc. pub fn getMatcherFlags(comptime T: type, value: JSValue) Expect.Flags { if (T.flagsGetCached(value)) |flagsValue| { diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig index d039b32bdf..dfd721f058 100644 --- a/src/bun.js/test/jest.zig +++ b/src/bun.js/test/jest.zig @@ -7,7 +7,6 @@ const expect = @import("./expect.zig"); const Counter = expect.Counter; const Expect = expect.Expect; - const JSC = bun.JSC; const logger = bun.logger; diff --git a/src/bun.js/unbounded_queue.zig b/src/bun.js/unbounded_queue.zig index e46f742dd7..aa91725a64 100644 --- a/src/bun.js/unbounded_queue.zig +++ b/src/bun.js/unbounded_queue.zig @@ -7,7 +7,6 @@ const builtin = std.builtin; const assert = bun.assert; - pub const cache_line_length = switch (@import("builtin").target.cpu.arch) { .x86_64, .aarch64, .powerpc64 => 128, .arm, .mips, .mips64, .riscv64 => 32, diff --git a/src/bun.js/webcore/Response.zig b/src/bun.js/webcore/Response.zig index 69dd8b68cc..d2da8dae05 100644 --- a/src/bun.js/webcore/Response.zig +++ b/src/bun.js/webcore/Response.zig @@ -737,8 +737,6 @@ const ZigString = JSC.ZigString; const JSValue = JSC.JSValue; const JSGlobalObject = JSC.JSGlobalObject; - - const InternalBlob = JSC.WebCore.Blob.Internal; const BodyMixin = JSC.WebCore.Body.Mixin; const Body = JSC.WebCore.Body; diff --git a/src/bun.js/webcore/fetch.zig b/src/bun.js/webcore/fetch.zig index 84a1cebdd6..1383a8eaaf 100644 --- a/src/bun.js/webcore/fetch.zig +++ b/src/bun.js/webcore/fetch.zig @@ -1,4 +1,3 @@ - const JSType = JSC.C.JSType; pub const fetch_error_no_args = "fetch() expects a string but received no arguments."; diff --git a/src/cli/build_command.zig b/src/cli/build_command.zig index 55f14d8c4c..225f50af0a 100644 --- a/src/cli/build_command.zig +++ b/src/cli/build_command.zig @@ -7,13 +7,11 @@ const Global = bun.Global; const strings = bun.strings; const default_allocator = bun.default_allocator; - const options = @import("../options.zig"); const resolve_path = @import("../resolver/resolve_path.zig"); const transpiler = bun.transpiler; - const fs = @import("../fs.zig"); const BundleV2 = @import("../bundler/bundle_v2.zig").BundleV2; diff --git a/src/cli/filter_arg.zig b/src/cli/filter_arg.zig index 2f84e8b783..3c85fe500e 100644 --- a/src/cli/filter_arg.zig +++ b/src/cli/filter_arg.zig @@ -7,7 +7,6 @@ const strings = bun.strings; const JSON = bun.JSON; const Glob = @import("../glob.zig"); - const SKIP_LIST = .{ // skip hidden directories ".", diff --git a/src/cli/install_completions_command.zig b/src/cli/install_completions_command.zig index 0c6d8b9041..88053def0b 100644 --- a/src/cli/install_completions_command.zig +++ b/src/cli/install_completions_command.zig @@ -7,8 +7,6 @@ const strings = bun.strings; const std = @import("std"); - - const resolve_path = @import("../resolver/resolve_path.zig"); const fs = @import("../fs.zig"); diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index bc3fdecf2b..4ff919dbe3 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -37,8 +37,6 @@ const yarn_commands = @import("./list-of-yarn-commands.zig").all_yarn_commands; const ShellCompletions = @import("./shell_completions.zig"); - - const windows = std.os.windows; pub const RunCommand = struct { diff --git a/src/cli/test_command.zig b/src/cli/test_command.zig index 484d366a1e..9896d18894 100644 --- a/src/cli/test_command.zig +++ b/src/cli/test_command.zig @@ -9,7 +9,6 @@ const default_allocator = bun.default_allocator; const std = @import("std"); - const FileSystem = @import("../fs.zig").FileSystem; const options = @import("../options.zig"); const js_ast = bun.JSAst; diff --git a/src/css/css_modules.zig b/src/css/css_modules.zig index 3428844633..806b197672 100644 --- a/src/css/css_modules.zig +++ b/src/css/css_modules.zig @@ -9,7 +9,6 @@ const PrintErr = css.PrintErr; const ArrayList = std.ArrayListUnmanaged; - pub const CssModule = struct { config: *const Config, sources: *const ArrayList([]const u8), diff --git a/src/css/dependencies.zig b/src/css/dependencies.zig index f95c60cb6d..9c0b561e8f 100644 --- a/src/css/dependencies.zig +++ b/src/css/dependencies.zig @@ -8,7 +8,6 @@ const Url = css_values.url.Url; pub const Error = css.Error; // const Location = css.Location; - /// Options for `analyze_dependencies` in `PrinterOptions`. pub const DependencyOptions = struct { /// Whether to remove `@import` rules. diff --git a/src/css/logical.zig b/src/css/logical.zig index 16ebc68462..eb54072ca5 100644 --- a/src/css/logical.zig +++ b/src/css/logical.zig @@ -1,8 +1,6 @@ - pub const css = @import("./css_parser.zig"); pub const Error = css.Error; - pub const PropertyCategory = enum { logical, physical, diff --git a/src/css/printer.zig b/src/css/printer.zig index ef843f40e7..6747f752ec 100644 --- a/src/css/printer.zig +++ b/src/css/printer.zig @@ -75,7 +75,6 @@ pub const Targets = css.targets.Targets; pub const Features = css.targets.Features; - pub const ImportInfo = struct { import_records: *const bun.BabyList(bun.ImportRecord), /// bundle_v2.graph.ast.items(.url_for_css) diff --git a/src/css/properties/contain.zig b/src/css/properties/contain.zig index 0f560edf1a..01715b0ade 100644 --- a/src/css/properties/contain.zig +++ b/src/css/properties/contain.zig @@ -1,11 +1,9 @@ - pub const css = @import("../css_parser.zig"); const SmallList = css.SmallList; const ContainerName = css.css_rules.container.ContainerName; - const ContainerIdent = ContainerName; /// A value for the [container-type](https://drafts.csswg.org/css-contain-3/#container-type) property. diff --git a/src/css/properties/css_modules.zig b/src/css/properties/css_modules.zig index fdf17ee6d1..04c07ce68f 100644 --- a/src/css/properties/css_modules.zig +++ b/src/css/properties/css_modules.zig @@ -7,7 +7,6 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - const CustomIdent = css.css_values.ident.CustomIdent; const CustomIdentList = css.css_values.ident.CustomIdentList; const CustomIdentFns = css.css_values.ident.CustomIdentFns; diff --git a/src/css/properties/display.zig b/src/css/properties/display.zig index f53ab6c0e1..5bfcdd9803 100644 --- a/src/css/properties/display.zig +++ b/src/css/properties/display.zig @@ -7,8 +7,6 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - - /// A value for the [display](https://drafts.csswg.org/css-display-3/#the-display-properties) property. pub const Display = union(enum) { /// A display keyword. diff --git a/src/css/properties/effects.zig b/src/css/properties/effects.zig index 30e3f3bc46..bd75fe7ab5 100644 --- a/src/css/properties/effects.zig +++ b/src/css/properties/effects.zig @@ -1,9 +1,7 @@ - pub const css = @import("../css_parser.zig"); const SmallList = css.SmallList; - const CssColor = css.css_values.color.CssColor; const Length = css.css_values.length.LengthValue; const NumberOrPercentage = css.css_values.percentage.NumberOrPercentage; diff --git a/src/css/properties/flex.zig b/src/css/properties/flex.zig index 7d291182a5..1aca5d02e4 100644 --- a/src/css/properties/flex.zig +++ b/src/css/properties/flex.zig @@ -10,7 +10,6 @@ const PrintErr = css.PrintErr; const Property = css.Property; const PropertyId = css.PropertyId; - const CSSNumberFns = css.css_values.number.CSSNumberFns; const LengthPercentage = css.css_values.length.LengthPercentage; const CSSNumber = css.css_values.number.CSSNumber; diff --git a/src/css/properties/grid.zig b/src/css/properties/grid.zig index 1d841b5601..121a72037b 100644 --- a/src/css/properties/grid.zig +++ b/src/css/properties/grid.zig @@ -8,8 +8,6 @@ const SmallList = css.SmallList; const Printer = css.Printer; const PrintErr = css.PrintErr; - - const CSSNumberFns = css.css_values.number.CSSNumberFns; const LengthPercentage = css.css_values.length.LengthPercentage; const CustomIdent = css.css_values.ident.CustomIdent; @@ -18,8 +16,6 @@ const CustomIdentList = css.css_values.ident.CustomIdentList; const CSSInteger = css.css_values.number.CSSInteger; const BabyList = bun.BabyList; - - /// A [track sizing](https://drafts.csswg.org/css-grid-2/#track-sizing) value /// for the `grid-template-rows` and `grid-template-columns` properties. pub const TrackSizing = union(enum) { diff --git a/src/css/properties/list.zig b/src/css/properties/list.zig index f8a793383f..528bb3b8f4 100644 --- a/src/css/properties/list.zig +++ b/src/css/properties/list.zig @@ -3,8 +3,6 @@ const ArrayList = std.ArrayListUnmanaged; pub const css = @import("../css_parser.zig"); - - const CustomIdent = css.css_values.ident.CustomIdent; const CSSString = css.css_values.string.CSSString; const Image = css.css_values.image.Image; diff --git a/src/css/properties/margin_padding.zig b/src/css/properties/margin_padding.zig index 5917026b65..e42d58254d 100644 --- a/src/css/properties/margin_padding.zig +++ b/src/css/properties/margin_padding.zig @@ -7,8 +7,6 @@ const Property = css.Property; const PropertyIdTag = css.PropertyIdTag; const PropertyCategory = css.logical.PropertyCategory; - - const LengthPercentageOrAuto = css.css_values.length.LengthPercentageOrAuto; /// A value for the [inset](https://drafts.csswg.org/css-logical/#propdef-inset) shorthand property. diff --git a/src/css/properties/masking.zig b/src/css/properties/masking.zig index 38138eb8e6..3af738b529 100644 --- a/src/css/properties/masking.zig +++ b/src/css/properties/masking.zig @@ -7,7 +7,6 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - const LengthPercentage = css.css_values.length.LengthPercentage; const Image = css.css_values.image.Image; const Rect = css.css_values.rect.Rect; diff --git a/src/css/properties/outline.zig b/src/css/properties/outline.zig index 4d8330755b..5f22a092ee 100644 --- a/src/css/properties/outline.zig +++ b/src/css/properties/outline.zig @@ -3,9 +3,6 @@ const Allocator = std.mem.Allocator; pub const css = @import("../css_parser.zig"); - - - const GenericBorder = css.css_properties.border.GenericBorder; const LineStyle = css.css_properties.border.LineStyle; diff --git a/src/css/properties/overflow.zig b/src/css/properties/overflow.zig index 3b819890a2..57e4a35ed4 100644 --- a/src/css/properties/overflow.zig +++ b/src/css/properties/overflow.zig @@ -6,9 +6,6 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - - - /// A value for the [overflow](https://www.w3.org/TR/css-overflow-3/#overflow-properties) shorthand property. pub const Overflow = struct { /// A value for the [overflow](https://www.w3.org/TR/css-overflow-3/#overflow-properties) shorthand property. diff --git a/src/css/properties/position.zig b/src/css/properties/position.zig index b991dc71d2..64b9aac75e 100644 --- a/src/css/properties/position.zig +++ b/src/css/properties/position.zig @@ -7,9 +7,6 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - - - /// A value for the [position](https://www.w3.org/TR/css-position-3/#position-property) property. pub const Position = union(enum) { /// The box is laid in the document flow. diff --git a/src/css/properties/prefix_handler.zig b/src/css/properties/prefix_handler.zig index a18cade655..772164846d 100644 --- a/src/css/properties/prefix_handler.zig +++ b/src/css/properties/prefix_handler.zig @@ -3,7 +3,6 @@ const bun = @import("bun"); pub const css = @import("../css_parser.zig"); - const VendorPrefix = css.VendorPrefix; const PropertyIdTag = css.PropertyIdTag; diff --git a/src/css/properties/shape.zig b/src/css/properties/shape.zig index 257483a367..e36e7d5cd6 100644 --- a/src/css/properties/shape.zig +++ b/src/css/properties/shape.zig @@ -1,10 +1,5 @@ - pub const css = @import("../css_parser.zig"); - - - - /// A [``](https://www.w3.org/TR/css-shapes-1/#typedef-fill-rule) used to /// determine the interior of a `polygon()` shape. /// diff --git a/src/css/properties/size.zig b/src/css/properties/size.zig index 0055cfc5b3..12681a12f5 100644 --- a/src/css/properties/size.zig +++ b/src/css/properties/size.zig @@ -14,11 +14,9 @@ const UnparsedProperty = css.css_properties.custom.UnparsedProperty; const PropertyCategory = css.logical.PropertyCategory; - const LengthPercentage = css.css_values.length.LengthPercentage; const Ratio = css.css_values.ratio.Ratio; - pub const BoxSizing = enum { /// Exclude the margin/border/padding from the width and height. @"content-box", diff --git a/src/css/properties/svg.zig b/src/css/properties/svg.zig index 9c0e97a997..9c6e356146 100644 --- a/src/css/properties/svg.zig +++ b/src/css/properties/svg.zig @@ -3,13 +3,10 @@ const ArrayList = std.ArrayListUnmanaged; pub const css = @import("../css_parser.zig"); - - const LengthPercentage = css.css_values.length.LengthPercentage; const CssColor = css.css_values.color.CssColor; const Url = css.css_values.url.Url; - /// An SVG [``](https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint) value /// used in the `fill` and `stroke` properties. const SVGPaint = union(enum) { diff --git a/src/css/properties/text.zig b/src/css/properties/text.zig index ba9ce7a188..d16d6a0162 100644 --- a/src/css/properties/text.zig +++ b/src/css/properties/text.zig @@ -6,13 +6,11 @@ pub const css = @import("../css_parser.zig"); const Printer = css.Printer; const PrintErr = css.PrintErr; - const LengthPercentage = css.css_values.length.LengthPercentage; const CssColor = css.css_values.color.CssColor; const Length = css.css_values.length.LengthValue; const Percentage = css.css_values.percentage.Percentage; - /// A value for the [text-transform](https://www.w3.org/TR/2021/CRD-css-text-3-20210422/#text-transform-property) property. pub const TextTransform = struct { /// How case should be transformed. diff --git a/src/css/properties/transform.zig b/src/css/properties/transform.zig index 5f70a3420f..81f14896fb 100644 --- a/src/css/properties/transform.zig +++ b/src/css/properties/transform.zig @@ -11,13 +11,11 @@ const Result = css.Result; const VendorPrefix = css.VendorPrefix; const Property = css.css_properties.Property; - const LengthPercentage = css.css_values.length.LengthPercentage; const Length = css.css_values.length.LengthValue; const NumberOrPercentage = css.css_values.percentage.NumberOrPercentage; const Angle = css.css_values.angle.Angle; - /// A value for the [transform](https://www.w3.org/TR/2019/CR-css-transforms-1-20190214/#propdef-transform) property. pub const TransformList = struct { v: ArrayList(Transform), diff --git a/src/css/properties/transition.zig b/src/css/properties/transition.zig index 624a706c30..39cf2cc876 100644 --- a/src/css/properties/transition.zig +++ b/src/css/properties/transition.zig @@ -8,9 +8,6 @@ const SmallList = css.SmallList; const Printer = css.Printer; const PrintErr = css.PrintErr; - - - const Property = css.css_properties.Property; const PropertyId = css.css_properties.PropertyId; const Time = css.css_values.time.Time; diff --git a/src/css/properties/ui.zig b/src/css/properties/ui.zig index 605f6a8b66..78c7df200e 100644 --- a/src/css/properties/ui.zig +++ b/src/css/properties/ui.zig @@ -9,13 +9,11 @@ const SmallList = css.SmallList; const Printer = css.Printer; const PrintErr = css.PrintErr; - const CSSNumber = css.css_values.number.CSSNumber; const DashedIdent = css.css_values.ident.DashedIdent; const CssColor = css.css_values.color.CssColor; const Url = css.css_values.url.Url; - /// A value for the [color-scheme](https://drafts.csswg.org/css-color-adjust/#color-scheme-prop) property. pub const ColorScheme = packed struct(u8) { /// Indicates that the element supports a light color scheme. diff --git a/src/css/selectors/builder.zig b/src/css/selectors/builder.zig index 4d6d1de956..54b08f7083 100644 --- a/src/css/selectors/builder.zig +++ b/src/css/selectors/builder.zig @@ -25,7 +25,6 @@ pub const css = @import("../css_parser.zig"); pub const Printer = css.Printer; pub const PrintErr = css.PrintErr; - const ArrayList = std.ArrayListUnmanaged; const parser = css.selector.parser; diff --git a/src/css/selectors/selector.zig b/src/css/selectors/selector.zig index af0c76ac8c..725be5fe1a 100644 --- a/src/css/selectors/selector.zig +++ b/src/css/selectors/selector.zig @@ -10,7 +10,6 @@ const CSSStringFns = css.CSSStringFns; pub const Printer = css.Printer; pub const PrintErr = css.PrintErr; - const ArrayList = std.ArrayListUnmanaged; pub const Selector = parser.Selector; diff --git a/src/css/values/css_string.zig b/src/css/values/css_string.zig index 0947bf392e..1b1d4119f0 100644 --- a/src/css/values/css_string.zig +++ b/src/css/values/css_string.zig @@ -1,4 +1,3 @@ - pub const css = @import("../css_parser.zig"); pub const Result = css.Result; pub const Printer = css.Printer; diff --git a/src/deps/uws.zig b/src/deps/uws.zig index 5641fde80e..065066c308 100644 --- a/src/deps/uws.zig +++ b/src/deps/uws.zig @@ -3497,7 +3497,6 @@ pub fn NewApp(comptime ssl: bool) type { user_data: UserDataType, comptime handler: (fn (UserDataType, *Request, *Response) void), ) void { - uws_app_any(ssl_flag, @as(*uws_app_t, @ptrCast(app)), pattern.ptr, pattern.len, RouteHandler(UserDataType, handler).handle, if (UserDataType == void) null else user_data); } pub fn domain(app: *ThisApp, pattern: [:0]const u8) void { diff --git a/src/glob/match.zig b/src/glob/match.zig index 869a77d6fb..95f4817d23 100644 --- a/src/glob/match.zig +++ b/src/glob/match.zig @@ -32,7 +32,6 @@ const Allocator = std.mem.Allocator; /// One such stack buffer is created recursively for each pair of braces /// therefore this value should be tuned to use a sane amount of memory even at the highest allowed brace depth /// and for arbitrarily many non-nested braces (i.e. `{a,b}{c,d}`) while reducing the number of allocations. - const Brace = struct { open_brace_idx: u32, branch_idx: u32, diff --git a/src/install/PackageManager/CommandLineArguments.zig b/src/install/PackageManager/CommandLineArguments.zig index 686345193b..22643c51ac 100644 --- a/src/install/PackageManager/CommandLineArguments.zig +++ b/src/install/PackageManager/CommandLineArguments.zig @@ -793,7 +793,6 @@ const Path = bun.path; const URL = bun.URL; - const clap = bun.clap; const PackageManagerCommand = @import("../../cli/package_manager_command.zig").PackageManagerCommand; diff --git a/src/install/PackageManager/PackageManagerOptions.zig b/src/install/PackageManager/PackageManagerOptions.zig index cedc0ae273..765d75cb47 100644 --- a/src/install/PackageManager/PackageManagerOptions.zig +++ b/src/install/PackageManager/PackageManagerOptions.zig @@ -637,7 +637,6 @@ const logger = bun.logger; const OOM = bun.OOM; const FD = bun.FD; - const Api = bun.Schema.Api; const Path = bun.path; @@ -646,7 +645,6 @@ const URL = bun.URL; const HTTP = bun.http; const AsyncHTTP = HTTP.AsyncHTTP; - const Npm = bun.install.Npm; const patch = bun.install.patch; diff --git a/src/install/npm.zig b/src/install/npm.zig index 1e2a7f105c..0b2adecb71 100644 --- a/src/install/npm.zig +++ b/src/install/npm.zig @@ -2450,4 +2450,3 @@ pub const PackageManifest = struct { return result; } }; - diff --git a/src/libarchive/libarchive.zig b/src/libarchive/libarchive.zig index f4e0ba241e..fe81b750a8 100644 --- a/src/libarchive/libarchive.zig +++ b/src/libarchive/libarchive.zig @@ -183,7 +183,6 @@ pub const BufferReadStream = struct { // } }; - pub const Archiver = struct { // impl: *lib.archive = undefined, // buf: []const u8 = undefined, diff --git a/src/napi/napi.zig b/src/napi/napi.zig index 65a4acd491..e20f0a68e2 100644 --- a/src/napi/napi.zig +++ b/src/napi/napi.zig @@ -4,7 +4,6 @@ const bun = @import("bun"); const JSValue = JSC.JSValue; const TODO_EXCEPTION: JSC.C.ExceptionRef = null; - const log = bun.Output.scoped(.napi, false); const Async = bun.Async; diff --git a/src/shell/builtin/basename.zig b/src/shell/builtin/basename.zig index 040b2ab1d5..1e04d32fee 100644 --- a/src/shell/builtin/basename.zig +++ b/src/shell/builtin/basename.zig @@ -74,4 +74,3 @@ const Builtin = Interpreter.Builtin; const JSC = bun.JSC; const Maybe = bun.sys.Maybe; const std = @import("std"); - diff --git a/src/shell/builtin/dirname.zig b/src/shell/builtin/dirname.zig index 2f9acf677a..64ad7faf10 100644 --- a/src/shell/builtin/dirname.zig +++ b/src/shell/builtin/dirname.zig @@ -75,4 +75,3 @@ const Builtin = Interpreter.Builtin; const JSC = bun.JSC; const Maybe = bun.sys.Maybe; const std = @import("std"); - diff --git a/src/shell/builtin/seq.zig b/src/shell/builtin/seq.zig index 898b1b2602..ac8e9cf605 100644 --- a/src/shell/builtin/seq.zig +++ b/src/shell/builtin/seq.zig @@ -146,4 +146,3 @@ const Builtin = Interpreter.Builtin; const JSC = bun.JSC; const Maybe = bun.sys.Maybe; const std = @import("std"); - diff --git a/src/shell/builtin/yes.zig b/src/shell/builtin/yes.zig index ee74708b02..6ddcedc7cd 100644 --- a/src/shell/builtin/yes.zig +++ b/src/shell/builtin/yes.zig @@ -94,4 +94,3 @@ const Yes = @This(); const JSC = bun.JSC; const Maybe = bun.sys.Maybe; const std = @import("std"); - diff --git a/src/string/StringBuilder.zig b/src/string/StringBuilder.zig index faa2e6d659..803fdcd4ef 100644 --- a/src/string/StringBuilder.zig +++ b/src/string/StringBuilder.zig @@ -5,7 +5,6 @@ const Allocator = std.mem.Allocator; const Environment = bun.Environment; const assert = bun.assert; - len: usize = 0, cap: usize = 0, ptr: ?[*]u8 = null, diff --git a/src/valkey/valkey_protocol.zig b/src/valkey/valkey_protocol.zig index 8f73e9be1c..73a92780e9 100644 --- a/src/valkey/valkey_protocol.zig +++ b/src/valkey/valkey_protocol.zig @@ -4,7 +4,6 @@ const bun = @import("bun"); const JSC = bun.JSC; const String = bun.String; - pub const RedisError = error{ AuthenticationFailed, ConnectionClosed,