Skip to content

Commit

Permalink
deps!: update multiformats, protons and uint8arrays (#189)
Browse files Browse the repository at this point in the history
Non breaking but releasing as a major to prevent dep duplication
  • Loading branch information
achingbrain authored Oct 17, 2022
1 parent e4f76b0 commit 645c3b8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@
"cborg": "^1.3.3",
"err-code": "^3.0.1",
"interface-datastore": "^7.0.0",
"multiformats": "^9.4.5",
"protons-runtime": "^3.1.0",
"multiformats": "^10.0.0",
"protons-runtime": "^4.0.1",
"timestamp-nano": "^1.0.0",
"uint8arrays": "^3.0.0"
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"@libp2p/peer-id-factory": "^1.0.9",
"aegir": "^37.0.11",
"protons": "^5.1.0"
"protons": "^6.0.1"
}
}
44 changes: 23 additions & 21 deletions src/pb/ipns.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/* eslint-disable import/export */
/* eslint-disable complexity */
/* eslint-disable @typescript-eslint/no-namespace */
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */

import { enumeration, encodeMessage, decodeMessage, message } from 'protons-runtime'
import type { Uint8ArrayList } from 'uint8arraylist'
Expand Down Expand Up @@ -36,58 +38,58 @@ export namespace IpnsEntry {

export const codec = (): Codec<IpnsEntry> => {
if (_codec == null) {
_codec = message<IpnsEntry>((obj, writer, opts = {}) => {
_codec = message<IpnsEntry>((obj, w, opts = {}) => {
if (opts.lengthDelimited !== false) {
writer.fork()
w.fork()
}

if (obj.value != null) {
writer.uint32(10)
writer.bytes(obj.value)
w.uint32(10)
w.bytes(obj.value)
}

if (obj.signature != null) {
writer.uint32(18)
writer.bytes(obj.signature)
w.uint32(18)
w.bytes(obj.signature)
}

if (obj.validityType != null) {
writer.uint32(24)
IpnsEntry.ValidityType.codec().encode(obj.validityType, writer)
w.uint32(24)
IpnsEntry.ValidityType.codec().encode(obj.validityType, w)
}

if (obj.validity != null) {
writer.uint32(34)
writer.bytes(obj.validity)
w.uint32(34)
w.bytes(obj.validity)
}

if (obj.sequence != null) {
writer.uint32(40)
writer.uint64(obj.sequence)
w.uint32(40)
w.uint64(obj.sequence)
}

if (obj.ttl != null) {
writer.uint32(48)
writer.uint64(obj.ttl)
w.uint32(48)
w.uint64(obj.ttl)
}

if (obj.pubKey != null) {
writer.uint32(58)
writer.bytes(obj.pubKey)
w.uint32(58)
w.bytes(obj.pubKey)
}

if (obj.signatureV2 != null) {
writer.uint32(66)
writer.bytes(obj.signatureV2)
w.uint32(66)
w.bytes(obj.signatureV2)
}

if (obj.data != null) {
writer.uint32(74)
writer.bytes(obj.data)
w.uint32(74)
w.bytes(obj.data)
}

if (opts.lengthDelimited !== false) {
writer.ldelim()
w.ldelim()
}
}, (reader, length) => {
const obj: any = {}
Expand Down

0 comments on commit 645c3b8

Please sign in to comment.