From 3e97c1caf39d80f96ceb97fd54059feef1b628aa Mon Sep 17 00:00:00 2001 From: 190n Date: Thu, 22 May 2025 00:40:48 -0700 Subject: [PATCH] restore bun bd and make it quiet (#19831) --- AGENTS.md | 20 ++++++++++---------- package.json | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index be4479f37c..9fe2abe4b7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,36 +1,36 @@ ## bun tests -**IMPORTANT**: use the `bun agent` command instead of the `bun` command. For example: +**IMPORTANT**: use the `bun bd` command instead of the `bun` command. For example: ✅ Good ```sh -bun agent test internal/ban-words.test.ts -bun agent ./foo.ts +bun bd test internal/ban-words.test.ts +bun bd ./foo.ts ``` -The `bun agent` command runs the DEBUG build. If you forget to run the debug build, your changes will not be reflected.. +The `bun bd` command runs the DEBUG build. If you forget to run the debug build, your changes will not be reflected.. ### Run a file -To run a file, you can use the `bun agent ` command. +To run a file, you can use the `bun bd ` command. ```sh -bun agent ./foo.ts +bun bd ./foo.ts ``` ### Run tests -To run a single test, you need to use the `bun agent test ` command. +To run a single test, you need to use the `bun bd test ` command. ```sh -bun agent test internal/ban-words.test.ts +bun bd test internal/ban-words.test.ts ``` -You must ALWAYS make sure to pass a file path to the `bun agent test ` command. DO NOT try to run ALL the tests at once unless you're in a specific subdirectory. +You must ALWAYS make sure to pass a file path to the `bun bd test ` command. DO NOT try to run ALL the tests at once unless you're in a specific subdirectory. ### Run a Node.js test ```sh -bun agent --silent node:test test-fs-link +bun bd --silent node:test test-fs-link ``` diff --git a/package.json b/package.json index c59847060e..fc8b48bee5 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "build": "bun run build:debug", "watch": "zig build check --watch -fincremental --prominent-compile-errors --global-cache-dir build/debug/zig-check-cache --zig-lib-dir vendor/zig/lib", "watch-windows": "zig build check-windows --watch -fincremental --prominent-compile-errors --global-cache-dir build/debug/zig-check-cache --zig-lib-dir vendor/zig/lib", - "agent": "(bun run --silent build:debug &> /tmp/bun.debug.build.log || (cat /tmp/bun.debug.build.log && rm -rf /tmp/bun.debug.build.log && exit 1)) && rm -f /tmp/bun.debug.build.log && ./build/debug/bun-debug", + "bd:v": "(bun run --silent build:debug &> /tmp/bun.debug.build.log || (cat /tmp/bun.debug.build.log && rm -rf /tmp/bun.debug.build.log && exit 1)) && rm -f /tmp/bun.debug.build.log && ./build/debug/bun-debug", + "bd": "BUN_DEBUG_QUIET_LOGS=1 bun bd:v", "build:debug": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -B build/debug", "build:debug:asan": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -B build/debug-asan", "build:valgrind": "bun ./scripts/build.mjs -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_BASELINE=ON -ENABLE_VALGRIND=ON -B build/debug-valgrind",