mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
feat(install): automatically migrate package-lock.json to bun.lockb (#6352)
* work so far * stuff * a * basics work * stuff * yoo * build lockfile * correct * f * a * install fixture havent tested * i made it worse * lol * be more reasonable * make the test easier to pass because bun install doesn't handle obscure lockfile edge cases :/ * a * works now * ok * a * a * cool * nah * fix stuff * l * a * idfk * LAME * prettier errors * does this fix tests? * Add more safety checks to Integrity * Add another check * More careful lifetime handling * Fix linux debugger issue * a * tmp dir and snapshot test --------- Co-authored-by: Jarred SUmner <jarred@jarredsumner.com>
This commit is contained in:
15
build.zig
15
build.zig
@@ -145,7 +145,22 @@ pub fn build(b: *Build) !void {
|
||||
};
|
||||
}
|
||||
|
||||
const required_zig_version = "0.12.0-dev.163+6780a6bbf";
|
||||
pub fn build_(b: *Build) !void {
|
||||
if (!std.mem.eql(u8, @import("builtin").zig_version_string, required_zig_version)) {
|
||||
const colors = std.io.getStdErr().supportsAnsiEscapeCodes();
|
||||
std.debug.print(
|
||||
"{s}WARNING:\nBun requires zig version '{s}', but found '{s}', build may fail...\nMake sure you installed the right version as per https://bun.sh/docs/project/development#install-zig\n{s}You can update to the right version using 'zigup {s}'\n\n",
|
||||
.{
|
||||
if (colors) "\x1b[1;33m" else "",
|
||||
required_zig_version,
|
||||
@import("builtin").zig_version_string,
|
||||
if (colors) "\x1b[0m" else "",
|
||||
required_zig_version,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// Standard target options allows the person running `zig build` to choose
|
||||
// what target to build for. Here we do not override the defaults, which
|
||||
// means any target is allowed, and the default is native. Other options
|
||||
|
||||
Reference in New Issue
Block a user