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

ipfs.version(): include version of JS API #2878

Closed
lidel opened this issue Mar 5, 2020 · 1 comment · Fixed by #3125
Closed

ipfs.version(): include version of JS API #2878

lidel opened this issue Mar 5, 2020 · 1 comment · Fixed by #3125
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/feature status/ready Ready to be worked

Comments

@lidel
Copy link
Member

lidel commented Mar 5, 2020

In JS land interface-js-ipfs-core is effectively the API.

Unfortunately, unless I know what version of js-ipfs-http-client was used, there is no way to tell what type of JS API (interface-js-ipfs-core) I will get.

I propose we add it to the output of ipfs.version()
For example, js-ipfs-http-client connected to go-ipfs would return:

$ await ipfsCompanion.ipfs.version()
{
  commit: "6ce9a35",
  golang: "go1.12.16",
  repo: "7",
  system: "amd64/linux",
  version: "0.4.23",
  jsinterface: "v0.132.0"}

That way context where js-ipfs or js-ipfs-http-client versions are unknown (example: ipfs/ipfs-companion#852) it is possible to inspect it and make decisions at the runtime.

Knowing jsinterface version one could decide to fallback to something more modern, or change the way the output of ipfs.cat is handled (Uint8Array vs AsyncIterable).

Does this sound ok? Any reason to not do this?

@achingbrain achingbrain transferred this issue from ipfs-inactive/interface-js-ipfs-core Mar 10, 2020
@achingbrain achingbrain added kind/feature exp/novice Someone with a little familiarity can pick up labels Mar 10, 2020
@achingbrain
Copy link
Member

Sounds good to me, though perhaps better added to the output of the ipfs.id() interface call?

@jacobheun jacobheun added help wanted Seeking public contribution on this issue status/ready Ready to be worked labels Jun 25, 2020
achingbrain added a commit that referenced this issue Jun 25, 2020
Adds `interface-ipfs-core` and `ipfs-http-client` versions to the output
of the `ipfs version` command, also the git commit id if it's available.

Closes #2878
achingbrain added a commit that referenced this issue Jun 25, 2020
Adds `interface-ipfs-core` and `ipfs-http-client` versions to the output
of the `ipfs version` command, also the git commit id if it's available.

Closes #2878
achingbrain added a commit that referenced this issue Jul 2, 2020
Adds `interface-ipfs-core` and `ipfs-http-client` versions to the output of the `ipfs version` command, also the git commit id if it's available.

Closes #2878
SgtPooki referenced this issue in ipfs/js-kubo-rpc-client Aug 18, 2022
Adds `interface-ipfs-core` and `ipfs-http-client` versions to the output of the `ipfs version` command, also the git commit id if it's available.

Closes #2878
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/feature status/ready Ready to be worked
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants