Split install.zig into multiple files (#20626)

Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
This commit is contained in:
pfg
2025-06-26 12:43:46 -07:00
committed by GitHub
parent ea7068a531
commit 177239cff5
29 changed files with 10725 additions and 10049 deletions

View File

@@ -1,8 +1,18 @@
const Command = @import("../cli.zig").Command;
const PackageManager = @import("../install/install.zig").PackageManager;
//! parse dependency of positional arg string (may include name@version for example)
//! get the precise version from the lockfile (there may be multiple)
//! copy the contents into a temp folder
pub const PatchCommand = struct {
pub fn exec(ctx: Command.Context) !void {
try PackageManager.patch(ctx);
try updatePackageJSONAndInstallCatchError(ctx, .patch);
}
};
// @sortImports
const bun = @import("bun");
const string = bun.string;
const Command = bun.CLI.Command;
const PackageManager = bun.install.PackageManager;
const updatePackageJSONAndInstallCatchError = PackageManager.updatePackageJSONAndInstallCatchError;