Skip to content

Commit 487f892

Browse files
committed
Other: Updated depdendencies / rebuilt dist files
1 parent 50e82fa commit 487f892

15 files changed

+37
-34
lines changed

cli/targets/proto.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,13 @@ function proto_target(root, options, callback) {
5757

5858
function push(line) {
5959
if (line === "")
60-
return out.push("");
61-
var ind = "";
62-
for (var i = 0; i < indent; ++i)
63-
ind += " ";
64-
out.push(ind + line);
60+
out.push("");
61+
else {
62+
var ind = "";
63+
for (var i = 0; i < indent; ++i)
64+
ind += " ";
65+
out.push(ind + line);
66+
}
6567
}
6668

6769
function escape(str) {
@@ -84,16 +86,17 @@ function buildRoot(root) {
8486
root.resolveAll();
8587
var pkg = [];
8688
var ptr = root;
89+
var repeat = true;
8790
do {
8891
var nested = ptr.nestedArray;
8992
if (nested.length === 1 && nested[0] instanceof Namespace && !(nested[0] instanceof Type || nested[0] instanceof Service)) {
9093
ptr = nested[0];
9194
if (ptr !== root)
9295
pkg.push(ptr.name);
9396
} else
94-
break;
95-
} while (true);
96-
out.push('syntax = "proto' + syntax + '";');
97+
repeat = false;
98+
} while (repeat);
99+
out.push("syntax = \"proto" + syntax + "\";");
97100
if (pkg.length)
98101
out.push("", "package " + pkg.join(".") + ";");
99102

@@ -216,14 +219,14 @@ function buildFieldOptions(field) {
216219
if (!field.options || !(keys = Object.keys(field.options)).length)
217220
return null;
218221
var sb = [];
219-
Object.keys(field.options).forEach(function(key) {
222+
keys.forEach(function(key) {
220223
var val = field.options[key];
221224
var wireType = types.packed[field.resolvedType instanceof Enum ? "uint32" : field.type];
222225
switch (key) {
223226
case "packed":
224227
val = Boolean(val);
225228
// skip when not packable or syntax default
226-
if (wireType === undefined || (syntax === 3) === val)
229+
if (wireType === undefined || syntax === 3 === val)
227230
return;
228231
break;
229232
case "default":

dist/light/protobuf.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/light/protobuf.min.js.gz

9 Bytes
Binary file not shown.

dist/light/protobuf.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/minimal/protobuf.min.js.gz

7 Bytes
Binary file not shown.

dist/protobuf.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)