Skip to content

Commit

Permalink
deps(dev): bump protons from 6.1.3 to 7.0.2 (#87)
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] <[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 pb generated file

* chore: update ignores

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <[email protected]>
  • Loading branch information
dependabot[bot] and achingbrain authored Feb 23, 2023
1 parent e8637fa commit a156e0e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 68 deletions.
45 changes: 6 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,9 @@
**/node_modules/
**/*.log
test/repo-tests*
**/bundle.js
docs
# Logs
logs
*.log

coverage

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

build

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

lib
build
dist
test/test-data/go-ipfs-repo/LOCK
test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old

# while testing npm5
.docs
.coverage
node_modules
package-lock.json
yarn.lock
.vscode
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@
"p-defer": "^4.0.0",
"p-retry": "^5.1.0",
"p-wait-for": "^5.0.0",
"protons-runtime": "^4.0.2",
"protons-runtime": "^5.0.0",
"uint8arraylist": "^2.4.3",
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^38.1.0",
"protons": "^6.1.3"
"protons": "^7.0.2"
},
"peerDependencies": {
"aegir": "*"
Expand Down
44 changes: 17 additions & 27 deletions src/relay/pb/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
/* eslint-disable @typescript-eslint/no-empty-interface */

import { enumeration, encodeMessage, decodeMessage, message } from 'protons-runtime'
import type { Uint8ArrayList } from 'uint8arraylist'
import type { Codec } from 'protons-runtime'
import type { Uint8ArrayList } from 'uint8arraylist'

export interface HopMessage {
type?: HopMessage.Type
Expand Down Expand Up @@ -51,23 +51,17 @@ export namespace HopMessage {

if (obj.peer != null) {
w.uint32(18)
Peer.codec().encode(obj.peer, w, {
writeDefaults: false
})
Peer.codec().encode(obj.peer, w)
}

if (obj.reservation != null) {
w.uint32(26)
Reservation.codec().encode(obj.reservation, w, {
writeDefaults: false
})
Reservation.codec().encode(obj.reservation, w)
}

if (obj.limit != null) {
w.uint32(34)
Limit.codec().encode(obj.limit, w, {
writeDefaults: false
})
Limit.codec().encode(obj.limit, w)
}

if (obj.status != null) {
Expand Down Expand Up @@ -115,7 +109,7 @@ export namespace HopMessage {
return _codec
}

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

Expand Down Expand Up @@ -164,16 +158,12 @@ export namespace StopMessage {

if (obj.peer != null) {
w.uint32(18)
Peer.codec().encode(obj.peer, w, {
writeDefaults: false
})
Peer.codec().encode(obj.peer, w)
}

if (obj.limit != null) {
w.uint32(26)
Limit.codec().encode(obj.limit, w, {
writeDefaults: false
})
Limit.codec().encode(obj.limit, w)
}

if (obj.status != null) {
Expand Down Expand Up @@ -218,7 +208,7 @@ export namespace StopMessage {
return _codec
}

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

Expand All @@ -242,7 +232,7 @@ export namespace Peer {
w.fork()
}

if (opts.writeDefaults === true || (obj.id != null && obj.id.byteLength > 0)) {
if ((obj.id != null && obj.id.byteLength > 0)) {
w.uint32(10)
w.bytes(obj.id)
}
Expand Down Expand Up @@ -288,7 +278,7 @@ export namespace Peer {
return _codec
}

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

Expand All @@ -313,7 +303,7 @@ export namespace Reservation {
w.fork()
}

if (opts.writeDefaults === true || obj.expire !== 0n) {
if ((obj.expire != null && obj.expire !== 0n)) {
w.uint32(8)
w.uint64(obj.expire)
}
Expand Down Expand Up @@ -367,7 +357,7 @@ export namespace Reservation {
return _codec
}

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

Expand Down Expand Up @@ -432,7 +422,7 @@ export namespace Limit {
return _codec
}

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

Expand Down Expand Up @@ -486,17 +476,17 @@ export namespace ReservationVoucher {
w.fork()
}

if (opts.writeDefaults === true || (obj.relay != null && obj.relay.byteLength > 0)) {
if ((obj.relay != null && obj.relay.byteLength > 0)) {
w.uint32(10)
w.bytes(obj.relay)
}

if (opts.writeDefaults === true || (obj.peer != null && obj.peer.byteLength > 0)) {
if ((obj.peer != null && obj.peer.byteLength > 0)) {
w.uint32(18)
w.bytes(obj.peer)
}

if (opts.writeDefaults === true || obj.expiration !== 0n) {
if ((obj.expiration != null && obj.expiration !== 0n)) {
w.uint32(24)
w.uint64(obj.expiration)
}
Expand Down Expand Up @@ -539,7 +529,7 @@ export namespace ReservationVoucher {
return _codec
}

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

Expand Down

0 comments on commit a156e0e

Please sign in to comment.