@bufbuild/protobuf 2.6.1 → 2.6.2

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.
@@ -53,5 +53,5 @@ function timestampFromMs(timestampMs) {
53
53
  * Convert a google.protobuf.Timestamp to a Unix timestamp in milliseconds.
54
54
  */
55
55
  function timestampMs(timestamp) {
56
- return (Number(timestamp.seconds) * 1000 + Math.ceil(timestamp.nanos / 1000000));
56
+ return (Number(timestamp.seconds) * 1000 + Math.round(timestamp.nanos / 1000000));
57
57
  }
@@ -46,5 +46,5 @@ export function timestampFromMs(timestampMs) {
46
46
  * Convert a google.protobuf.Timestamp to a Unix timestamp in milliseconds.
47
47
  */
48
48
  export function timestampMs(timestamp) {
49
- return (Number(timestamp.seconds) * 1000 + Math.ceil(timestamp.nanos / 1000000));
49
+ return (Number(timestamp.seconds) * 1000 + Math.round(timestamp.nanos / 1000000));
50
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bufbuild/protobuf",
3
- "version": "2.6.1",
3
+ "version": "2.6.2",
4
4
  "license": "(Apache-2.0 AND BSD-3-Clause)",
5
5
  "description": "A complete implementation of Protocol Buffers in TypeScript, suitable for web browsers and Node.js.",
6
6
  "keywords": ["protobuf", "schema", "typescript", "ecmascript"],