Skip to content

Commit

Permalink
chore: update project config (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain authored Jul 31, 2022
1 parent cc3c27a commit 345e663
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ updates:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
12 changes: 8 additions & 4 deletions packages/libp2p-daemon-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -103,7 +103,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand Down
5 changes: 4 additions & 1 deletion packages/libp2p-daemon-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { peerIdFromBytes } from '@libp2p/peer-id'
import type { Duplex } from 'it-stream-types'
import type { CID } from 'multiformats/cid'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import type { MultiaddrConnection } from '@libp2p/interface-connection'

class Client implements DaemonClient {
private readonly multiaddr: Multiaddr
Expand All @@ -33,7 +34,9 @@ class Client implements DaemonClient {
* @async
* @returns {MultiaddrConnection}
*/
async connectDaemon () {
async connectDaemon (): Promise<MultiaddrConnection> {
// @ts-expect-error because we use a passthrough upgrader,
// this is actually a MultiaddrConnection and not a Connection
return await this.tcp.dial(this.multiaddr, {
upgrader: passThroughUpgrader
})
Expand Down
12 changes: 8 additions & 4 deletions packages/libp2p-daemon-protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -129,7 +129,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand Down
12 changes: 8 additions & 4 deletions packages/libp2p-daemon-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -107,7 +107,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand Down
2 changes: 2 additions & 0 deletions packages/libp2p-daemon-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export class Server implements Libp2pServer {
// And then begin piping the client and peer connection
void pipe(
[encodedMessage, stream.source],
// @ts-expect-error because we use a passthrough upgrader,
// this is actually a MultiaddrConnection and not a Connection
clientConnection,
stream.sink
).catch(err => {
Expand Down
12 changes: 8 additions & 4 deletions packages/libp2p-daemon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -106,7 +106,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand Down
3 changes: 1 addition & 2 deletions packages/libp2p-daemon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import yargs from 'yargs'
// @ts-expect-error no types
import YargsPromise from 'yargs-promise'
import type { Libp2pServer } from '@libp2p/daemon-server'
// @ts-expect-error no types
import esMain from 'es-main'

const args = process.argv.slice(2)
Expand Down Expand Up @@ -129,7 +128,7 @@ export async function createLibp2pServer (listenAddr: Multiaddr, argv: any): Pro
throw new Error('Not implemented yet')
}

if (esMain(import.meta) === true) {
if (esMain(import.meta)) {
main(process.argv)
.catch((err) => {
console.error(err)
Expand Down

0 comments on commit 345e663

Please sign in to comment.