Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

deps(dev): bump aegir from 37.12.1 to 38.1.7 #54

Merged
merged 2 commits into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
node_modules
build
dist
.docs
.coverage
node_modules
package-lock.json
yarn.lock

go-libp2p-webtransport-server/main
.vscode
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"uint8arraylist": "^2.3.3"
},
"devDependencies": {
"aegir": "^37.5.6",
"aegir": "^38.1.7",
"libp2p": "^0.42.0"
},
"browser": {
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function webtransportBiDiStreamToStream (bidiStream: any, streamId: string
const reader = bidiStream.readable.getReader()
await writer.ready

function cleanupStreamFromActiveStreams () {
function cleanupStreamFromActiveStreams (): void {
const index = activeStreams.findIndex(s => s === stream)
if (index !== -1) {
activeStreams.splice(index, 1)
Expand Down Expand Up @@ -138,7 +138,7 @@ async function webtransportBiDiStreamToStream (bidiStream: any, streamId: string
stream.close()
},
stat: {
direction: direction,
direction,
timeline: { open: Date.now() }
},
metadata: {},
Expand Down Expand Up @@ -276,7 +276,7 @@ class WebTransport implements Transport {
}
}

get [Symbol.toStringTag] () {
get [Symbol.toStringTag] (): '@libp2p/webtransport' {
return '@libp2p/webtransport'
}

Expand Down Expand Up @@ -476,7 +476,7 @@ class WebTransport implements Transport {
/**
* Takes a list of `Multiaddr`s and returns only valid webtransport addresses.
*/
filter (multiaddrs: Multiaddr[]) {
filter (multiaddrs: Multiaddr[]): Multiaddr[] {
return multiaddrs.filter(ma => ma.protoNames().includes('webtransport'))
}
}
Expand Down
4 changes: 2 additions & 2 deletions test/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('libp2p-webtransport', () => {
res = Date.now() - now
})())

await stream.close()
stream.close()

expect(res).to.be.greaterThan(-1)
}
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('libp2p-webtransport', () => {
connectionEncryption: [noise()]
})

async function * gen () {
async function * gen (): AsyncGenerator<Uint8Array, void, unknown> {
yield new Uint8Array([0])
yield new Uint8Array([1, 2, 3, 4])
yield new Uint8Array([5, 6, 7])
Expand Down