diff options
author | 2022-01-02 03:09:51 -0800 | |
---|---|---|
committer | 2022-01-02 03:09:51 -0800 | |
commit | 7f3384600550c65d38f6855e0fc8d919a624b31e (patch) | |
tree | f00549eb7469b3856f3ac6a296df808c8915f0fd /src | |
parent | 4afda10b82af917fb93284e24ea41d103310f245 (diff) | |
download | bun-7f3384600550c65d38f6855e0fc8d919a624b31e.tar.gz bun-7f3384600550c65d38f6855e0fc8d919a624b31e.tar.zst bun-7f3384600550c65d38f6855e0fc8d919a624b31e.zip |
copy: replace Bun with bun (#99)
Most CLI tools have the style convention of referring to themselves in
lowercase. It is, after all, the name that users type in when using
the tool. This PR maintains that convention in bun.
"Drop the uppercase B, it's cleaner"
Diffstat (limited to 'src')
-rw-r--r-- | src/analytics/analytics_thread.zig | 2 | ||||
-rw-r--r-- | src/bundler.zig | 4 | ||||
-rw-r--r-- | src/cli.zig | 12 | ||||
-rw-r--r-- | src/cli/create_command.zig | 8 | ||||
-rw-r--r-- | src/cli/install.sh | 18 | ||||
-rw-r--r-- | src/cli/install_completions_command.zig | 4 | ||||
-rw-r--r-- | src/cli/run_command.zig | 2 | ||||
-rw-r--r-- | src/cli/upgrade_command.zig | 24 | ||||
-rw-r--r-- | src/css_scanner.zig | 2 | ||||
-rw-r--r-- | src/global.zig | 2 | ||||
-rw-r--r-- | src/http.zig | 16 | ||||
-rw-r--r-- | src/http_client_async.zig | 2 | ||||
-rw-r--r-- | src/install/install.zig | 8 | ||||
-rw-r--r-- | src/install/resolution.zig | 2 | ||||
-rw-r--r-- | src/javascript/jsc/bindings/exports.zig | 4 | ||||
-rw-r--r-- | src/javascript/jsc/typescript.zig | 4 | ||||
-rw-r--r-- | src/js_ast.zig | 2 | ||||
-rw-r--r-- | src/js_printer.zig | 2 | ||||
-rw-r--r-- | src/options.zig | 2 | ||||
-rw-r--r-- | src/panic_handler.zig | 6 | ||||
-rw-r--r-- | src/runtime.footer.js | 2 |
21 files changed, 64 insertions, 64 deletions
diff --git a/src/analytics/analytics_thread.zig b/src/analytics/analytics_thread.zig index 9c8bae45a..d453e6992 100644 --- a/src/analytics/analytics_thread.zig +++ b/src/analytics/analytics_thread.zig @@ -29,7 +29,7 @@ fn NewUint64(val: u64) Analytics.Uint64 { }; } -// This answers, "What parts of Bun are people actually using?" +// This answers, "What parts of bun are people actually using?" pub const Features = struct { pub var single_page_app_routing = false; pub var tsconfig_paths = false; diff --git a/src/bundler.zig b/src/bundler.zig index 068d8cd2b..a8f8a23ca 100644 --- a/src/bundler.zig +++ b/src/bundler.zig @@ -97,7 +97,7 @@ const Resolver = _resolver.Resolver; // - on macOS, ensure it does an APFS shallow clone so that doesn't use disk space (only possible if file doesn't already exist) // fclonefile // IF serving via HTTP AND it's a file-like loader: -// 4. Use os.sendfile so copying/reading the file happens in the kernel instead of in Bun. +// 4. Use os.sendfile so copying/reading the file happens in the kernel instead of in bun. // This unfortunately means content hashing for HTTP server is unsupported, but metadata etags work // For each imported file, GOTO 1. @@ -710,7 +710,7 @@ pub const Bundler = struct { } } - // The Bun Bundle Format + // The bun Bundle Format // All the node_modules your app uses in a single compact file with metadata // A binary JavaScript bundle format prioritizing generation time and deserialization time pub const magic_bytes = "#!/usr/bin/env bun\n\n"; diff --git a/src/cli.zig b/src/cli.zig index a7406a412..fe03de014 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -161,7 +161,7 @@ pub const Arguments = struct { clap.parseParam("-i, --inject <STR>... Inject module at the top of every file") catch unreachable, clap.parseParam("-l, --loader <STR>... Parse files with .ext:loader, e.g. --loader .js:jsx. Valid loaders: jsx, js, json, tsx, ts, css") catch unreachable, clap.parseParam("-u, --origin <STR> Rewrite import URLs to start with --origin. Default: \"\"") catch unreachable, - clap.parseParam("-p, --port <STR> Port to serve Bun's dev server on. Default: \"3000\"") catch unreachable, + clap.parseParam("-p, --port <STR> Port to serve bun's dev server on. Default: \"3000\"") catch unreachable, clap.parseParam("--silent Don't repeat the command for bun run") catch unreachable, clap.parseParam("<POS>... ") catch unreachable, }; @@ -169,7 +169,7 @@ pub const Arguments = struct { const debug_params = [_]ParamType{ clap.parseParam("--dump-environment-variables Dump environment variables from .env and process as JSON and quit. Useful for debugging") catch unreachable, clap.parseParam("--dump-limits Dump system limits. Useful for debugging") catch unreachable, - clap.parseParam("--disable-bun.js Disable Bun.js from loading in the dev server") catch unreachable, + clap.parseParam("--disable-bun.js Disable bun.js from loading in the dev server") catch unreachable, }; const params = public_params ++ debug_params; @@ -488,7 +488,7 @@ pub const HelpCommand = struct { pub fn printWithReason(comptime reason: Reason) void { const fmt = - \\> <r> <b><green>dev <r><d> ./a.ts ./b.jsx<r> Start a Bun Dev Server + \\> <r> <b><green>dev <r><d> ./a.ts ./b.jsx<r> Start a bun Dev Server \\> <r> <b><magenta>bun <r><d> ./a.ts ./b.jsx<r> Bundle dependencies of input files into a <r><magenta>.bun<r> \\ \\> <r> <b><cyan>create <r><d>next ./app<r> Start a new project from a template <d>(bun c)<r> @@ -497,9 +497,9 @@ pub const HelpCommand = struct { \\> <r> <b><blue>add <r><d> {s:<16}<r> Add a dependency to package.json <d>(bun a)<r> \\> <r> remove <r><d> {s:<16}<r> Remove a dependency from package.json <d>(bun rm)<r> \\ - \\> <r> <b><blue>upgrade <r> Get the latest version of Bun + \\> <r> <b><blue>upgrade <r> Get the latest version of bun \\> <r> <b><d>completions<r> Install shell completions for tab-completion - \\> <r> <b><d>discord <r> Open Bun's Discord server + \\> <r> <b><d>discord <r> Open bun's Discord server \\> <r> <b><d>help <r> Print this help menu \\ ; @@ -515,7 +515,7 @@ pub const HelpCommand = struct { switch (reason) { .explicit => Output.pretty( - "<r><b><magenta>Bun<r>: a fast bundler, transpiler, JavaScript Runtime and package manager for web software.\n\n" ++ fmt, + "<r><b><magenta>bun<r>: a fast bundler, transpiler, JavaScript Runtime and package manager for web software.\n\n" ++ fmt, args, ), .invalid_command => Output.prettyError( diff --git a/src/cli/create_command.zig b/src/cli/create_command.zig index a7d4a644c..aea498a5b 100644 --- a/src/cli/create_command.zig +++ b/src/cli/create_command.zig @@ -86,7 +86,7 @@ const UnsupportedPackages = struct { pub fn print(this: UnsupportedPackages) void { inline for (comptime std.meta.fieldNames(UnsupportedPackages)) |field_name| { if (@field(this, field_name)) { - Output.prettyErrorln("<r><yellow>warn<r><d>:<r> <b>\"{s}\"<r> won't work in Bun yet\n", .{field_name}); + Output.prettyErrorln("<r><yellow>warn<r><d>:<r> <b>\"{s}\"<r> won't work in bun yet\n", .{field_name}); } } } @@ -434,7 +434,7 @@ pub const CreateCommand = struct { node.end(); progress.refresh(); - Output.prettyError("\n<r><red>error:<r> GitHub returned 403. This usually means GitHub is rate limiting your requests.\nTo fix this, either:<r> <b>A) pass a <r><cyan>GITHUB_ACCESS_TOKEN<r> environment variable to Bun<r>\n <b>B)Wait a little and try again<r>\n", .{}); + Output.prettyError("\n<r><red>error:<r> GitHub returned 403. This usually means GitHub is rate limiting your requests.\nTo fix this, either:<r> <b>A) pass a <r><cyan>GITHUB_ACCESS_TOKEN<r> environment variable to bun<r>\n <b>B)Wait a little and try again<r>\n", .{}); Global.crash(); }, @@ -1548,7 +1548,7 @@ pub const CreateCommand = struct { Output.pretty( \\ - \\<d>Come hang out in Bun's Discord: https://bun.sh/discord<r> + \\<d>Come hang out in bun's Discord: https://bun.sh/discord<r> \\ , .{}); @@ -2118,7 +2118,7 @@ pub const CreateListExamplesCommand = struct { const examples = try Example.fetchAllLocalAndRemote(ctx, node, &env_loader, filesystem); Output.printStartEnd(time, std.time.nanoTimestamp()); Output.prettyln(" <d>Fetched manifest<r>", .{}); - Output.prettyln("Welcome to Bun! Create a new project by pasting any of the following:\n\n", .{}); + Output.prettyln("Welcome to bun! Create a new project by pasting any of the following:\n\n", .{}); Output.flush(); Example.print(examples.items, null); diff --git a/src/cli/install.sh b/src/cli/install.sh index 1c47cde79..80a39d424 100644 --- a/src/cli/install.sh +++ b/src/cli/install.sh @@ -30,12 +30,12 @@ if test -t 1; then fi if ! command -v unzip >/dev/null; then - echo -e "\n${Red}error${Color_Off}: unzip is required to install Bun (see: https://github.com/Jarred-Sumner/bun#unzip-is-required)." 1>&2 + echo -e "\n${Red}error${Color_Off}: unzip is required to install bun (see: https://github.com/Jarred-Sumner/bun#unzip-is-required)." 1>&2 exit 1 fi if [ "$OS" = "Windows_NT" ]; then - echo "error: Please install Bun using Windows Subsystem for Linux." + echo "error: Please install bun using Windows Subsystem for Linux." exit 1 else case $(uname -sm) in @@ -53,7 +53,7 @@ if [ "$target" = "darwin-x64" ]; then sysctl sysctl.proc_translated >/dev/null 2>&1 if [ $? -eq 0 ]; then target="darwin-aarch64" - echo -e "$Dim Your shell is running in Rosetta 2. Downloading Bun for $target instead. $Color_Off" + echo -e "$Dim Your shell is running in Rosetta 2. Downloading bun for $target instead. $Color_Off" fi fi @@ -81,17 +81,17 @@ fi curl --fail --location --progress-bar --output "$exe.zip" "$bun_uri" if (($?)); then - echo -e "${Red}error${Color_Off}: Failed to download Bun from $bun_uri" 1>&2 + echo -e "${Red}error${Color_Off}: Failed to download bun from $bun_uri" 1>&2 exit 1 fi unzip -d "$bin_dir" -q -o "$exe.zip" if (($?)); then - echo -e "${Red}error${Color_Off}: Failed to extract Bun" 1>&2 + echo -e "${Red}error${Color_Off}: Failed to extract bun" 1>&2 exit 1 fi mv "$bin_dir/bun-${target}/bun" "$exe" if (($?)); then - echo -e "${Red}error${Color_Off}: Failed to extract Bun" 1>&2 + echo -e "${Red}error${Color_Off}: Failed to extract bun" 1>&2 exit 1 fi chmod +x "$exe" @@ -102,7 +102,7 @@ fi rmdir $bin_dir/bun-${target} rm "$exe.zip" -echo -e "${Green}Bun was installed successfully to ${BGreen}$exe$Color_Off" +echo -e "${Green}bun was installed successfully to ${BGreen}$exe$Color_Off" if command -v bun --version >/dev/null; then # Install completions, but we don't care if it fails @@ -116,7 +116,7 @@ if test $(basename $SHELL) == "fish"; then # Install completions, but we don't care if it fails IS_BUN_AUTO_UPDATE="true" SHELL="fish" $exe completions >/dev/null 2>&1 if test -f $HOME/.config/fish/config.fish; then - echo -e "\n# Bun\nset -Ux BUN_INSTALL \"$bun_install\"" >>"$HOME/.config/fish/config.fish" + echo -e "\n# bun\nset -Ux BUN_INSTALL \"$bun_install\"" >>"$HOME/.config/fish/config.fish" echo -e "set -px --path PATH \"$bin_dir\"\n" >>"$HOME/.config/fish/config.fish" echo "" echo -e "$Dim Added \"$bin_dir\" to \$PATH in \"\~/.config/fish/config.fish\"$Color_Off" @@ -141,7 +141,7 @@ then IS_BUN_AUTO_UPDATE="true" SHELL="zsh" $exe completions >/dev/null 2>&1 if test -f $HOME/.zshrc; then - echo -e "\n# Bun\nexport BUN_INSTALL=\"$bun_install\"" >>"$HOME/.zshrc" + echo -e "\n# bun\nexport BUN_INSTALL=\"$bun_install\"" >>"$HOME/.zshrc" echo -e "export PATH=\"\$BUN_INSTALL/bin:\$PATH\"" >>"$HOME/.zshrc" echo "" echo -e "$Dim Added \"$bin_dir\" to \$PATH in \"~/.zshrc\"$Color_Off" diff --git a/src/cli/install_completions_command.zig b/src/cli/install_completions_command.zig index 80511eca9..d6941abd0 100644 --- a/src/cli/install_completions_command.zig +++ b/src/cli/install_completions_command.zig @@ -356,14 +356,14 @@ pub const InstallCompletionsCommand = struct { // We need to add it to the end of the file var remaining = buf[read..]; - var extra = std.fmt.bufPrint(remaining, "\n# Bun completions\n[ -s \"{s}\" ] && source \"{s}\"\n", .{ + var extra = std.fmt.bufPrint(remaining, "\n# bun completions\n[ -s \"{s}\" ] && source \"{s}\"\n", .{ completions_path, completions_path, }) catch unreachable; dot_zshrc.pwriteAll(extra, read) catch break :brk true; - Output.prettyErrorln("<r><d>Enabled loading Bun's completions in .zshrc<r>", .{}); + Output.prettyErrorln("<r><d>Enabled loading bun's completions in .zshrc<r>", .{}); break :brk false; }; diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index 2f33e872f..004f5ec66 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -645,7 +645,7 @@ pub const RunCommand = struct { return true; - // If we get here, then we run it with Bun.js + // If we get here, then we run it with bun.js } } diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index b22b8b1a1..9ef6df860 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -96,7 +96,7 @@ pub const UpgradeCheckerThread = struct { if (!version.isCurrent()) { if (version.name()) |name| { - Output.prettyErrorln("\n<r><d>Bun v{s} is out. Run <b><cyan>bun upgrade<r> to upgrade.\n", .{name}); + Output.prettyErrorln("\n<r><d>bun v{s} is out. Run <b><cyan>bun upgrade<r> to upgrade.\n", .{name}); Output.flush(); } } @@ -312,7 +312,7 @@ pub const UpgradeCommand = struct { progress.end(); refresher.refresh(); if (version.name()) |name| { - Output.prettyErrorln("Bun v{s} is out, but not for this platform ({s}) yet.", .{ + Output.prettyErrorln("bun v{s} is out, but not for this platform ({s}) yet.", .{ name, Version.triplet, }); } @@ -361,7 +361,7 @@ pub const UpgradeCommand = struct { if (version.name() != null and version.isCurrent()) { Output.prettyErrorln( - "<r><green>Congrats!<r> You're already on the latest version of Bun <d>(which is v{s})<r>", + "<r><green>Congrats!<r> You're already on the latest version of bun <d>(which is v{s})<r>", .{ version.name().?, }, @@ -372,7 +372,7 @@ pub const UpgradeCommand = struct { if (version.name() == null) { Output.prettyErrorln( - "<r><red>error:<r> Bun versions are currently unavailable (the latest version name didn't match the expeccted format)", + "<r><red>error:<r> bun versions are currently unavailable (the latest version name didn't match the expeccted format)", .{}, ); Output.flush(); @@ -381,7 +381,7 @@ pub const UpgradeCommand = struct { } { - Output.prettyErrorln("<r><b>Bun <cyan>v{s}<r> is out<r>! You're on <blue>{s}<r>\n", .{ version.name().?, Global.package_json_version }); + Output.prettyErrorln("<r><b>bun <cyan>v{s}<r> is out<r>! You're on <blue>{s}<r>\n", .{ version.name().?, Global.package_json_version }); Output.flush(); var refresher = std.Progress{}; @@ -421,7 +421,7 @@ pub const UpgradeCommand = struct { refresher.refresh(); if (bytes.len == 0) { - Output.prettyErrorln("<r><red>error:<r> Failed to download the latest version of Bun. Received empty content", .{}); + Output.prettyErrorln("<r><red>error:<r> Failed to download the latest version of bun. Received empty content", .{}); Output.flush(); std.os.exit(1); } @@ -520,14 +520,14 @@ pub const UpgradeCommand = struct { .max_output_bytes = 128, }) catch |err| { save_dir_.deleteTree(version_name) catch {}; - Output.prettyErrorln("<r><red>error<r> Failed to verify Bun {s}<r>)", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error<r> Failed to verify bun {s}<r>)", .{@errorName(err)}); Output.flush(); std.os.exit(1); }; if (result.term.Exited != 0) { save_dir_.deleteTree(version_name) catch {}; - Output.prettyErrorln("<r><red>error<r> failed to verify Bun<r> (exit code: {d})", .{result.term.Exited}); + Output.prettyErrorln("<r><red>error<r> failed to verify bun<r> (exit code: {d})", .{result.term.Exited}); Output.flush(); std.os.exit(1); } @@ -536,7 +536,7 @@ pub const UpgradeCommand = struct { save_dir_.deleteTree(version_name) catch {}; Output.prettyErrorln( - "<r><red>error<r>: The downloaded version of Bun (<red>{s}<r>) doesn't match the expected version (<b>{s}<r>)<r>. Cancelled upgrade", + "<r><red>error<r>: The downloaded version of bun (<red>{s}<r>) doesn't match the expected version (<b>{s}<r>)<r>. Cancelled upgrade", .{ result.stdout[0..@minimum(result.stdout.len, 128)], version_name, @@ -558,7 +558,7 @@ pub const UpgradeCommand = struct { var target_dirname = current_executable_buf[0..target_dir_.len :0]; var target_dir = std.fs.openDirAbsoluteZ(target_dirname, .{ .iterate = true }) catch |err| { save_dir_.deleteTree(version_name) catch {}; - Output.prettyErrorln("<r><red>error:<r> Failed to open Bun's install directory {s}", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error:<r> Failed to open bun's install directory {s}", .{@errorName(err)}); Output.flush(); std.os.exit(1); }; @@ -566,7 +566,7 @@ pub const UpgradeCommand = struct { if (env_loader.map.get("BUN_DRY_RUN") == null) { C.moveFileZ(save_dir.fd, exe_subpath, target_dir.fd, target_filename) catch |err| { save_dir_.deleteTree(version_name) catch {}; - Output.prettyErrorln("<r><red>error:<r> Failed to move new version of Bun due to {s}. You could try the install script instead:\n curl -L https://bun.sh/install | bash", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error:<r> Failed to move new version of bun due to {s}. You could try the install script instead:\n curl -L https://bun.sh/install | bash", .{@errorName(err)}); Output.flush(); std.os.exit(1); }; @@ -592,7 +592,7 @@ pub const UpgradeCommand = struct { Output.printStartEnd(ctx.start_time, std.time.nanoTimestamp()); - Output.prettyErrorln("<r> Upgraded.\n\n<b><green>Welcome to Bun v{s}!<r>\n\n Report any bugs:\n https://github.com/Jarred-Sumner/bun/issues\n\n What's new:\n https://github.com/Jarred-Sumner/bun/releases/tag/{s}<r>", .{ version_name, version.tag }); + Output.prettyErrorln("<r> Upgraded.\n\n<b><green>Welcome to bun v{s}!<r>\n\n Report any bugs:\n https://github.com/Jarred-Sumner/bun/issues\n\n What's new:\n https://github.com/Jarred-Sumner/bun/releases/tag/{s}<r>", .{ version_name, version.tag }); Output.flush(); return; } diff --git a/src/css_scanner.zig b/src/css_scanner.zig index ca2c020d5..616a577e2 100644 --- a/src/css_scanner.zig +++ b/src/css_scanner.zig @@ -335,7 +335,7 @@ pub const Scanner = struct { scanner.source, logger.usize2Loc(start), scanner.allocator, - "To use Tailwind with Bun, use the Tailwind CLI and import the processed .css file.\nLearn more: https://tailwindcss.com/docs/installation#watching-for-changes", + "To use Tailwind with bun, use the Tailwind CLI and import the processed .css file.\nLearn more: https://tailwindcss.com/docs/installation#watching-for-changes", .{}, ) catch {}; } diff --git a/src/global.zig b/src/global.zig index e98166c53..d0f7da345 100644 --- a/src/global.zig +++ b/src/global.zig @@ -505,7 +505,7 @@ pub const Global = struct { } } - // Enabling huge pages slows down Bun by 8x or so + // Enabling huge pages slows down bun by 8x or so // Keeping this code for: // 1. documentation that an attempt was made // 2. if I want to configure allocator later diff --git a/src/http.zig b/src/http.zig index 34b5dea0a..75a65775d 100644 --- a/src/http.zig +++ b/src/http.zig @@ -1334,14 +1334,14 @@ pub const RequestContext = struct { if (vm.bundler.options.framework.?.display_name.len > 0) { Output.prettyError( - " {s} ready<d>! (powered by Bun)\n<r>", + " {s} ready<d>! (powered by bun)\n<r>", .{ vm.bundler.options.framework.?.display_name, }, ); } else { Output.prettyError( - " Bun.js started\n<r>", + " bun.js started\n<r>", .{}, ); } @@ -1359,7 +1359,7 @@ pub const RequestContext = struct { var module_map = JavaScript.ZigGlobalObject.getModuleRegistryMap(vm.global); if (!JavaScript.VM.isJITEnabled()) { - Output.prettyErrorln("<red><r>warn:<r> JIT is disabled,,,this is a bug in Bun and/or a permissions problem. JS will run slower.", .{}); + Output.prettyErrorln("<red><r>warn:<r> JIT is disabled,,,this is a bug in bun and/or a permissions problem. JS will run slower.", .{}); if (vm.bundler.env.map.get("BUN_CRASH_WITHOUT_JIT") != null) { Global.crash(); } @@ -2911,7 +2911,7 @@ pub const Server = struct { var random_number = std.rand.DefaultPrng.init(@intCast(u64, std.time.milliTimestamp())); const default_port = @intCast(u16, server.bundler.options.origin.getPort() orelse 3000); Output.prettyErrorln( - "<r><red>error<r>: Bun can't start because <b>port {d} is already in use<r>. Tried {d} - {d}. Try closing the other apps or manually passing Bun a port\n\n <r><cyan><b>bun --origin http://localhost:{d}/<r>\n", + "<r><red>error<r>: bun can't start because <b>port {d} is already in use<r>. Tried {d} - {d}. Try closing the other apps or manually passing bun a port\n\n <r><cyan><b>bun --origin http://localhost:{d}/<r>\n", .{ default_port, default_port, @@ -2940,7 +2940,7 @@ pub const Server = struct { if (std.mem.readIntNative(u32, &addr.ipv4.host.octets) == 0 or std.mem.readIntNative(u128, &addr.ipv6.host.octets) == 0) { if (server.bundler.options.routes.single_page_app_routing) { Output.prettyError( - " Bun!! <d>v{s}<r>\n\n\n Link:<r> <b><cyan>http://localhost:{d}<r>\n <d>./{s}/index.html<r> \n\n\n", + " bun!! <d>v{s}<r>\n\n\n Link:<r> <b><cyan>http://localhost:{d}<r>\n <d>./{s}/index.html<r> \n\n\n", .{ Global.package_json_version, addr.ipv4.port, @@ -2948,20 +2948,20 @@ pub const Server = struct { }, ); } else { - Output.prettyError(" Bun!! <d>v{s}<r>\n\n\n<d> Link:<r> <b><cyan>http://localhost:{d}<r>\n\n\n", .{ + Output.prettyError(" bun!! <d>v{s}<r>\n\n\n<d> Link:<r> <b><cyan>http://localhost:{d}<r>\n\n\n", .{ Global.package_json_version, addr.ipv4.port, }); } } else { if (server.bundler.options.routes.single_page_app_routing) { - Output.prettyError(" Bun!! <d>v{s}<r>\n\n\n<d> Link:<r> <b><cyan>http://{s}<r>\n <d>./{s}/index.html<r> \n\n\n", .{ + Output.prettyError(" bun!! <d>v{s}<r>\n\n\n<d> Link:<r> <b><cyan>http://{s}<r>\n <d>./{s}/index.html<r> \n\n\n", .{ Global.package_json_version, addr, resolve_path.relative(server.bundler.fs.top_level_dir, server.bundler.options.routes.static_dir), }); } else { - Output.prettyError(" Bun!! <d>v{s}\n\n\n<d> Link:<r> <b><cyan>http://{s}<r>\n\n\n", .{ + Output.prettyError(" bun!! <d>v{s}\n\n\n<d> Link:<r> <b><cyan>http://{s}<r>\n\n\n", .{ Global.package_json_version, addr, }); diff --git a/src/http_client_async.zig b/src/http_client_async.zig index bc9e3f2e1..65f45ccd0 100644 --- a/src/http_client_async.zig +++ b/src/http_client_async.zig @@ -176,7 +176,7 @@ else const accept_encoding_header_hash = hashHeaderName("Accept-Encoding"); -const user_agent_header = picohttp.Header{ .name = "User-Agent", .value = "Bun.js " ++ Global.package_json_version }; +const user_agent_header = picohttp.Header{ .name = "User-Agent", .value = "bun.js " ++ Global.package_json_version }; const user_agent_header_hash = hashHeaderName("User-Agent"); const location_header_hash = hashHeaderName("Location"); diff --git a/src/install/install.zig b/src/install/install.zig index 94ade6abd..e52a6646a 100644 --- a/src/install/install.zig +++ b/src/install/install.zig @@ -3694,7 +3694,7 @@ pub const PackageManager = struct { } return std.fs.cwd().makeOpenPath("node_modules/.cache", .{ .iterate = true }) catch |err| { - Output.prettyErrorln("<r><red>error<r>: Bun is unable to write files: {s}", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error<r>: bun is unable to write files: {s}", .{@errorName(err)}); Output.flush(); Global.crash(); }; @@ -3716,7 +3716,7 @@ pub const PackageManager = struct { var tempdir: std.fs.Dir = std.fs.cwd().makeOpenPath(default_tempdir, .{ .iterate = true }) catch brk: { tried_dot_tmp = true; break :brk cache_directory.makeOpenPath(".tmp", .{ .iterate = true }) catch |err| { - Output.prettyErrorln("<r><red>error<r>: Bun is unable to access tempdir: {s}", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error<r>: bun is unable to access tempdir: {s}", .{@errorName(err)}); Output.flush(); Global.crash(); }; @@ -3730,7 +3730,7 @@ pub const PackageManager = struct { tried_dot_tmp = true; tempdir = cache_directory.makeOpenPath(".tmp", .{ .iterate = true }) catch |err| { - Output.prettyErrorln("<r><red>error<r>: Bun is unable to access tempdir: {s}", .{@errorName(err)}); + Output.prettyErrorln("<r><red>error<r>: bun is unable to access tempdir: {s}", .{@errorName(err)}); Output.flush(); Global.crash(); }; @@ -3747,7 +3747,7 @@ pub const PackageManager = struct { if (!tried_dot_tmp) { tried_dot_tmp = true; tempdir = cache_directory.makeOpenPath(".tmp", .{ .iterate = true }) catch |err2| { - Output.prettyErrorln("<r><red>error<r>: Bun is unable to write files to tempdir: {s}", .{@errorName(err2)}); + Output.prettyErrorln("<r><red>error<r>: bun is unable to write files to tempdir: {s}", .{@errorName(err2)}); Output.flush(); Global.crash(); }; diff --git a/src/install/resolution.zig b/src/install/resolution.zig index 6a90048e5..ad9164c88 100644 --- a/src/install/resolution.zig +++ b/src/install/resolution.zig @@ -280,7 +280,7 @@ pub const Resolution = extern struct { // // There are many ways to do it, but perhaps one way to be maximally compatible is just removing the protocol part of the URL. // - // For example, Bun would transform this input: + // For example, bun would transform this input: // // import _ from "https://github.com/lodash/lodash/lodash.min.js"; // diff --git a/src/javascript/jsc/bindings/exports.zig b/src/javascript/jsc/bindings/exports.zig index 7491f9e0a..44cb79fc1 100644 --- a/src/javascript/jsc/bindings/exports.zig +++ b/src/javascript/jsc/bindings/exports.zig @@ -36,10 +36,10 @@ const Handler = struct { Output.Source.set(&source); if (Output.isEmojiEnabled()) { - Output.prettyErrorln("<r><red>Bun will crash now<r> ðŸ˜ðŸ˜ðŸ˜\n", .{}); + Output.prettyErrorln("<r><red>bun will crash now<r> ðŸ˜ðŸ˜ðŸ˜\n", .{}); Output.flush(); } else { - stderr.writeAll("Bun has crashed :'(\n") catch {}; + stderr.writeAll("bun has crashed :'(\n") catch {}; } std.mem.doNotOptimizeAway(source); diff --git a/src/javascript/jsc/typescript.zig b/src/javascript/jsc/typescript.zig index d2068254d..eabf36328 100644 --- a/src/javascript/jsc/typescript.zig +++ b/src/javascript/jsc/typescript.zig @@ -49,7 +49,7 @@ pub fn main() anyerror!void { var global_file = try dir.createFile("globals.d.ts", .{}); try global_file.writeAll( - \\// Bun.js v + \\// bun.js v \\ \\ ); @@ -57,7 +57,7 @@ pub fn main() anyerror!void { var module_file = try dir.createFile("modules.d.ts", .{}); try module_file.writeAll( - \\// Bun.js v + \\// bun.js v \\ \\ ); diff --git a/src/js_ast.zig b/src/js_ast.zig index 8f61537db..a3b5f31f6 100644 --- a/src/js_ast.zig +++ b/src/js_ast.zig @@ -5856,7 +5856,7 @@ pub const Macro = struct { return TagOrJSNode{ .invalid = .{} }; }, else => { - throwTypeError(writer.ctx, "Invalid Bun AST", writer.exception); + throwTypeError(writer.ctx, "Invalid bun AST", writer.exception); return TagOrJSNode{ .invalid = .{} }; }, } diff --git a/src/js_printer.zig b/src/js_printer.zig index e6b227918..d88361faf 100644 --- a/src/js_printer.zig +++ b/src/js_printer.zig @@ -4299,7 +4299,7 @@ pub const Format = enum { esm, cjs, - // Bun.js must escape non-latin1 identifiers in the output This is because + // bun.js must escape non-latin1 identifiers in the output This is because // we load JavaScript as a UTF-8 buffer instead of a UTF-16 buffer // JavaScriptCore does not support UTF-8 identifiers when the source code // string is loaded as const char* We don't want to double the size of code diff --git a/src/options.zig b/src/options.zig index 24b5cdf87..0541de360 100644 --- a/src/options.zig +++ b/src/options.zig @@ -1332,7 +1332,7 @@ pub const BundleOptions = struct { }, error.AccessDenied => { Output.prettyErrorln( - "error: access denied when trying to open directory for static files: \"{s}\".\nPlease re-open Bun with access to this folder or pass a different folder via \"--public-dir\". Note: --public-dir is relative to --cwd (or the process' current working directory).\n\nThe public folder is where static assets such as images, fonts, and .html files go.", + "error: access denied when trying to open directory for static files: \"{s}\".\nPlease re-open bun with access to this folder or pass a different folder via \"--public-dir\". Note: --public-dir is relative to --cwd (or the process' current working directory).\n\nThe public folder is where static assets such as images, fonts, and .html files go.", .{opts.routes.static_dir}, ); std.process.exit(1); diff --git a/src/panic_handler.zig b/src/panic_handler.zig index aa3d8de64..8f3038fa1 100644 --- a/src/panic_handler.zig +++ b/src/panic_handler.zig @@ -32,17 +32,17 @@ pub fn NewPanicHandler(comptime panic_func: fn handle_panic(msg: []const u8, err if (msg.len > 0) { if (Output.isEmojiEnabled()) { - Output.prettyErrorln("<r><red>Bun crashed ðŸ˜ðŸ˜ðŸ˜<r><d>: <r><b>{s}<r>\n", .{msg}); + Output.prettyErrorln("<r><red>bun crashed ðŸ˜ðŸ˜ðŸ˜<r><d>: <r><b>{s}<r>\n", .{msg}); } else { Output.prettyErrorln("<r><red>Crash<r><d>:<r> <b>{s}<r>", .{msg}); } Output.flush(); } else { if (Output.isEmojiEnabled()) { - Output.prettyErrorln("<r><red>Bun will crash now<r> ðŸ˜ðŸ˜ðŸ˜<r>\n", .{}); + Output.prettyErrorln("<r><red>bun will crash now<r> ðŸ˜ðŸ˜ðŸ˜<r>\n", .{}); Output.flush(); } else { - Output.printError("Bun has crashed :'(\n", .{}); + Output.printError("bun has crashed :'(\n", .{}); } Output.flush(); } diff --git a/src/runtime.footer.js b/src/runtime.footer.js index 334efb92a..7a309647c 100644 --- a/src/runtime.footer.js +++ b/src/runtime.footer.js @@ -1,6 +1,6 @@ // --- // Public exports from runtime -// Compatible with Bun's Runtime Environment and web browsers. +// Compatible with bun's Runtime Environment and web browsers. export var $$m = "$primordials" in globalThis ? $primordials.require : BUN_RUNTIME.$$m; export var __HMRModule = BUN_RUNTIME.__HMRModule; |