respect package.json indentation in bun install (#12328)

This commit is contained in:
Dylan Conway
2024-07-03 23:10:34 -07:00
committed by GitHub
parent 39d5c8a8a5
commit 4fefb8507c
12 changed files with 297 additions and 82 deletions

View File

@@ -1436,7 +1436,7 @@ pub const CreateCommand = struct {
const package_json_writer = JSPrinter.NewFileWriter(package_json_file.?);
const written = JSPrinter.printJSON(@TypeOf(package_json_writer), package_json_writer, package_json_expr, &source) catch |err| {
const written = JSPrinter.printJSON(@TypeOf(package_json_writer), package_json_writer, package_json_expr, &source, .{}) catch |err| {
Output.prettyErrorln("package.json failed to write due to error {s}", .{@errorName(err)});
package_json_file = null;
break :process_package_json;