mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 03:18:53 +00:00
implement pnpm migration (#22262)
### What does this PR do? fixes #7157, fixes #14662 migrates pnpm-workspace.yaml data to package.json & converts pnpm-lock.yml to bun.lock --- ### How did you verify your code works? manually, tests and real world examples --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
This commit is contained in:
@@ -77,15 +77,7 @@ fn installWithCLI(ctx: Command.Context, cli: CommandLineArguments) !void {
|
||||
Output.flush();
|
||||
}
|
||||
|
||||
const package_json_contents = manager.root_package_json_file.readToEndAlloc(ctx.allocator, std.math.maxInt(usize)) catch |err| {
|
||||
if (manager.options.log_level != .silent) {
|
||||
Output.prettyErrorln("<r><red>{s} reading package.json<r> :(", .{@errorName(err)});
|
||||
Output.flush();
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
try manager.installWithManager(ctx, package_json_contents, original_cwd);
|
||||
try manager.installWithManager(ctx, PackageManager.root_package_json_path, original_cwd);
|
||||
|
||||
if (manager.any_failed_to_install) {
|
||||
Global.exit(1);
|
||||
@@ -94,8 +86,6 @@ fn installWithCLI(ctx: Command.Context, cli: CommandLineArguments) !void {
|
||||
|
||||
const string = []const u8;
|
||||
|
||||
const std = @import("std");
|
||||
|
||||
const bun = @import("bun");
|
||||
const Global = bun.Global;
|
||||
const Output = bun.Output;
|
||||
|
||||
Reference in New Issue
Block a user