Merge branch 'main' of https://github.com/oven-sh/bun into don/test/toml

This commit is contained in:
Don Isaac
2025-03-05 14:19:47 -08:00
3 changed files with 32 additions and 12 deletions

View File

@@ -471,7 +471,7 @@ function getBuildZigStep(platform, options) {
cancel_on_build_failing: isMergeQueue(),
env: getBuildEnv(platform, options),
command: `bun run build:ci --target bun-zig --toolchain ${toolchain}`,
timeout_in_minutes: 25,
timeout_in_minutes: 35,
};
}

View File

@@ -892,7 +892,29 @@ extern "C" JSC__JSGlobalObject* Zig__GlobalObject__create(void* console_client,
vm.heap.acquireAccess();
JSC::JSLockHolder locker(vm);
vm.heap.disableStopIfNecessaryTimer();
{
const char* disable_stop_if_necessary_timer = getenv("BUN_DISABLE_STOP_IF_NECESSARY_TIMER");
// Keep stopIfNecessaryTimer enabled by default when either:
// - `--smol` is passed
// - The machine has less than 4GB of RAM
bool shouldDisableStopIfNecessaryTimer = !miniMode;
if (WTF::ramSize() < 1024ull * 1024ull * 1024ull * 4ull) {
shouldDisableStopIfNecessaryTimer = false;
}
if (disable_stop_if_necessary_timer) {
const char value = disable_stop_if_necessary_timer[0];
if (value == '0') {
shouldDisableStopIfNecessaryTimer = false;
} else if (value == '1') {
shouldDisableStopIfNecessaryTimer = true;
}
}
if (shouldDisableStopIfNecessaryTimer) {
vm.heap.disableStopIfNecessaryTimer();
}
}
// Every JS VM's RunLoop should use Bun's RunLoop implementation
ASSERT(vmPtr->runLoop().kind() == WTF::RunLoop::Kind::Bun);

View File

@@ -827,14 +827,12 @@ pub const InitCommand = struct {
}
if (fields.entry_point.len > 0 and !did_load_package_json) {
Output.pretty("\nTo get started, run:\n\n\t", .{});
if (strings.containsAny(
" \"'",
fields.entry_point,
)) {
Output.prettyln("<cyan>bun run {any}<r>", .{bun.fmt.formatJSONStringLatin1(fields.entry_point)});
Output.pretty("\nTo get started, run:\n\n ", .{});
if (strings.containsAny(" \"'", fields.entry_point)) {
Output.pretty("<cyan>bun run {any}<r>\n\n", .{bun.fmt.formatJSONStringLatin1(fields.entry_point)});
} else {
Output.prettyln("<cyan>bun run {s}<r>", .{fields.entry_point});
Output.pretty("<cyan>bun run {s}<r>\n\n", .{fields.entry_point});
}
}
@@ -1106,15 +1104,15 @@ const Template = enum {
\\
\\<b><cyan>Development<r><d> - full-stack dev server with hot reload<r>
\\
\\ <cyan><b>bun dev<r>
\\ <cyan><b>bun dev<r>
\\
\\<b><yellow>Static Site<r><d> - build optimized assets to disk (no backend)<r>
\\
\\ <yellow><b>bun run build<r>
\\ <yellow><b>bun run build<r>
\\
\\<b><green>Production<r><d> - serve a full-stack production build<r>
\\
\\ <green><b>bun start<r>
\\ <green><b>bun start<r>
\\
\\<blue>Happy bunning! 🐇<r>
\\