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

feat: re-export component APIs #4233

Closed
DougAnderson444 opened this issue Oct 14, 2022 · 2 comments
Closed

feat: re-export component APIs #4233

DougAnderson444 opened this issue Oct 14, 2022 · 2 comments

Comments

@DougAnderson444
Copy link
Contributor

import { DagAPI } from './dag/index.js'

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
Copy link

welcome bot commented Oct 14, 2022

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:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

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

@SgtPooki
Copy link
Member

SgtPooki commented May 16, 2023

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

@SgtPooki SgtPooki closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2023
@SgtPooki SgtPooki self-assigned this May 17, 2023
@SgtPooki SgtPooki moved this to ✅ Done in js-ipfs deprecation May 17, 2023
@SgtPooki SgtPooki moved this from ✅ Done to 🏃‍♀️ In Progress in js-ipfs deprecation May 17, 2023
@SgtPooki SgtPooki moved this from 🏃‍♀️ In Progress to ✅ Done in js-ipfs deprecation May 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants