Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IPFS related dependencies to latest version #245

Closed
thehenrytsai opened this issue Mar 3, 2023 · 7 comments
Closed

Update IPFS related dependencies to latest version #245

thehenrytsai opened this issue Mar 3, 2023 · 7 comments
Assignees
Labels
build Build related issues help wanted Extra attention is needed refactoring Code refactoring with no functional impact

Comments

@thehenrytsai
Copy link
Member

thehenrytsai commented Mar 3, 2023

Latest state of this issue:

✅ "@ipld/dag-cbor": "9.0.0",
✅ "interface-blockstore": "4.0.1"
✅ "ipfs-unixfs": "11.0.0",
✅ "ipfs-unixfs-exporter": "13.1.0",
✅ "ipfs-unixfs-importer": "14.0.1",
✅ "multiformats": "11.0.2",

Some dependencies are not backwards compatible thus will break build/compilation so will require update to code.

More annoying is that it appears some of the latest IPFS packages aren't exporting types correctly/fully which may require changes to IPFS repos. For reference, following errors are thrown when attempting to compile:

node_modules/@ipld/dag-pb/dist/src/index.d.ts:22:29 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

22 export type PBLink = import('./interface').PBLink;
                               ~~~~~~~~~~~~~

node_modules/@ipld/dag-pb/dist/src/index.d.ts:23:29 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

23 export type PBNode = import('./interface').PBNode;
                               ~~~~~~~~~~~~~

node_modules/@ipld/dag-pb/dist/src/util.d.ts:15:61 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

15 export function createNode(data: Uint8Array, links?: import("./interface").PBLink[] | undefined): PBNode;
                                                               ~~~~~~~~~~~~~

node_modules/@ipld/dag-pb/dist/src/util.d.ts:23:29 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

23 export type PBLink = import('./interface').PBLink;
                               ~~~~~~~~~~~~~

node_modules/@ipld/dag-pb/dist/src/util.d.ts:24:29 - error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node16' or 'nodenext'. Consider adding an extension to the import path.

24 export type PBNode = import('./interface').PBNode;

@thehenrytsai thehenrytsai added help wanted Extra attention is needed refactoring Code refactoring with no functional impact build Build related issues labels Mar 3, 2023
@nearlyjuly
Copy link
Contributor

Is it worth hanging on until this documentation microsoft/TypeScript#52593 is ready?

@thehenrytsai
Copy link
Member Author

@nearlyjuly now sure how it is related exactly? I have begin by updating the ipfs-unixfs-importer dependency: #248.

@nearlyjuly
Copy link
Contributor

Probably not worth it on second thoughts, was an initial reaction as I can see multiformats stopped supporting cjs since version 10, and issues such as 222 and 223 point to maybe having a strategy when this happens again for other dependencies. But I guess people will speak up and fix as and when needed.

thehenrytsai added a commit that referenced this issue Mar 10, 2023
… dependencies (#255)

#245 - updated multiformats, @ipld/dag-cbor, and interface-blockstore dependencies (#255)
thehenrytsai added a commit that referenced this issue Mar 10, 2023
* main:
  #249- only import `'level'` when it's actually used (#254)
  #245 - updated multiformats, @ipld/dag-cbor, and interface-blockstore dependencies (#255)
  #244 - add a `tenant` parameter to each `MessageStore` method (#251)
@thehenrytsai thehenrytsai added this to DWN Mar 13, 2023
@thehenrytsai thehenrytsai moved this to In Progress in DWN Mar 13, 2023
@thehenrytsai thehenrytsai self-assigned this Apr 28, 2023
thehenrytsai pushed a commit that referenced this issue May 12, 2023
* deps: update all ipfs-* deps to the latest versions

Co-authored-by: Diane Huxley <[email protected]>
@thehenrytsai
Copy link
Member Author

This is done!

@github-project-automation github-project-automation bot moved this from In Progress to Done in DWN May 23, 2023
@shamilovtim
Copy link
Contributor

Could you make these permissive toward minor versions (^ symbol) so that there isn't separate resolution with other packages like ion-tools @thehenrytsai @diehuxx ?

Thank you!

@shamilovtim shamilovtim reopened this May 30, 2023
@shamilovtim
Copy link
Contributor

Related: decentralized-identity/ion-tools#53

@thehenrytsai
Copy link
Member Author

Closing this issue with a targeted issue for action #385.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build related issues help wanted Extra attention is needed refactoring Code refactoring with no functional impact
Projects
Status: Done
Development

No branches or pull requests

3 participants