Permalink
Browse files

Other: Coverage progress

  • Loading branch information...
dcodeIO committed Jan 18, 2017
1 parent dfc7c43 commit 49053ffa0ea8a4ba5ae048706dba1ab6f3bc803b
@@ -1,4 +1,4 @@
# [6.5.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.5.0)
# [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))
## Breaking
[: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 @@
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0643f93f5c0d96ed0ece5b47f54993ac3a827f1b) Some cleanup and added a logo<br />
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/169638382de9efe35a1079c5f2045c33b858059a) use $protobuf.Long<br />
# [6.4.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.4.0)
# [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))
## Breaking
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/a017bf8a2dbdb7f9e7ce4c026bb6845174feb3b1) Dropped IE8 support<br />
@@ -60,7 +60,7 @@ Usage
$> npm install protobufjs [--save --save-prefix=~]
```
**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:`.
**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:`.
```js
var protobuf = require("protobufjs");
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script src="https://cdn.rawgit.com/bestiejs/benchmark.js/2.1.3/benchmark.js"></script>
<script src="https://cdn.rawgit.com/dcodeIO/long.js/3.2.0/dist/long.min.js"></script>
<script src="https://cdn.rawgit.com/dcodeIO/protobuf.js/master/dist/protobuf.min.js"></script>
<script>
var data = {
"string" : "Lorem ipsum dolor sit amet.",
"uint32" : 9000,
"inner" : {
"int32" : 20161110,
"innerInner" : {
"long" : {
"low": 1051,
"high": 151234,
"unsigned": false
},
"enum" : 1,
"sint32": -42
},
"outer" : {
"bool" : [ true, false, false, true, false, false, true ],
"double": 204.8
}
},
"float": 0.25
};
var root = protobuf.parse("syntax = \"proto3\";\
message Test {\
string string = 1;\
uint32 uint32 = 2;\
Inner inner = 3;\
float float = 4;\
message Inner {\
int32 int32 = 1;\
InnerInner innerInner = 2;\
Outer outer = 3;\
message InnerInner {\
int64 long = 1;\
Enum enum = 2;\
sint32 sint32 = 3;\
}\
}\
enum Enum {\
ONE = 0;\
TWO = 1;\
THREE = 2;\
FOUR = 3;\
FIVE = 4;\
}\
}\
message Outer {\
repeated bool bool = 1;\
double double = 2;\
}").root;
var Test = root.lookup("Test");
var buf = Test.encode(data).finish();
var msg = Test.fromObject(data);
var obj = Test.toObject(msg);
var tests = {
"encoding": {
"Test.encode": "Test.encode(data).finish();",
"JSON.stringify": "JSON.stringify(data)"
},
"Test.decode": "Test.decode(buf);",
"Test.encode + decode": "Test.decode(Test.encode(data).finish());",
"Test.verify": "Test.verify(data);",
"Test.fromObject": "Test.fromObject(obj);",
"Test.toObject": "Test.toObject(msg);"
};
</script>
<style>body { font-family: sans-serif; } h2 { font-size: 1em; }</style>
</head>
<body>
<h1>protobuf.js browser benchmark</h1>
<script>
Object.keys(tests).forEach(function(name) {
document.write("<h2>" + name + "</h2>");
document.write("<pre><code class=\"javascript\">" + tests[name] + "</code></pre>");
});
hljs.initHighlightingOnLoad();
</script>
</body>
</html>

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
BIN +34 Bytes (100%) dist/noparse/protobuf.min.js.gz
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 49053ff

Please sign in to comment.