protobufjs 7.3.2 → 7.3.3

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 (77) hide show
  1. package/LICENSE +39 -39
  2. package/README.md +727 -727
  3. package/ext/debug/README.md +4 -4
  4. package/ext/debug/index.js +71 -71
  5. package/ext/descriptor/README.md +72 -72
  6. package/ext/descriptor/index.d.ts +191 -191
  7. package/ext/descriptor/index.js +1052 -1052
  8. package/ext/descriptor/test.js +54 -54
  9. package/google/LICENSE +27 -27
  10. package/google/README.md +1 -1
  11. package/google/api/annotations.json +82 -82
  12. package/google/api/annotations.proto +10 -10
  13. package/google/api/http.json +85 -85
  14. package/google/api/http.proto +30 -30
  15. package/google/protobuf/api.json +117 -117
  16. package/google/protobuf/api.proto +33 -33
  17. package/google/protobuf/descriptor.json +738 -738
  18. package/google/protobuf/descriptor.proto +286 -286
  19. package/google/protobuf/source_context.json +19 -19
  20. package/google/protobuf/source_context.proto +7 -7
  21. package/google/protobuf/type.json +201 -201
  22. package/google/protobuf/type.proto +89 -89
  23. package/index.d.ts +2741 -2741
  24. package/index.js +4 -4
  25. package/light.d.ts +2 -2
  26. package/light.js +3 -3
  27. package/minimal.d.ts +2 -2
  28. package/minimal.js +4 -4
  29. package/package.json +111 -111
  30. package/scripts/postinstall.js +32 -32
  31. package/src/common.js +399 -399
  32. package/src/converter.js +301 -301
  33. package/src/decoder.js +129 -129
  34. package/src/encoder.js +100 -100
  35. package/src/enum.js +198 -198
  36. package/src/field.js +377 -377
  37. package/src/index-light.js +104 -104
  38. package/src/index-minimal.js +36 -36
  39. package/src/index.js +12 -12
  40. package/src/mapfield.js +126 -126
  41. package/src/message.js +138 -138
  42. package/src/method.js +160 -160
  43. package/src/namespace.js +433 -433
  44. package/src/object.js +243 -243
  45. package/src/oneof.js +203 -203
  46. package/src/parse.js +893 -889
  47. package/src/reader.js +416 -416
  48. package/src/reader_buffer.js +51 -51
  49. package/src/root.js +368 -368
  50. package/src/roots.js +18 -18
  51. package/src/rpc/service.js +142 -142
  52. package/src/rpc.js +36 -36
  53. package/src/service.js +167 -167
  54. package/src/tokenize.js +416 -416
  55. package/src/type.js +589 -589
  56. package/src/types.js +196 -196
  57. package/src/typescript.jsdoc +15 -15
  58. package/src/util/longbits.js +200 -200
  59. package/src/util/minimal.js +438 -438
  60. package/src/util.js +212 -212
  61. package/src/verifier.js +176 -176
  62. package/src/wrappers.js +102 -102
  63. package/src/writer.js +465 -465
  64. package/src/writer_buffer.js +85 -85
  65. package/tsconfig.json +7 -7
  66. package/dist/light/protobuf.js +0 -7381
  67. package/dist/light/protobuf.js.map +0 -1
  68. package/dist/light/protobuf.min.js +0 -8
  69. package/dist/light/protobuf.min.js.map +0 -1
  70. package/dist/minimal/protobuf.js +0 -2736
  71. package/dist/minimal/protobuf.js.map +0 -1
  72. package/dist/minimal/protobuf.min.js +0 -8
  73. package/dist/minimal/protobuf.min.js.map +0 -1
  74. package/dist/protobuf.js +0 -9105
  75. package/dist/protobuf.js.map +0 -1
  76. package/dist/protobuf.min.js +0 -8
  77. package/dist/protobuf.min.js.map +0 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // full library entry point.
2
-
3
- "use strict";
4
- module.exports = require("./src/index");
1
+ // full library entry point.
2
+
3
+ "use strict";
4
+ module.exports = require("./src/index");
package/light.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export as namespace protobuf;
2
- export * from "./index";
1
+ export as namespace protobuf;
2
+ export * from "./index";
package/light.js CHANGED
@@ -1,4 +1,4 @@
1
- // light library entry point.
2
-
3
- "use strict";
1
+ // light library entry point.
2
+
3
+ "use strict";
4
4
  module.exports = require("./src/index-light");
