mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +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:
@@ -64,7 +64,7 @@ fn cpusImplLinux(globalThis: *jsc.JSGlobalObject) !jsc.JSValue {
|
||||
const file = try std.fs.openFileAbsolute("/proc/stat", .{});
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, .probably_small).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
@@ -104,7 +104,7 @@ fn cpusImplLinux(globalThis: *jsc.JSGlobalObject) !jsc.JSValue {
|
||||
if (std.fs.openFileAbsolute("/proc/cpuinfo", .{})) |file| {
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, .probably_small).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
@@ -155,7 +155,7 @@ fn cpusImplLinux(globalThis: *jsc.JSGlobalObject) !jsc.JSValue {
|
||||
if (std.fs.openFileAbsolute(path, .{})) |file| {
|
||||
defer file.close();
|
||||
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, true).unwrap();
|
||||
const read = try bun.sys.File.from(file).readToEndWithArrayList(&file_buf, .probably_small).unwrap();
|
||||
defer file_buf.clearRetainingCapacity();
|
||||
const contents = file_buf.items[0..read];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user