Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: libp2p/js-libp2p-daemon
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @libp2p/daemon-protocol-7.0.1
Choose a base ref
...
head repository: libp2p/js-libp2p-daemon
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 17 commits
  • 17 files changed
  • 3 contributors

Commits on Nov 8, 2024

  1. fix: export interface

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    0643ac9 View commit details
  2. fix: update project config

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    4cf3a98 View commit details
  3. fix: fix mismatched versions

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    c6d619f View commit details
  4. fix: more mismatched versions

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    327942a View commit details
  5. fix: mismatched versions

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    98500b8 View commit details
  6. chore(release): 7.0.3 [skip ci]

    ## [@libp2p/daemon-protocol-v7.0.3](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-protocol-7.0.2...@libp2p/daemon-protocol-7.0.3) (2024-11-08)
    
    ### Bug Fixes
    
    * fix mismatched versions ([c6d619f](c6d619f))
    * update project config ([4cf3a98](4cf3a98))
    semantic-release-bot committed Nov 8, 2024
    Copy the full SHA
    4af27f0 View commit details
  7. chore(release): 8.0.3 [skip ci]

    ## [@libp2p/daemon-server-v8.0.3](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-server-8.0.2...@libp2p/daemon-server-8.0.3) (2024-11-08)
    
    ### Bug Fixes
    
    * fix mismatched versions ([c6d619f](c6d619f))
    * mismatched versions ([98500b8](98500b8))
    * update project config ([4cf3a98](4cf3a98))
    semantic-release-bot committed Nov 8, 2024
    Copy the full SHA
    0276e8c View commit details
  8. chore(release): 5.0.1 [skip ci]

    ## [@libp2p/daemon-v5.0.1](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-5.0.0...@libp2p/daemon-5.0.1) (2024-11-08)
    
    ### Bug Fixes
    
    * more mismatched versions ([327942a](327942a))
    * update project config ([4cf3a98](4cf3a98))
    
    ### Dependencies
    
    * bump aegir from 44.1.4 to 45.0.1 ([#280](#280)) ([e322ae9](e322ae9))
    * **dev:** bump sinon from 18.0.1 to 19.0.2 ([#276](#276)) ([278cb24](278cb24))
    semantic-release-bot committed Nov 8, 2024
    Copy the full SHA
    89c3218 View commit details
  9. chore(release): 9.0.3 [skip ci]

    ## [@libp2p/daemon-client-v9.0.3](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.2...@libp2p/daemon-client-9.0.3) (2024-11-08)
    
    ### Bug Fixes
    
    * fix mismatched versions ([c6d619f](c6d619f))
    * more mismatched versions ([327942a](327942a))
    * update project config ([4cf3a98](4cf3a98))
    semantic-release-bot committed Nov 8, 2024
    Copy the full SHA
    fe0792b View commit details
  10. fix: ts-expect-error masking actual error

    achingbrain committed Nov 8, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    25381fc View commit details
  11. chore(release): 9.0.4 [skip ci]

    ## [@libp2p/daemon-client-v9.0.4](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.3...@libp2p/daemon-client-9.0.4) (2024-11-08)
    
    ### Bug Fixes
    
    * ts-expect-error masking actual error ([25381fc](25381fc))
    semantic-release-bot committed Nov 8, 2024
    Copy the full SHA
    2be16e0 View commit details

Commits on Feb 24, 2025

  1. fix: update upgrader

    achingbrain committed Feb 24, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    achingbrain Alex Potsides
    Copy the full SHA
    e3a3feb View commit details
  2. Copy the full SHA
    36886e9 View commit details
  3. deps: bump it-length-prefixed from 9.1.1 to 10.0.1 (#284)

    Bumps [it-length-prefixed](https://github.com/alanshaw/it-length-prefixed) from 9.1.1 to 10.0.1.
    - [Release notes](https://github.com/alanshaw/it-length-prefixed/releases)
    - [Changelog](https://github.com/alanshaw/it-length-prefixed/blob/master/CHANGELOG.md)
    - [Commits](alanshaw/it-length-prefixed@v9.1.1...v10.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: it-length-prefixed
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Alex Potsides <[email protected]>
    dependabot[bot] and achingbrain authored Feb 24, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    48dcb19 View commit details
  4. fix: pass abort signal to dial (#285)

    achingbrain authored Feb 24, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a739825 View commit details
  5. chore(release): 8.0.4 [skip ci]

    ## [@libp2p/daemon-server-v8.0.4](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-server-8.0.3...@libp2p/daemon-server-8.0.4) (2025-02-24)
    
    ### Bug Fixes
    
    * pass abort signal to dial ([#285](#285)) ([a739825](a739825))
    
    ### Dependencies
    
    * bump it-length-prefixed from 9.1.1 to 10.0.1 ([#284](#284)) ([48dcb19](48dcb19))
    semantic-release-bot committed Feb 24, 2025
    Copy the full SHA
    0a716ce View commit details
  6. chore(release): 9.0.5 [skip ci]

    ## [@libp2p/daemon-client-v9.0.5](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.4...@libp2p/daemon-client-9.0.5) (2025-02-24)
    
    ### Bug Fixes
    
    * pass abort signal to dial ([#285](#285)) ([a739825](a739825))
    semantic-release-bot committed Feb 24, 2025
    Copy the full SHA
    f047229 View commit details
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# js-libp2p-daemon

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
@@ -7,10 +9,10 @@
# Packages

- [`/packages/libp2p-daemon`](./packages/libp2p-daemon) libp2p-daemon JavaScript implementation
- [`/packages/libp2p-daemon-client`](./packages/libp2p-daemon-client) libp2p-daemon client implementation
- [`/packages/libp2p-daemon-protocol`](./packages/libp2p-daemon-protocol) Communication protocol between libp2p daemons and clients
- [`/packages/libp2p-daemon-server`](./packages/libp2p-daemon-server) API server for libp2p-daemon instances
- [`packages/libp2p-daemon`](https://github.com/libp2p/js-libp2p-daemon/tree/main/packages/libp2p-daemon) libp2p-daemon JavaScript implementation
- [`packages/libp2p-daemon-client`](https://github.com/libp2p/js-libp2p-daemon/tree/main/packages/libp2p-daemon-client) libp2p-daemon client implementation
- [`packages/libp2p-daemon-protocol`](https://github.com/libp2p/js-libp2p-daemon/tree/main/packages/libp2p-daemon-protocol) Communication protocol between libp2p daemons and clients
- [`packages/libp2p-daemon-server`](https://github.com/libp2p/js-libp2p-daemon/tree/main/packages/libp2p-daemon-server) API server for libp2p-daemon instances

# API Docs

@@ -20,8 +22,8 @@

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-daemon/blob/main/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-daemon/blob/main/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

85 changes: 0 additions & 85 deletions package.json
Original file line number Diff line number Diff line change
@@ -16,91 +16,6 @@
"libp2p"
],
"private": true,
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
"test": "aegir run test",
20 changes: 20 additions & 0 deletions packages/libp2p-daemon-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
## [@libp2p/daemon-client-v9.0.5](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.4...@libp2p/daemon-client-9.0.5) (2025-02-24)

### Bug Fixes

* pass abort signal to dial ([#285](https://github.com/libp2p/js-libp2p-daemon/issues/285)) ([a739825](https://github.com/libp2p/js-libp2p-daemon/commit/a7398251d9c77f357ffcacb83fa7ebcd1039b114))

## [@libp2p/daemon-client-v9.0.4](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.3...@libp2p/daemon-client-9.0.4) (2024-11-08)

### Bug Fixes

* ts-expect-error masking actual error ([25381fc](https://github.com/libp2p/js-libp2p-daemon/commit/25381fc857c3a1f50c594eaa7d727c908af14796))

## [@libp2p/daemon-client-v9.0.3](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-9.0.2...@libp2p/daemon-client-9.0.3) (2024-11-08)

### Bug Fixes

* fix mismatched versions ([c6d619f](https://github.com/libp2p/js-libp2p-daemon/commit/c6d619f9af99a5a28089aeec2f047ca1fca1f2e1))
* more mismatched versions ([327942a](https://github.com/libp2p/js-libp2p-daemon/commit/327942a44835533ebbc931ad33f03e8c1c9d4b28))
* update project config ([4cf3a98](https://github.com/libp2p/js-libp2p-daemon/commit/4cf3a98dd76f8a41ef7f70d9e1696f2a06049f69))

## @libp2p/daemon-client [8.0.6](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-client-8.0.5...@libp2p/daemon-client-8.0.6) (2024-08-01)


6 changes: 4 additions & 2 deletions packages/libp2p-daemon-client/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @libp2p/daemon-client

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
@@ -53,8 +55,8 @@ await client.close()

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-daemon/blob/main/packages/libp2p-daemon-client/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-daemon/blob/main/packages/libp2p-daemon-client/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

113 changes: 99 additions & 14 deletions packages/libp2p-daemon-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@libp2p/daemon-client",
"version": "8.0.6",
"version": "9.0.5",
"description": "libp2p-daemon client implementation",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/libp2p/js-libp2p-daemon/tree/main/packages/libp2p-daemon-client#readme",
@@ -39,6 +39,91 @@
"sourceType": "module"
}
},
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {
"clean": "aegir clean",
"lint": "aegir lint",
@@ -50,26 +135,26 @@
"release": "aegir release"
},
"dependencies": {
"@libp2p/daemon-protocol": "^6.0.0",
"@libp2p/interface": "^2.0.0",
"@libp2p/logger": "^5.0.0",
"@libp2p/peer-id": "^5.0.0",
"@libp2p/tcp": "^10.0.0",
"@multiformats/multiaddr": "^12.1.14",
"it-protobuf-stream": "^1.1.2",
"multiformats": "^13.0.1"
"@libp2p/daemon-protocol": "^7.0.2",
"@libp2p/interface": "^2.2.0",
"@libp2p/logger": "^5.1.3",
"@libp2p/peer-id": "^5.0.7",
"@libp2p/tcp": "^10.0.11",
"@multiformats/multiaddr": "^12.3.1",
"it-protobuf-stream": "^1.1.5",
"multiformats": "^13.3.1"
},
"devDependencies": {
"@chainsafe/libp2p-gossipsub": "^14.0.0",
"@libp2p/daemon-server": "^7.0.0",
"@libp2p/interface-compliance-tests": "^6.0.0",
"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@libp2p/daemon-server": "^8.0.2",
"@libp2p/interface-compliance-tests": "^6.1.8",
"@libp2p/kad-dht": "^14.1.0",
"aegir": "^45.0.1",
"it-all": "^3.0.4",
"it-all": "^3.0.6",
"it-pipe": "^3.0.1",
"sinon": "^19.0.2",
"sinon-ts": "^2.0.0",
"uint8arraylist": "^2.4.8",
"uint8arrays": "^5.0.1"
"uint8arrays": "^5.1.0"
}
}
9 changes: 5 additions & 4 deletions packages/libp2p-daemon-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -45,11 +45,12 @@ class Client implements DaemonClient {
* @async
* @returns {MultiaddrConnection}
*/
async connectDaemon (): Promise<MultiaddrConnection> {
async connectDaemon (signal?: AbortSignal): Promise<MultiaddrConnection> {
// @ts-expect-error because we use a passthrough upgrader,
// this is actually a MultiaddrConnection and not a Connection
return this.tcp.dial(this.multiaddr, {
upgrader: new PassThroughUpgrader()
upgrader: new PassThroughUpgrader(),
signal: signal ?? AbortSignal.timeout(10_000)
})
}

@@ -197,7 +198,7 @@ class Client implements DaemonClient {
// open a tcp port, pipe any data from it to the handler function
const listener = this.tcp.createListener({
upgrader: new PassThroughUpgrader((maConn) => {
this.onConnection(protocol, listener, maConn)
this.onConnection(protocol, listener, handler, maConn)
})
})
await listener.listen(multiaddr('/ip4/127.0.0.1/tcp/0'))
@@ -224,7 +225,7 @@ class Client implements DaemonClient {
}
}

private onConnection (protocol: string, listener: Listener, connection: MultiaddrConnection): void {
private onConnection (protocol: string, listener: Listener, handler: StreamHandlerFunction, connection: MultiaddrConnection): void {
Promise.resolve()
.then(async () => {
const sh = new StreamHandler({
13 changes: 13 additions & 0 deletions packages/libp2p-daemon-protocol/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [@libp2p/daemon-protocol-v7.0.4](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-protocol-7.0.3...@libp2p/daemon-protocol-7.0.4) (2025-02-24)

### Bug Fixes

* update upgrader ([e3a3feb](https://github.com/libp2p/js-libp2p-daemon/commit/e3a3feb354ae2c7f3d05959533f6ebc2ac5348d1))

## [@libp2p/daemon-protocol-v7.0.3](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-protocol-7.0.2...@libp2p/daemon-protocol-7.0.3) (2024-11-08)

### Bug Fixes

* fix mismatched versions ([c6d619f](https://github.com/libp2p/js-libp2p-daemon/commit/c6d619f9af99a5a28089aeec2f047ca1fca1f2e1))
* update project config ([4cf3a98](https://github.com/libp2p/js-libp2p-daemon/commit/4cf3a98dd76f8a41ef7f70d9e1696f2a06049f69))

## @libp2p/daemon-protocol [6.0.2](https://github.com/libp2p/js-libp2p-daemon/compare/@libp2p/daemon-protocol-v6.0.1...@libp2p/daemon-protocol-6.0.2) (2024-02-07)


6 changes: 4 additions & 2 deletions packages/libp2p-daemon-protocol/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @libp2p/daemon-protocol

[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-daemon.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-daemon)
@@ -19,8 +21,8 @@ $ npm i @libp2p/daemon-protocol

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-daemon/blob/main/packages/libp2p-daemon-protocol/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-daemon/blob/main/packages/libp2p-daemon-protocol/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

# Contribution

Loading