Skip to content

Commit b1b6a81

Browse files
committed
Other: Updated test cases
1 parent 5b9ade4 commit b1b6a81

14 files changed

+24
-19
lines changed

.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"curly": 0, // sometimes more braces than code
3535
"default-case": 0, // just forces unnecessary code
3636
"dot-location": 0, // looks nicer for chainables
37-
"dot-notation": 0, // not compatible with reserved properties
37+
"dot-notation": 0, // not compatible with some reserved properties
3838
"eqeqeq": 1,
3939
"guard-for-in": 1,
4040
"no-alert": 1,

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
# [6.3.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.3.0)
22

33
## Breaking
4+
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/5b9ade428dca2df6a13277522f2916e22092a98b) Moved JSON/Message conversion to its own source file and added Message/Type.from + test case, see [#575](https://github.com/dcodeIO/protobuf.js/issues/575)<br />
45
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0b0de2458a1ade1ccd4ceb789697be13290f856b) Relicensed the library and its components to BSD-3-Clause to match the official implementation (again)<br />
56
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22a64c641d4897965035cc80e92667bd243f182f) Dropped support for browser buffer entirely (is an Uint8Array anyway), ensures performance and makes things simpler<br />
67
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22a64c641d4897965035cc80e92667bd243f182f) Removed dead parts of the Reader API<br />
78
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/964f65a9dd94ae0a18b8be3d9a9c1b0b1fdf6424) Refactored BufferReader/Writer to their own files and removed unnecessary operations (node always has FloatXXArray and browser buffer uses ieee anyway)<br />
89
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bfac0ea9afa3dbaf5caf79ddf0600c3c7772a538) Stripped out fallback encoder/decoder/verifier completely (even IE8 supports codegen), significantly reduces bundle size, can use static codegen elsewhere<br />
910

1011
## Fixed
12+
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/33706cdc201bc863774c4af6ac2c38ad96a276e6) Properly set long defaults on prototypes<br />
13+
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/0ea2740f0774b4c5c349b9c303f3fb2c2743c37b) Fixed reference error in minimal runtime, see [#580](https://github.com/dcodeIO/protobuf.js/issues/580)<br />
14+
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/741b6d8fde84d9574676a729a29a428d99f0a0a0) Non-repeated empty messages are always present on the wire, see [#581](https://github.com/dcodeIO/protobuf.js/issues/581)<br />
1115
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7fac9d6a39bf42d316c1676082a2d0804bc55934) Properly check Buffer.prototype.set with node v4<br />
1216
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ad8108eab57e2b061ee6f1fddf964abe3f4cbc7) Prevent NRE and properly annotate verify signature in tsd-jsdoc, fixed [#572](https://github.com/dcodeIO/protobuf.js/issues/572)<br />
1317
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6c2415d599847cbdadc17dee3cdf369fc9facade) Fix directly using Buffer instead of util.Buffer<br />
@@ -41,6 +45,7 @@
4145
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7939a4bd8baca5f7e07530fc93f27911a6d91c6f) Updated README and bundler according to dynamic require calls<br />
4246

4347
## Other
48+
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99dc5faa7b39fdad8ebc102de4463f8deb7f48ff) Added assumptions to float test case<br />
4449
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/948ca2e3c5c62fedcd918d75539c261abf1a7347) Updated travis config to use C++11<br />
4550
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c59647a7542cbc4292248787e5f32bb99a9b8d46) Updated / added additional LICENSE files where appropriate<br />
4651
[:hash:](https://github.com/dcodeIO/protobuf.js/commit/333f0221814be976874862dc83d0b216e07d4012) Integrated changelog into build process, now also has 'npm run make' for everything, see [#574](https://github.com/dcodeIO/protobuf.js/issues/574)<br />

dist/protobuf.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

16 Bytes
Binary file not shown.

dist/protobuf.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js.gz

16 Bytes
Binary file not shown.

dist/runtime/protobuf.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/writer_buffer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ BufferWriter.alloc = function alloc_buffer(size) {
3434
})(size);
3535
};
3636

37-
var writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array
37+
var writeBytesBuffer = Buffer && Buffer.prototype instanceof Uint8Array && Buffer.prototype.set.name[0] === "s"
3838
? function writeBytesBuffer_set(val, buf, pos) {
39-
buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array)
39+
buf.set(val, pos); // faster than copy (requires node >= 4 where Buffers extend Uint8Array and set is properly inherited)
4040
}
4141
: function writeBytesBuffer_copy(val, buf, pos) {
4242
val.copy(buf, pos, 0, val.length);

tests/convert.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ tape.test("convert", function(test) {
2020
test.same(obj.uint64Val, { low: 0, high: 0, unsigned: true }, "should set uint64Val");
2121
test.same(obj.uint64Repeated, [], "should set uint64Repeated");
2222

23-
test.same(obj.bytesVal, protobuf.util.newBuffer(0), "should set bytesVal");
23+
test.same(obj.bytesVal, [], "should set bytesVal");
2424
test.same(obj.bytesRepeated, [], "should set bytesRepeated");
2525

2626
test.equal(obj.enumVal, 0, "should set enumVal");

0 commit comments

Comments
 (0)