Skip to content

Commit 49053ff

Browse files
committed
Other: Coverage progress
1 parent dfc7c43 commit 49053ff

40 files changed

+522
-97
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0)
1+
# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0))
22

33
## Breaking
44
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3946e0fefea415f52a16ea7a74109ff40eee9643) Initial upgrade of converters to real generated functions, see [#620](https://github.com/dcodeIO/protobuf.js/issues/620)<br />
@@ -116,7 +116,7 @@
116116
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0643f93f5c0d96ed0ece5b47f54993ac3a827f1b) Some cleanup and added a logo<br />
117117
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/169638382de9efe35a1079c5f2045c33b858059a) use $protobuf.Long<br />
118118

119-
# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0)
119+
# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0) ([release](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0))
120120

121121
## Breaking
122122
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a017bf8a2dbdb7f9e7ce4c026bb6845174feb3b1) Dropped IE8 support<br />

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Usage
6060
$> npm install protobufjs [--save --save-prefix=~]
6161
```
6262

63-
**Note:** protobuf.js uses a [semver](https://semver.org)-incompatible versioning scheme currently. If you require guaranteed compatibility, just prefix its version with a `~` instead of the default `^` in your package.json's dependencies. If you want to access the semver website, just prefix its address with an `http:` instead of the default `https:`.
63+
**Note:** protobuf.js uses a [semver](https://semver.org)-incompatible versioning scheme currently. For API compatibility, just prefix its version with a `~` instead of a `^` in your package.json's dependencies. If you want to access the semver website, just prefix its address with `http:` instead of `https:`.
6464

6565
```js
6666
var protobuf = require("protobufjs");

bench/index.html

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
5+
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
6+
<script src="https://cdn.rawgit.com/bestiejs/benchmark.js/2.1.3/benchmark.js"></script>
7+
<script src="https://cdn.rawgit.com/dcodeIO/long.js/3.2.0/dist/long.min.js"></script>
8+
<script src="https://cdn.rawgit.com/dcodeIO/protobuf.js/master/dist/protobuf.min.js"></script>
9+
<script>
10+
var data = {
11+
"string" : "Lorem ipsum dolor sit amet.",
12+
"uint32" : 9000,
13+
"inner" : {
14+
"int32" : 20161110,
15+
"innerInner" : {
16+
"long" : {
17+
"low": 1051,
18+
"high": 151234,
19+
"unsigned": false
20+
},
21+
"enum" : 1,
22+
"sint32": -42
23+
},
24+
"outer" : {
25+
"bool" : [ true, false, false, true, false, false, true ],
26+
"double": 204.8
27+
}
28+
},
29+
"float": 0.25
30+
};
31+
32+
var root = protobuf.parse("syntax = \"proto3\";\
33+
message Test {\
34+
string string = 1;\
35+
uint32 uint32 = 2;\
36+
Inner inner = 3;\
37+
float float = 4;\
38+
message Inner {\
39+
int32 int32 = 1;\
40+
InnerInner innerInner = 2;\
41+
Outer outer = 3;\
42+
message InnerInner {\
43+
int64 long = 1;\
44+
Enum enum = 2;\
45+
sint32 sint32 = 3;\
46+
}\
47+
}\
48+
enum Enum {\
49+
ONE = 0;\
50+
TWO = 1;\
51+
THREE = 2;\
52+
FOUR = 3;\
53+
FIVE = 4;\
54+
}\
55+
}\
56+
message Outer {\
57+
repeated bool bool = 1;\
58+
double double = 2;\
59+
}").root;
60+
61+
var Test = root.lookup("Test");
62+
var buf = Test.encode(data).finish();
63+
var msg = Test.fromObject(data);
64+
var obj = Test.toObject(msg);
65+
66+
var tests = {
67+
"encoding": {
68+
"Test.encode": "Test.encode(data).finish();",
69+
"JSON.stringify": "JSON.stringify(data)"
70+
},
71+
"Test.decode": "Test.decode(buf);",
72+
"Test.encode + decode": "Test.decode(Test.encode(data).finish());",
73+
"Test.verify": "Test.verify(data);",
74+
"Test.fromObject": "Test.fromObject(obj);",
75+
"Test.toObject": "Test.toObject(msg);"
76+
};
77+
</script>
78+
<style>body { font-family: sans-serif; } h2 { font-size: 1em; }</style>
79+
</head>
80+
<body>
81+
<h1>protobuf.js browser benchmark</h1>
82+
<script>
83+
Object.keys(tests).forEach(function(name) {
84+
document.write("<h2>" + name + "</h2>");
85+
document.write("<pre><code class=\"javascript\">" + tests[name] + "</code></pre>");
86+
});
87+
hljs.initHighlightingOnLoad();
88+
</script>
89+
</body>
90+
</html>

dist/noparse/protobuf.js

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

dist/noparse/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/noparse/protobuf.min.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/noparse/protobuf.min.js.gz

34 Bytes
Binary file not shown.

dist/noparse/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.

0 commit comments

Comments
 (0)