Compare commits

...

2 Commits

Author SHA1 Message Date
Dylan Conway
fc326ea84c test 2025-01-10 16:17:21 -08:00
Dylan Conway
d174d40705 silent 2025-01-10 16:09:47 -08:00
2 changed files with 20 additions and 1 deletions

View File

@@ -15018,7 +15018,7 @@ pub const PackageManager = struct {
try manager.saveLockfile(&load_result, save_format, had_any_diffs, lockfile_before_install, packages_len_before_install, log_level);
if (manager.options.do.summary) {
if (manager.options.do.summary and log_level != .silent) {
// TODO(dylan-conway): packages aren't installed but we can still print
// added/removed/updated direct dependencies.
Output.pretty(

View File

@@ -1970,6 +1970,25 @@ test("--lockfile-only", async () => {
expect((await Bun.file(join(packageDir, "bun.lock")).text()).replaceAll(/localhost:\d+/g, "localhost:1234")).toBe(
firstLockfile,
);
// --silent works
const {
stdout,
stderr,
exited: exited2,
} = spawn({
cmd: [bunExe(), "install", "--lockfile-only", "--silent"],
cwd: packageDir,
stdout: "pipe",
stderr: "pipe",
env,
});
expect(await exited2).toBe(0);
const out = await Bun.readableStreamToText(stdout);
const err = await Bun.readableStreamToText(stderr);
expect(out).toBe("");
expect(err).toBe("");
});
describe("bundledDependencies", () => {