diff options
author | 2023-06-26 15:51:57 -0700 | |
---|---|---|
committer | 2023-06-26 15:51:57 -0700 | |
commit | 28f27f733b3db072944156694301651b09b7696b (patch) | |
tree | 6dda76e80e0639f8c4a78006f6c423fe33c778b3 /src/api/schema.zig | |
parent | a5100ad380f099907d4b3a9bec696f481b8e7821 (diff) | |
download | bun-28f27f733b3db072944156694301651b09b7696b.tar.gz bun-28f27f733b3db072944156694301651b09b7696b.tar.zst bun-28f27f733b3db072944156694301651b09b7696b.zip |
[bun install] Implement `--exact` flag (#3409)
* [bun install] Implement `--exact` flag
* Rename to --save-exact
* Rename --exact to --save-exact
* Update bun-add.test.ts
* We're going with --exact as the flag name
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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 2de80d42c..ec8efa9f6 100644 --- a/src/api/schema.zig +++ b/src/api/schema.zig @@ -2904,6 +2904,9 @@ pub const Api = struct { /// frozen_lockfile frozen_lockfile: ?bool = null, + /// exact + exact: ?bool = null, + pub fn decode(reader: anytype) anyerror!BunInstall { var this = std.mem.zeroes(BunInstall); @@ -2970,6 +2973,9 @@ pub const Api = struct { 19 => { this.frozen_lockfile = try reader.readValue(bool); }, + 20 => { + this.exact = try reader.readValue(bool); + }, else => { return error.InvalidMessage; }, @@ -3055,6 +3061,10 @@ pub const Api = struct { try writer.writeFieldID(19); try writer.writeInt(@as(u8, @intFromBool(frozen_lockfile))); } + if (this.exact) |exact| { + try writer.writeFieldID(20); + try writer.writeInt(@as(u8, @intFromBool(exact))); + } try writer.endMessage(); } }; |