package/minimal.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export as namespace protobuf;
2
- export * from "./index";
1
+ export as namespace protobuf;
2
+ export * from "./index";
package/minimal.js CHANGED
@@ -1,4 +1,4 @@
1
- // minimal library entry point.
2
-
3
- "use strict";
4
- module.exports = require("./src/index-minimal");
1
+ // minimal library entry point.
2
+
3
+ "use strict";
4
+ module.exports = require("./src/index-minimal");
package/package.json CHANGED
@@ -1,111 +1,111 @@
1
- {
2
- "name": "protobufjs",
3
- "version": "7.3.2",
4
- "versionScheme": "~",
5
- "description": "Protocol Buffers for JavaScript (& TypeScript).",
6
- "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
7
- "license": "BSD-3-Clause",
8
- "repository": "protobufjs/protobuf.js",
9
- "bugs": "https://github.com/protobufjs/protobuf.js/issues",
10
- "homepage": "https://protobufjs.github.io/protobuf.js/",
11
- "engines": {
12
- "node": ">=12.0.0"
13
- },
14
- "eslintConfig": {
15
- "env": {
16
- "es6": true
17
- },
18
- "parserOptions": {
19
- "ecmaVersion": 6
20
- }
21
- },
22
- "keywords": [
23
- "protobuf",
24
- "protocol-buffers",
25
- "serialization",
26
- "typescript"
27
- ],
28
- "main": "index.js",
29
- "types": "index.d.ts",
30
- "scripts": {
31
- "bench": "node bench",
32
- "build": "npm run build:bundle && npm run build:types",
33
- "build:bundle": "gulp --gulpfile scripts/gulpfile.js",
34
- "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
35
- "changelog": "node scripts/changelog -w",
36
- "coverage": "nyc tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
37
- "docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
38
- "lint": "npm run lint:sources && npm run lint:types",
39
- "lint:sources": "eslint \"**/*.js\" -c config/eslint.json",
40
- "lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json",
41
- "pages": "node scripts/pages",
42
- "prepublish": "cd cli && npm install && cd .. && npm run build",
43
- "postinstall": "node scripts/postinstall",
44
- "prof": "node bench/prof",
45
- "test": "npm run test:sources && npm run test:types",
46
- "test:sources": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
47
- "test:types": "tsc tests/comp_typescript.ts --lib es2015 --esModuleInterop --strictNullChecks --experimentalDecorators --emitDecoratorMetadata && tsc tests/data/test.js.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks && tsc tests/data/*.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks",
48
- "make": "npm run lint:sources && npm run build && npm run lint:types && node ./scripts/gentests.js && npm test"
49
- },
50
- "dependencies": {
51
- "@protobufjs/aspromise": "^1.1.2",
52
- "@protobufjs/base64": "^1.1.2",
53
- "@protobufjs/codegen": "^2.0.4",
54
- "@protobufjs/eventemitter": "^1.1.0",
55
- "@protobufjs/fetch": "^1.1.0",
56
- "@protobufjs/float": "^1.0.2",
57
- "@protobufjs/inquire": "^1.1.0",
58
- "@protobufjs/path": "^1.1.2",
59
- "@protobufjs/pool": "^1.1.0",
60
- "@protobufjs/utf8": "^1.1.0",
61
- "@types/node": ">=13.7.0",
62
- "long": "^5.0.0"
63
- },
64
- "devDependencies": {
65
- "benchmark": "^2.1.4",
66
- "browserify": "^17.0.0",
67
- "browserify-wrap": "^1.0.2",
68
- "bundle-collapser": "^1.3.0",
69
- "chalk": "^4.0.0",
70
- "escodegen": "^1.13.0",
71
- "eslint": "^8.15.0",
72
- "espree": "^9.0.0",
73
- "estraverse": "^5.1.0",
74
- "gh-pages": "^4.0.0",
75
- "git-raw-commits": "^2.0.3",
76
- "git-semver-tags": "^4.0.0",
77
- "google-protobuf": "^3.11.3",
78
- "gulp": "^4.0.2",
79
- "gulp-header": "^2.0.9",
80
- "gulp-if": "^3.0.0",
81
- "gulp-sourcemaps": "^3.0.0",
82
- "gulp-uglify": "^3.0.2",
83
- "jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc",
84
- "jsdoc": "^4.0.0",
85
- "minimist": "^1.2.0",
86
- "nyc": "^15.0.0",
87
- "reflect-metadata": "^0.1.13",
88
- "tape": "^5.0.0",
89
- "tslint": "^6.0.0",
90
- "typescript": "^3.7.5",
91
- "uglify-js": "^3.7.7",
92
- "vinyl-buffer": "^1.0.1",
93
- "vinyl-fs": "^3.0.3",
94
- "vinyl-source-stream": "^2.0.0"
95
- },
96
- "files": [
97
- "index.js",
98
- "index.d.ts",
99
- "light.d.ts",
100
- "light.js",
101
- "minimal.d.ts",
102
- "minimal.js",
103
- "package-lock.json",
104
- "tsconfig.json",
105
- "scripts/postinstall.js",
106
- "dist/**",
107
- "ext/**",
108
- "google/**",
109
- "src/**"
110
- ]
111
- }
1
+ {
2
+ "name": "protobufjs",
3
+ "version": "7.3.3",
4
+ "versionScheme": "~",
5
+ "description": "Protocol Buffers for JavaScript (& TypeScript).",
6
+ "author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
7
+ "license": "BSD-3-Clause",
8
+ "repository": "protobufjs/protobuf.js",
9
+ "bugs": "https://github.com/protobufjs/protobuf.js/issues",
10
+ "homepage": "https://protobufjs.github.io/protobuf.js/",
11
+ "engines": {
12
+ "node": ">=12.0.0"
13
+ },
14
+ "eslintConfig": {
15
+ "env": {
16
+ "es6": true
17
+ },
18
+ "parserOptions": {
19
+ "ecmaVersion": 6
20
+ }
21
+ },
22
+ "keywords": [
23
+ "protobuf",
24
+ "protocol-buffers",
25
+ "serialization",
26
+ "typescript"
27
+ ],
28
+ "main": "index.js",
29
+ "types": "index.d.ts",
30
+ "scripts": {
31
+ "bench": "node bench",
32
+ "build": "npm run build:bundle && npm run build:types",
33
+ "build:bundle": "gulp --gulpfile scripts/gulpfile.js",
34
+ "build:types": "node cli/bin/pbts --main --global protobuf --out index.d.ts src/ lib/aspromise/index.js lib/base64/index.js lib/codegen/index.js lib/eventemitter/index.js lib/float/index.js lib/fetch/index.js lib/inquire/index.js lib/path/index.js lib/pool/index.js lib/utf8/index.js",
35
+ "changelog": "node scripts/changelog -w",
36
+ "coverage": "nyc tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
37
+ "docs": "jsdoc -c config/jsdoc.json -R README.md --verbose --pedantic",
38
+ "lint": "npm run lint:sources && npm run lint:types",
39
+ "lint:sources": "eslint \"**/*.js\" -c config/eslint.json",
40
+ "lint:types": "tslint \"**/*.d.ts\" -e \"**/node_modules/**\" -t stylish -c config/tslint.json",
41
+ "pages": "node scripts/pages",
42
+ "prepublish": "cd cli && npm install && cd .. && npm run build",
43
+ "postinstall": "node scripts/postinstall",
44
+ "prof": "node bench/prof",
45
+ "test": "npm run test:sources && npm run test:types",
46
+ "test:sources": "tape -r ./lib/tape-adapter tests/*.js tests/node/*.js",
47
+ "test:types": "tsc tests/comp_typescript.ts --lib es2015 --esModuleInterop --strictNullChecks --experimentalDecorators --emitDecoratorMetadata && tsc tests/data/test.js.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks && tsc tests/data/*.ts --lib es2015 --esModuleInterop --noEmit --strictNullChecks",
48
+ "make": "npm run lint:sources && npm run build && npm run lint:types && node ./scripts/gentests.js && npm test"
49
+ },
50
+ "dependencies": {
51
+ "@protobufjs/aspromise": "^1.1.2",
52
+ "@protobufjs/base64": "^1.1.2",
53
+ "@protobufjs/codegen": "^2.0.4",
54
+ "@protobufjs/eventemitter": "^1.1.0",
55
+ "@protobufjs/fetch": "^1.1.0",
56
+ "@protobufjs/float": "^1.0.2",
57
+ "@protobufjs/inquire": "^1.1.0",
58
+ "@protobufjs/path": "^1.1.2",
59
+ "@protobufjs/pool": "^1.1.0",
60
+ "@protobufjs/utf8": "^1.1.0",
61
+ "@types/node": ">=13.7.0",
62
+ "long": "^5.0.0"
63
+ },
64
+ "devDependencies": {
65
+ "benchmark": "^2.1.4",
66
+ "browserify": "^17.0.0",
67
+ "browserify-wrap": "^1.0.2",
68
+ "bundle-collapser": "^1.3.0",
69
+ "chalk": "^4.0.0",
70
+ "escodegen": "^1.13.0",
71
+ "eslint": "^8.15.0",
72
+ "espree": "^9.0.0",
73
+ "estraverse": "^5.1.0",
74
+ "gh-pages": "^4.0.0",
75
+ "git-raw-commits": "^2.0.3",
76
+ "git-semver-tags": "^4.0.0",
77
+ "google-protobuf": "^3.11.3",
78
+ "gulp": "^4.0.2",
79
+ "gulp-header": "^2.0.9",
80
+ "gulp-if": "^3.0.0",
81
+ "gulp-sourcemaps": "^3.0.0",
82
+ "gulp-uglify": "^3.0.2",
83
+ "jaguarjs-jsdoc": "github:dcodeIO/jaguarjs-jsdoc",
84
+ "jsdoc": "^4.0.0",
85
+ "minimist": "^1.2.0",
86
+ "nyc": "^15.0.0",
87
+ "reflect-metadata": "^0.1.13",
88
+ "tape": "^5.0.0",
89
+ "tslint": "^6.0.0",
90
+ "typescript": "^3.7.5",
91
+ "uglify-js": "^3.7.7",
92
+ "vinyl-buffer": "^1.0.1",
93
+ "vinyl-fs": "^3.0.3",
94
+ "vinyl-source-stream": "^2.0.0"
95
+ },
96
+ "files": [
97
+ "index.js",
98
+ "index.d.ts",
99
+ "light.d.ts",
100
+ "light.js",
101
+ "minimal.d.ts",
102
+ "minimal.js",
103
+ "package-lock.json",
104
+ "tsconfig.json",
105
+ "scripts/postinstall.js",
106
+ "dist/**",
107
+ "ext/**",
108
+ "google/**",
109
+ "src/**"
110
+ ]
111
+ }
@@ -1,32 +1,32 @@
1
- "use strict";
2
-
3
- var path = require("path"),
4
- fs = require("fs"),
5
- pkg = require(path.join(__dirname, "..", "package.json"));
6
-
7
- // check version scheme used by dependents
8
- if (!pkg.versionScheme)
9
- return;
10
-
11
- var warn = process.stderr.isTTY
12
- ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
13
- : "WARN " + path.basename(process.argv[1], ".js");
14
-
15
- var basePkg;
16
- try {
17
- basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json")));
18
- } catch (e) {
19
- return;
20
- }
21
-
22
- [
23
- "dependencies",
24
- "devDependencies",
25
- "optionalDependencies",
26
- "peerDependencies"
27
- ]
28
- .forEach(function(check) {
29
- var version = basePkg && basePkg[check] && basePkg[check][pkg.name];
30
- if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme)
31
- process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n");
32
- });
1
+ "use strict";
2
+
3
+ var path = require("path"),
4
+ fs = require("fs"),
5
+ pkg = require(path.join(__dirname, "..", "package.json"));
6
+
7
+ // check version scheme used by dependents
8
+ if (!pkg.versionScheme)
9
+ return;
10
+
11
+ var warn = process.stderr.isTTY
12
+ ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
13
+ : "WARN " + path.basename(process.argv[1], ".js");
14
+
15
+ var basePkg;
16
+ try {
17
+ basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json")));
18
+ } catch (e) {
19
+ return;
20
+ }
21
+
22
+ [
23
+ "dependencies",
24
+ "devDependencies",
25
+ "optionalDependencies",
26
+ "peerDependencies"
27
+ ]
28
+ .forEach(function(check) {
29
+ var version = basePkg && basePkg[check] && basePkg[check][pkg.name];
30
+ if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme)
31
+ process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n");
32
+ });