protobufjs 6.10.0-beta.2 → 6.10.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ### [6.10.2](https://www.github.com/protobufjs/protobuf.js/compare/v6.10.1...v6.10.2) (2020-11-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * es6 export enum ([#1446](https://www.github.com/protobufjs/protobuf.js/issues/1446)) ([9f33784](https://www.github.com/protobufjs/protobuf.js/commit/9f33784350b1efc2e774bbfc087cbd2c47828748))
9
+ * make parsedOptions appear in method JSON representation ([#1506](https://www.github.com/protobufjs/protobuf.js/issues/1506)) ([3d29969](https://www.github.com/protobufjs/protobuf.js/commit/3d29969865f2119550d9dc88391846469da9fa7f))
10
+ * utf8 -> utf16 decoding bug on surrogate pairs ([#1486](https://www.github.com/protobufjs/protobuf.js/issues/1486)) ([75172cd](https://www.github.com/protobufjs/protobuf.js/commit/75172cd11be137bbabd2fba7a02b15067695ebad))
11
+
12
+ ### [6.10.1](https://www.github.com/protobufjs/protobuf.js/compare/v6.10.0...v6.10.1) (2020-07-16)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * make node detection a bit more forgiving ([#1445](https://www.github.com/protobufjs/protobuf.js/issues/1445)) ([4e75f6d](https://www.github.com/protobufjs/protobuf.js/commit/4e75f6de4a2e49f28c24b59107f262d472b68977))
18
+
19
+ ## [6.10.0](https://www.github.com/protobufjs/protobuf.js/compare/v6.9.0...v6.10.0) (2020-07-13)
20
+
21
+
22
+ ### Features
23
+
24
+ * add configurable Root.prototype.fetch ([ad3cffd](https://www.github.com/protobufjs/protobuf.js/commit/ad3cffdc5a54a7c94830674270d3386e1a2b58fc))
25
+ * better comment parse ([#1419](https://www.github.com/protobufjs/protobuf.js/issues/1419)) ([7fd2e18](https://www.github.com/protobufjs/protobuf.js/commit/7fd2e182150c9b6be9ba21e6450b6e4668ad9f82))
26
+ * parsed options ([#1256](https://www.github.com/protobufjs/protobuf.js/issues/1256)) ([7a25398](https://www.github.com/protobufjs/protobuf.js/commit/7a2539843055b6daecb9f369c67a6cf588dbb54c))
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * allow Windows unc paths to be resolved and normalized ([#1351](https://www.github.com/protobufjs/protobuf.js/issues/1351)) ([cd4aeda](https://www.github.com/protobufjs/protobuf.js/commit/cd4aeda8036f80cfa3b9f1db4096d856b2fd05fb))
32
+ * do not fail if no process ([#1440](https://www.github.com/protobufjs/protobuf.js/issues/1440)) ([f2faa8c](https://www.github.com/protobufjs/protobuf.js/commit/f2faa8c32e918b3b843005f0419608b8e158998d))
33
+ * fix util.global ([#1441](https://www.github.com/protobufjs/protobuf.js/issues/1441)) ([742b8dc](https://www.github.com/protobufjs/protobuf.js/commit/742b8dcbc750f9c2659088cbd88ea61fd11b24a7))
34
+ * google.protobuf.Any type_url fixes ([#1068](https://www.github.com/protobufjs/protobuf.js/issues/1068)) ([192f5f1](https://www.github.com/protobufjs/protobuf.js/commit/192f5f12d071fa534ac625290d4666c839a46a9e))
35
+ * handling of map entries with omitted key or value ([#1348](https://www.github.com/protobufjs/protobuf.js/issues/1348)) ([b950877](https://www.github.com/protobufjs/protobuf.js/commit/b950877c86676399674821fca4cf444f046b5acb))
36
+ * properly parse empty messages in options ([#1429](https://www.github.com/protobufjs/protobuf.js/issues/1429)) ([7fbc79f](https://www.github.com/protobufjs/protobuf.js/commit/7fbc79f11d89b263dafc8f332ccba59a8d181fca))
37
+ * updated isNode check ([#1221](https://www.github.com/protobufjs/protobuf.js/issues/1221)) ([#1363](https://www.github.com/protobufjs/protobuf.js/issues/1363)) ([5564e7b](https://www.github.com/protobufjs/protobuf.js/commit/5564e7b5f07d3eab99762528e8ce88507af5a5a3))
38
+
3
39
  ## [6.9.0](https://www.github.com/protobufjs/protobuf.js/compare/6.8.8...v6.9.0) (2020-04-17)
4
40
 
5
41
 
package/README.md CHANGED
@@ -285,11 +285,15 @@ The library utilizes JSON descriptors that are equivalent to a .proto definition
285
285
  // awesome.json
286
286
  {
287
287
  "nested": {
288
- "AwesomeMessage": {
289
- "fields": {
290
- "awesomeField": {
291
- "type": "string",
292
- "id": 1
288
+ "awesomepackage": {
289
+ "nested": {
290
+ "AwesomeMessage": {
291
+ "fields": {
292
+ "awesomeField": {
293
+ "type": "string",
294
+ "id": 1
295
+ }
296
+ }
293
297
  }
294
298
  }
295
299
  }
@@ -682,7 +682,10 @@ function buildEnum(ref, enm) {
682
682
  comment.push((config.forceEnumString ? "@property {string} " : "@property {number} ") + key + "=" + val + " " + (enm.comments[key] || key + " value"));
683
683
  });
684
684
  pushComment(comment);
685
- push(escapeName(ref) + "." + escapeName(enm.name) + " = (function() {");
685
+ if (!ref && config.es6)
686
+ push("export const " + escapeName(enm.name) + " = " + escapeName(ref) + "." + escapeName(enm.name) + " = (() => {");
687
+ else
688
+ push(escapeName(ref) + "." + escapeName(enm.name) + " = (function() {");
686
689
  ++indent;
687
690
  push((config.es6 ? "const" : "var") + " valuesById = {}, values = Object.create(valuesById);");
688
691
  var aliased = [];
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * protobuf.js v6.9.0 (c) 2016, daniel wirtz
3
- * compiled mon, 13 jul 2020 22:57:44 utc
2
+ * protobuf.js v6.10.0 (c) 2016, daniel wirtz
3
+ * compiled wed, 15 jul 2020 23:34:13 utc
4
4
  * licensed under the bsd-3-clause license
5
5
  * see: https://github.com/dcodeio/protobuf.js for details
6
6
  */
@@ -6073,8 +6073,23 @@ util.pool = require(9);
6073
6073
  // utility to work with the low and high bits of a 64 bit value
6074
6074
  util.LongBits = require(34);
6075
6075
 
6076
- // global object reference
6077
- util.global = typeof global !== "undefined" && Object.prototype.toString.call(global) === "[object global]" && global
6076
+ /**
6077
+ * Whether running within node or not.
6078
+ * @memberof util
6079
+ * @type {boolean}
6080
+ */
6081
+ util.isNode = Boolean(typeof global !== "undefined"
6082
+ && global
6083
+ && global.process
6084
+ && global.process.versions
6085
+ && global.process.versions.node);
6086
+
6087
+ /**
6088
+ * Global object reference.
6089
+ * @memberof util
6090
+ * @type {Object}
6091
+ */
6092
+ util.global = util.isNode && global
6078
6093
  || typeof window !== "undefined" && window
6079
6094
  || typeof self !== "undefined" && self
6080
6095
  || this; // eslint-disable-line no-invalid-this
@@ -6094,14 +6109,6 @@ util.emptyArray = Object.freeze ? Object.freeze([]) : /* istanbul ignore next */
6094
6109
  */
6095
6110
  util.emptyObject = Object.freeze ? Object.freeze({}) : /* istanbul ignore next */ {}; // used on prototypes
6096
6111
 
6097
- /**
6098
- * Whether running within node or not.
6099
- * @memberof util
6100
- * @type {boolean}
6101
- * @const
6102
- */
6103
- util.isNode = Boolean(util.global.process && util.global.process.versions && util.global.process.versions.node);
6104
-
6105
6112
  /**
6106
6113
  * Tests if the specified value is an integer.
6107
6114
  * @function