mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix
This commit is contained in:
@@ -400,8 +400,10 @@ pub fn print(
|
||||
.none, .dir => {
|
||||
printed_installed_update_request = true;
|
||||
|
||||
const was_updated = manager.updating_packages.contains(package_name);
|
||||
const action_word = if (was_updated) "updated" else "installed";
|
||||
const action_word = if (manager.subcommand == .update)
|
||||
(if (manager.updating_packages.contains(package_name)) "updated" else "added")
|
||||
else
|
||||
"installed";
|
||||
|
||||
const fmt = comptime Output.prettyFmt("<r><green>{s}<r> <b>{s}<r><d>@{}<r>\n", enable_ansi_colors);
|
||||
|
||||
@@ -425,8 +427,10 @@ pub fn print(
|
||||
};
|
||||
|
||||
{
|
||||
const was_updated = manager.updating_packages.contains(package_name);
|
||||
const action_word = if (was_updated) "updated" else "installed";
|
||||
const action_word = if (manager.subcommand == .update)
|
||||
(if (manager.updating_packages.contains(package_name)) "updated" else "added")
|
||||
else
|
||||
"installed";
|
||||
|
||||
const fmt = comptime Output.prettyFmt("<r><green>{s}<r> {s}<r><d>@{}<r> with binaries:\n", enable_ansi_colors);
|
||||
|
||||
|
||||
@@ -5210,7 +5210,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed no-deps@1.0.1",
|
||||
"updated no-deps@1.0.1",
|
||||
"",
|
||||
expect.stringContaining("done"),
|
||||
"",
|
||||
@@ -5230,7 +5230,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed no-deps@2.0.0",
|
||||
"updated no-deps@2.0.0",
|
||||
"",
|
||||
"1 package installed",
|
||||
]);
|
||||
@@ -5570,10 +5570,10 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed what-bin@1.5.0 with binaries:",
|
||||
"updated what-bin@1.5.0 with binaries:",
|
||||
" - what-bin",
|
||||
"installed uses-what-bin@1.5.0",
|
||||
"installed a-dep@1.0.5",
|
||||
"updated uses-what-bin@1.5.0",
|
||||
"updated a-dep@1.0.5",
|
||||
"",
|
||||
"3 packages installed",
|
||||
]);
|
||||
@@ -5617,7 +5617,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed a-dep@1.0.10",
|
||||
"updated a-dep@1.0.10",
|
||||
"",
|
||||
expect.stringMatching(/(\[\d+\.\d+m?s\])/),
|
||||
"",
|
||||
@@ -5663,7 +5663,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
args ? "installed a-dep@1.0.10" : expect.stringContaining("+ a-dep@1.0.10"),
|
||||
args ? "updated a-dep@1.0.10" : expect.stringContaining("+ a-dep@1.0.10"),
|
||||
"",
|
||||
"1 package installed",
|
||||
]);
|
||||
@@ -5733,7 +5733,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed no-deps@1.0.0",
|
||||
"updated no-deps@1.0.0",
|
||||
"",
|
||||
expect.stringMatching(/(\[\d+\.\d+m?s\])/),
|
||||
"",
|
||||
@@ -5749,7 +5749,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed no-deps@2.0.0",
|
||||
"added no-deps@2.0.0",
|
||||
"",
|
||||
"1 package installed",
|
||||
]);
|
||||
@@ -5783,7 +5783,7 @@ describe("update", () => {
|
||||
expect(out).toEqual([
|
||||
expect.stringContaining("bun update v1."),
|
||||
"",
|
||||
"installed no-deps@1.1.0",
|
||||
"updated no-deps@1.1.0",
|
||||
"",
|
||||
"1 package installed",
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user