Skip to content

Commit

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

Bumps [aegir](https://github.com/ipfs/aegir) from 37.12.1 to 38.1.7.
- [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.7)

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

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

* chore: fix linting

* chore: update project

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain authored Mar 17, 2023
1 parent de1c3d8 commit 2c262ba
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
node_modules
build
dist
.docs
.coverage
node_modules
package-lock.json
yarn.lock
.vscode
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,9 @@
"uint8arraylist": "^2.3.2"
},
"devDependencies": {
"aegir": "^37.2.0",
"aegir": "^38.1.7",
"it-all": "^2.0.0",
"it-map": "^2.0.0",
"it-pair": "^2.0.2",
"it-pipe": "^2.0.2",
"p-defer": "^4.0.0",
"uint8arrays": "^4.0.2"
Expand Down
4 changes: 2 additions & 2 deletions src/array-equals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
* Verify if two arrays of non primitive types with the "equals" function are equal.
* Compatible with multiaddr, peer-id and others.
*/
export function arrayEquals (a: any[], b: any[]) {
const sort = (a: any, b: any) => a.toString().localeCompare(b.toString())
export function arrayEquals (a: any[], b: any[]): boolean {
const sort = (a: any, b: any): number => a.toString().localeCompare(b.toString())

if (a.length !== b.length) {
return false
Expand Down
4 changes: 2 additions & 2 deletions src/ip-port-to-multiaddr.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger } from '@libp2p/logger'
import { multiaddr } from '@multiformats/multiaddr'
import { Multiaddr, multiaddr } from '@multiformats/multiaddr'
import { CodeError } from '@libp2p/interfaces/errors'
import { Address4, Address6 } from '@achingbrain/ip-address'

Expand All @@ -14,7 +14,7 @@ export const Errors = {
/**
* Transform an IP, Port pair into a multiaddr
*/
export function ipPortToMultiaddr (ip: string, port: number | string) {
export function ipPortToMultiaddr (ip: string, port: number | string): Multiaddr {
if (typeof ip !== 'string') {
throw new CodeError(`invalid ip provided: ${ip}`, Errors.ERR_INVALID_IP_PARAMETER) // eslint-disable-line @typescript-eslint/restrict-template-expressions
}
Expand Down
2 changes: 1 addition & 1 deletion src/multiaddr/is-loopback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Multiaddr } from '@multiformats/multiaddr'
/**
* Check if a given multiaddr is a loopback address.
*/
export function isLoopback (ma: Multiaddr) {
export function isLoopback (ma: Multiaddr): boolean {
const { address } = ma.nodeAddress()

return isLoopbackAddr(address)
Expand Down
2 changes: 1 addition & 1 deletion src/multiaddr/is-private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import isIpPrivate from 'private-ip'
/**
* Check if a given multiaddr has a private address.
*/
export function isPrivate (ma: Multiaddr) {
export function isPrivate (ma: Multiaddr): boolean {
const { address } = ma.nodeAddress()

return Boolean(isIpPrivate(address))
Expand Down
6 changes: 3 additions & 3 deletions src/stream-to-ma-conn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface StreamProperties {
* Convert a duplex iterable into a MultiaddrConnection.
* https://github.com/libp2p/interface-transport#multiaddrconnection
*/
export function streamToMaConnection (props: StreamProperties, options: StreamOptions = {}) {
export function streamToMaConnection (props: StreamProperties, options: StreamOptions = {}): MultiaddrConnection {
const { stream, remoteAddr } = props
const { sink, source } = stream

Expand Down Expand Up @@ -80,11 +80,11 @@ export function streamToMaConnection (props: StreamProperties, options: StreamOp
}
}

async function close () {
async function close (): Promise<void> {
if (maConn.timeline.close == null) {
maConn.timeline.close = Date.now()
}
return await Promise.resolve()
await Promise.resolve()
}

return maConn
Expand Down
2 changes: 1 addition & 1 deletion test/stream-to-ma-conn.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type { Stream } from '@libp2p/interface-connection'
import type { Duplex } from 'it-stream-types'
import type { Uint8ArrayList } from 'uint8arraylist'

function toMuxedStream (stream: Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array>) {
function toMuxedStream (stream: Duplex<Uint8ArrayList, Uint8ArrayList | Uint8Array>): Stream {
const muxedStream: Stream = {
...stream,
close: () => {},
Expand Down

0 comments on commit 2c262ba

Please sign in to comment.