Skip to content

Commit

Permalink
deps(dev): bump aegir from 37.12.1 to 38.1.0 (#302)
Browse files Browse the repository at this point in the history
* deps(dev): bump aegir from 37.12.1 to 38.1.0

Bumps [aegir](https://github.com/ipfs/aegir) from 37.12.1 to 38.1.0.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v37.12.1...v38.1.0)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: lint

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marin Petrunic <marin.petrunic@gmail.com>
  • Loading branch information
dependabot[bot] and mpetrunic authored Jan 17, 2023
1 parent fe760d3 commit 534d8fa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
},
"devDependencies": {
"@types/varint": "^6.0.0",
"aegir": "^37.9.1",
"aegir": "^38.1.0",
"sinon": "^15.0.0",
"util": "^0.12.3"
},
Expand Down
4 changes: 3 additions & 1 deletion src/codec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function stringToStringTuples (str: string): string[][] {

if (proto.size === 0) {
tuples.push([part])
// eslint-disable-next-line no-continue
continue
}

Expand All @@ -33,7 +34,7 @@ export function stringToStringTuples (str: string): string[][] {
if (proto.path === true) {
tuples.push([
part,
// TODO: should we need to check each path part to see if it's a proto?
// should we need to check each path part to see if it's a proto?
// This would allow for other protocols to be added after a unix path,
// however it would have issues if the path had a protocol name in the path
cleanPath(parts.slice(p).join('/'))
Expand Down Expand Up @@ -139,6 +140,7 @@ export function bytesToTuples (buf: Uint8Array): Tuple[] {
if (size === 0) {
tuples.push([code])
i += n
// eslint-disable-next-line no-continue
continue
}

Expand Down
2 changes: 1 addition & 1 deletion src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function mb2bytes (mbstr: string): Uint8Array {
const size = Uint8Array.from(varint.encode(mb.length))
return uint8ArrayConcat([size, mb], size.length + mb.length)
}
function bytes2mb (buf: Uint8Array) {
function bytes2mb (buf: Uint8Array): string {
const size = varint.decode(buf)
const hash = buf.slice(varint.decode.bytes)

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,15 +510,15 @@ class DefaultMultiaddr implements Multiaddr {
}
}

toString () {
toString (): string {
if (this.#string == null) {
this.#string = codec.bytesToString(this.bytes)
}

return this.#string
}

toJSON () {
toJSON (): string {
return this.toString()
}

Expand Down
2 changes: 1 addition & 1 deletion src/ip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const toBytes = function (ip: string): Uint8Array {
}

// Copied from https://github.com/indutny/node-ip/blob/master/lib/ip.js#L63
export const toString = function (buf: Uint8Array, offset: number = 0, length?: number) {
export const toString = function (buf: Uint8Array, offset: number = 0, length?: number): string {
offset = ~~offset
length = length ?? (buf.length - offset)

Expand Down

0 comments on commit 534d8fa

Please sign in to comment.