Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 4b1b67b

Browse files
deps: bump protons-runtime from 4.0.2 to 5.0.0 (#73)
* deps: bump protons-runtime from 4.0.2 to 5.0.0 Bumps [protons-runtime](https://github.com/ipfs/protons) from 4.0.2 to 5.0.0. - [Release notes](https://github.com/ipfs/protons/releases) - [Commits](ipfs/protons@protons-runtime-v4.0.2...protons-runtime-v5.0.0) --- updated-dependencies: - dependency-name: protons-runtime dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * deps(dev): bump protons from 6.1.3 to 7.0.2 Bumps [protons](https://github.com/ipfs/protons) from 6.1.3 to 7.0.2. - [Release notes](https://github.com/ipfs/protons/releases) - [Commits](ipfs/protons@protons-v6.1.3...protons-v7.0.2) --- updated-dependencies: - dependency-name: protons dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: update protobuf def --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Potsides <[email protected]>
1 parent c8d6e6b commit 4b1b67b

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,13 @@
170170
"@libp2p/interface-dht": "^2.0.0",
171171
"@libp2p/interfaces": "^3.2.0",
172172
"multiformats": "^11.0.0",
173-
"protons-runtime": "^4.0.1",
173+
"protons-runtime": "^5.0.0",
174174
"uint8arraylist": "^2.1.1",
175175
"uint8arrays": "^4.0.2"
176176
},
177177
"devDependencies": {
178178
"@libp2p/crypto": "^1.0.11",
179179
"aegir": "^38.1.7",
180-
"protons": "^6.0.0"
180+
"protons": "^7.0.2"
181181
}
182182
}

src/record.ts

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/* eslint-disable complexity */
33
/* eslint-disable @typescript-eslint/no-namespace */
44
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
5+
/* eslint-disable @typescript-eslint/no-empty-interface */
56

67
import { encodeMessage, decodeMessage, message } from 'protons-runtime'
7-
import type { Uint8ArrayList } from 'uint8arraylist'
88
import type { Codec } from 'protons-runtime'
9+
import type { Uint8ArrayList } from 'uint8arraylist'
910

1011
export interface Record {
1112
key: Uint8Array
@@ -23,17 +24,17 @@ export namespace Record {
2324
w.fork()
2425
}
2526

26-
if (opts.writeDefaults === true || (obj.key != null && obj.key.byteLength > 0)) {
27+
if ((obj.key != null && obj.key.byteLength > 0)) {
2728
w.uint32(10)
2829
w.bytes(obj.key)
2930
}
3031

31-
if (opts.writeDefaults === true || (obj.value != null && obj.value.byteLength > 0)) {
32+
if ((obj.value != null && obj.value.byteLength > 0)) {
3233
w.uint32(18)
3334
w.bytes(obj.value)
3435
}
3536

36-
if (opts.writeDefaults === true || obj.timeReceived !== '') {
37+
if ((obj.timeReceived != null && obj.timeReceived !== '')) {
3738
w.uint32(42)
3839
w.string(obj.timeReceived)
3940
}
@@ -76,7 +77,7 @@ export namespace Record {
7677
return _codec
7778
}
7879

79-
export const encode = (obj: Record): Uint8Array => {
80+
export const encode = (obj: Partial<Record>): Uint8Array => {
8081
return encodeMessage(obj, Record.codec())
8182
}
8283

0 commit comments

Comments
 (0)