aboutsummaryrefslogtreecommitdiff
path: root/src/api/schema.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-06-26 15:51:57 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-26 15:51:57 -0700
commit28f27f733b3db072944156694301651b09b7696b (patch)
tree6dda76e80e0639f8c4a78006f6c423fe33c778b3 /src/api/schema.js
parenta5100ad380f099907d4b3a9bec696f481b8e7821 (diff)
downloadbun-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.js')
-rw-r--r--src/api/schema.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/schema.js b/src/api/schema.js
index 270eb9a62..f1e68031e 100644
--- a/src/api/schema.js
+++ b/src/api/schema.js
@@ -3048,6 +3048,10 @@ function decodeBunInstall(bb) {
result["frozen_lockfile"] = !!bb.readByte();
break;
+ case 20:
+ result["exact"] = !!bb.readByte();
+ break;
+
default:
throw new Error("Attempted to parse invalid message");
}
@@ -3174,6 +3178,12 @@ function encodeBunInstall(message, bb) {
bb.writeByte(19);
bb.writeByte(value);
}
+
+ var value = message["exact"];
+ if (value != null) {
+ bb.writeByte(20);
+ bb.writeByte(value);
+ }
bb.writeByte(0);
}