ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

feat: re-export component APIs #4233

Closed DougAnderson444 closed 1 year ago

DougAnderson444 commented 2 years ago

https://github.com/ipfs/js-ipfs/blob/dfc43d4e9be67fdf25553677f469379d966ff806/packages/ipfs-core/src/components/index.js#L34

Could we re-export the component APIs (such as DagAPI) so they can be extended in other packages?

// ipfs-core/src/components/index.js
export { DagAPI, PinAPI, BlockAPI } 

and

"exports": {
    "./components": {
      "types": "./src/components/index.d.ts",
      "import": "./src/components/index.js"
    }
  },

Then I can do

// myClass.js
import { DagAPI } from 'ipfs-core/components'

class CustomDagRepo extends DagAPI { 
}

I've been using a deep reference for this already, so I thought I'd request this small change.

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

SgtPooki commented 1 year ago

Hello @DougAnderson444,

js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and the corresponding migration guide here.

This current bug or feature request will not be addressed in js-ipfs due to its deprecation. We believe the issue has been resolved in Helia though 😊

As a result, we are going to close this issue. If you think we have done this in error, please feel to reopen with any comments in the next week as we will circle back on the reopened issues.

We hope you will consider Helia for your IPFS in JS needs. We look forward to engaging with you more there.

Thanks, @ipfs/helia-dev