protobufjs 7.2.5 → 7.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/light/protobuf.js +4 -4
- package/dist/light/protobuf.js.map +1 -1
- package/dist/light/protobuf.min.js +3 -3
- package/dist/light/protobuf.min.js.map +1 -1
- package/dist/minimal/protobuf.js +2 -2
- package/dist/minimal/protobuf.min.js +2 -2
- package/dist/protobuf.js +22 -5
- package/dist/protobuf.js.map +1 -1
- package/dist/protobuf.min.js +3 -3
- package/dist/protobuf.min.js.map +1 -1
- package/package.json +1 -1
- package/src/parse.js +18 -1
- package/src/root.js +2 -2
package/package.json
CHANGED
package/src/parse.js
CHANGED
|
@@ -144,7 +144,24 @@ function parse(source, root, options) {
|
|
|
144
144
|
else
|
|
145
145
|
target.push([ start = parseId(next()), skip("to", true) ? parseId(next()) : start ]);
|
|
146
146
|
} while (skip(",", true));
|
|
147
|
-
|
|
147
|
+
var dummy = {options: undefined};
|
|
148
|
+
dummy.setOption = function(name, value) {
|
|
149
|
+
if (this.options === undefined) this.options = {};
|
|
150
|
+
this.options[name] = value;
|
|
151
|
+
};
|
|
152
|
+
ifBlock(
|
|
153
|
+
dummy,
|
|
154
|
+
function parseRange_block(token) {
|
|
155
|
+
/* istanbul ignore else */
|
|
156
|
+
if (token === "option") {
|
|
157
|
+
parseOption(dummy, token); // skip
|
|
158
|
+
skip(";");
|
|
159
|
+
} else
|
|
160
|
+
throw illegal(token);
|
|
161
|
+
},
|
|
162
|
+
function parseRange_line() {
|
|
163
|
+
parseInlineOptions(dummy); // skip
|
|
164
|
+
});
|
|
148
165
|
}
|
|
149
166
|
|
|
150
167
|
function parseNumber(token, insideTryCatch) {
|
package/src/root.js
CHANGED
|
@@ -98,10 +98,10 @@ Root.prototype.load = function load(filename, options, callback) {
|
|
|
98
98
|
/* istanbul ignore if */
|
|
99
99
|
if (!callback)
|
|
100
100
|
return;
|
|
101
|
-
var cb = callback;
|
|
102
|
-
callback = null;
|
|
103
101
|
if (sync)
|
|
104
102
|
throw err;
|
|
103
|
+
var cb = callback;
|
|
104
|
+
callback = null;
|
|
105
105
|
cb(err, root);
|
|
106
106
|
}
|
|
107
107
|
|