diff options
author | 2023-06-26 01:43:39 +0200 | |
---|---|---|
committer | 2023-06-25 16:43:39 -0700 | |
commit | d8817c2d32a237440a7677622ba351aa95f47c22 (patch) | |
tree | 7dd24039b7c56f0e59b14e3b3f2a6debc2ed8985 /src/api/schema.zig | |
parent | 15ac08474ef0b18b94bbf4863b2497e18e968379 (diff) | |
download | bun-d8817c2d32a237440a7677622ba351aa95f47c22.tar.gz bun-d8817c2d32a237440a7677622ba351aa95f47c22.tar.zst bun-d8817c2d32a237440a7677622ba351aa95f47c22.zip |
Add support for install with --frozen-lockfile (#3365)
* Add support for install with --frozen-lockfile
* Add test
* Add test for frozenLockfile in config file
Diffstat (limited to 'src/api/schema.zig')
-rw-r--r-- | src/api/schema.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/schema.zig b/src/api/schema.zig index 1012e6051..708d32ca0 100644 --- a/src/api/schema.zig +++ b/src/api/schema.zig @@ -2901,6 +2901,9 @@ pub const Api = struct { /// global_bin_dir global_bin_dir: ?[]const u8 = null, + /// frozen_lockfile + frozen_lockfile: ?bool = null, + pub fn decode(reader: anytype) anyerror!BunInstall { var this = std.mem.zeroes(BunInstall); @@ -2964,6 +2967,9 @@ pub const Api = struct { 18 => { this.global_bin_dir = try reader.readValue([]const u8); }, + 19 => { + this.frozen_lockfile = try reader.readValue(bool); + }, else => { return error.InvalidMessage; }, @@ -3045,6 +3051,10 @@ pub const Api = struct { try writer.writeFieldID(18); try writer.writeValue(@TypeOf(global_bin_dir), global_bin_dir); } + if (this.frozen_lockfile) |frozen_lockfile| { + try writer.writeFieldID(19); + try writer.writeInt(@as(u8, @boolToInt(frozen_lockfile))); + } try writer.endMessage(); } }; |