From 85e501f5da6dca21f2af8c110cc9f48a28efb046 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Feb 2023 10:07:48 +0000 Subject: [PATCH 1/3] 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](https://github.com/ipfs/protons/compare/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] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28f75b7..8365dae 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@libp2p/interface-dht": "^2.0.0", "@libp2p/interfaces": "^3.2.0", "multiformats": "^11.0.0", - "protons-runtime": "^4.0.1", + "protons-runtime": "^5.0.0", "uint8arraylist": "^2.1.1", "uint8arrays": "^4.0.2" }, From bd2815a06959b335164b241749af7d4a23b8a344 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Feb 2023 10:11:47 +0000 Subject: [PATCH 2/3] 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](https://github.com/ipfs/protons/compare/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] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 28f75b7..bad1c2f 100644 --- a/package.json +++ b/package.json @@ -177,6 +177,6 @@ "devDependencies": { "@libp2p/crypto": "^1.0.11", "aegir": "^37.9.1", - "protons": "^6.0.0" + "protons": "^7.0.2" } } From 2f5d535345d3c50a65d7a07dc347600daa74ffc4 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Fri, 10 Mar 2023 10:51:10 +0100 Subject: [PATCH 3/3] chore: update protobuf def --- src/record.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/record.ts b/src/record.ts index e5c5ca7..89da228 100644 --- a/src/record.ts +++ b/src/record.ts @@ -2,10 +2,11 @@ /* eslint-disable complexity */ /* eslint-disable @typescript-eslint/no-namespace */ /* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */ +/* eslint-disable @typescript-eslint/no-empty-interface */ import { encodeMessage, decodeMessage, message } from 'protons-runtime' -import type { Uint8ArrayList } from 'uint8arraylist' import type { Codec } from 'protons-runtime' +import type { Uint8ArrayList } from 'uint8arraylist' export interface Record { key: Uint8Array @@ -23,17 +24,17 @@ export namespace Record { w.fork() } - if (opts.writeDefaults === true || (obj.key != null && obj.key.byteLength > 0)) { + if ((obj.key != null && obj.key.byteLength > 0)) { w.uint32(10) w.bytes(obj.key) } - if (opts.writeDefaults === true || (obj.value != null && obj.value.byteLength > 0)) { + if ((obj.value != null && obj.value.byteLength > 0)) { w.uint32(18) w.bytes(obj.value) } - if (opts.writeDefaults === true || obj.timeReceived !== '') { + if ((obj.timeReceived != null && obj.timeReceived !== '')) { w.uint32(42) w.string(obj.timeReceived) } @@ -76,7 +77,7 @@ export namespace Record { return _codec } - export const encode = (obj: Record): Uint8Array => { + export const encode = (obj: Partial): Uint8Array => { return encodeMessage(obj, Record.codec()) }