protobufjs 6.11.3 → 7.1.1

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.
Files changed (65) hide show
  1. package/README.md +7 -174
  2. package/dist/light/protobuf.js +77 -29
  3. package/dist/light/protobuf.js.map +1 -1
  4. package/dist/light/protobuf.min.js +3 -3
  5. package/dist/light/protobuf.min.js.map +1 -1
  6. package/dist/minimal/protobuf.js +27 -10
  7. package/dist/minimal/protobuf.js.map +1 -1
  8. package/dist/minimal/protobuf.min.js +3 -3
  9. package/dist/minimal/protobuf.min.js.map +1 -1
  10. package/dist/protobuf.js +163 -61
  11. package/dist/protobuf.js.map +1 -1
  12. package/dist/protobuf.min.js +3 -3
  13. package/dist/protobuf.min.js.map +1 -1
  14. package/index.d.ts +9 -7
  15. package/package.json +12 -31
  16. package/scripts/postinstall.js +0 -3
  17. package/src/converter.js +12 -4
  18. package/src/decoder.js +4 -3
  19. package/src/enum.js +24 -7
  20. package/src/field.js +6 -3
  21. package/src/namespace.js +3 -3
  22. package/src/parse.js +55 -16
  23. package/src/roots.js +1 -1
  24. package/src/tokenize.js +31 -16
  25. package/src/util/minimal.js +24 -7
  26. package/src/wrappers.js +2 -2
  27. package/tsconfig.json +2 -1
  28. package/CHANGELOG.md +0 -1027
  29. package/bin/pbjs +0 -6
  30. package/bin/pbts +0 -6
  31. package/cli/LICENSE +0 -33
  32. package/cli/README.md +0 -174
  33. package/cli/bin/pbjs +0 -6
  34. package/cli/bin/pbts +0 -6
  35. package/cli/index.d.ts +0 -3
  36. package/cli/index.js +0 -3
  37. package/cli/lib/tsd-jsdoc/LICENSE +0 -21
  38. package/cli/lib/tsd-jsdoc/README.md +0 -23
  39. package/cli/lib/tsd-jsdoc/plugin.js +0 -21
  40. package/cli/lib/tsd-jsdoc/publish.js +0 -705
  41. package/cli/lib/tsd-jsdoc.json +0 -18
  42. package/cli/package.json +0 -8
  43. package/cli/package.standalone.json +0 -32
  44. package/cli/pbjs.d.ts +0 -9
  45. package/cli/pbjs.js +0 -330
  46. package/cli/pbts.d.ts +0 -9
  47. package/cli/pbts.js +0 -197
  48. package/cli/targets/json-module.js +0 -38
  49. package/cli/targets/json.js +0 -8
  50. package/cli/targets/proto.js +0 -326
  51. package/cli/targets/proto2.js +0 -10
  52. package/cli/targets/proto3.js +0 -10
  53. package/cli/targets/static-module.js +0 -29
  54. package/cli/targets/static.js +0 -711
  55. package/cli/util.js +0 -183
  56. package/cli/wrappers/amd.js +0 -7
  57. package/cli/wrappers/closure.js +0 -7
  58. package/cli/wrappers/commonjs.js +0 -7
  59. package/cli/wrappers/default.js +0 -15
  60. package/cli/wrappers/es6.js +0 -5
  61. package/dist/README.md +0 -31
  62. package/dist/light/README.md +0 -31
  63. package/dist/minimal/README.md +0 -31
  64. package/package-lock.json +0 -7870
  65. package/scripts/changelog.js +0 -150
package/src/wrappers.js CHANGED
@@ -49,7 +49,7 @@ wrappers[".google.protobuf.Any"] = {
49
49
  if (type) {
50
50
  // type_url does not accept leading "."
51
51
  var type_url = object["@type"].charAt(0) === "." ?
52
- object["@type"].substr(1) : object["@type"];
52
+ object["@type"].slice(1) : object["@type"];
53
53
  // type_url prefix is optional, but path seperator is required
54
54
  if (type_url.indexOf("/") === -1) {
55
55
  type_url = "/" + type_url;
@@ -87,7 +87,7 @@ wrappers[".google.protobuf.Any"] = {
87
87
  if (!(message instanceof this.ctor) && message instanceof Message) {
88
88
  var object = message.$type.toObject(message, options);
89
89
  var messageName = message.$type.fullName[0] === "." ?
90
- message.$type.fullName.substr(1) : message.$type.fullName;
90
+ message.$type.fullName.slice(1) : message.$type.fullName;
91
91
  // Default to type.googleapis.com prefix if no prefix is used
92
92
  if (prefix === "") {
93
93
  prefix = googleApi;
package/tsconfig.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "target": "ES5",
4
4
  "experimentalDecorators": true,
5
- "emitDecoratorMetadata": true
5
+ "emitDecoratorMetadata": true,
6
+ "esModuleInterop": true,
6
7
  }
7
8
  }