Skip to content

Commit

Permalink
deps: bump protons-runtime from 4.0.2 to 5.0.0 (#73)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* 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] <support@github.com>

* chore: update protobuf def

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Potsides <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain committed Mar 10, 2023
1 parent c8d6e6b commit 4b1b67b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@
"@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"
},
"devDependencies": {
"@libp2p/crypto": "^1.0.11",
"aegir": "^38.1.7",
"protons": "^6.0.0"
"protons": "^7.0.2"
}
}
11 changes: 6 additions & 5 deletions src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
Expand Down Expand Up @@ -76,7 +77,7 @@ export namespace Record {
return _codec
}

export const encode = (obj: Record): Uint8Array => {
export const encode = (obj: Partial<Record>): Uint8Array => {
return encodeMessage(obj, Record.codec())
}

Expand Down

0 comments on commit 4b1b67b

Please sign in to comment.