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

chore: update ipfs #43

Merged
merged 12 commits into from
Sep 29, 2021
Merged

chore: update ipfs #43

merged 12 commits into from
Sep 29, 2021

Conversation

achingbrain
Copy link
Contributor

@achingbrain achingbrain commented Sep 23, 2021

The next ipfs release will be a dual ESM/CJS version which is presenting
some interesting challenges for all the different tools used here.

We also use the ipfs module everywhere when we could be using ipfs-core
instead - it's lighter and much quicker to install. Really we should only
use ipfs when we need the CLI and the HTTP RPC API, though I'm a little
wary of the potential confusion for new users having two options introduces.

Todo:

  • Release js-ipfs
  • Replace 'next' dep versions with actual releases

The next ipfs release will be a dual ESM/CJS version which is presenting
some interesting challenges for all the different tools used here.

We also use the `ipfs` module everywhere when we could be using `ipfs-core`
instead - it's lighter and much quicker to install.  Really we should only
use `ipfs` when we need the CLI and the HTTP RPC API, though I'm a little
wary of the potential confusion for new users having two options introduces.

Todo:

- [ ] Release js-ipfs
- [ ] Replace `'next'` dep versions with actual releases
@oliveriosousa
Copy link
Contributor

Sounds good.

To address the "potential confusion for new users" we could update the root README.md explaining the difference between the two. What your thoughts?

Btw, this means that it might be possible to integrate with rollup with the new release? (and other ESModules oriented bundlers and frameworks)

@achingbrain
Copy link
Contributor Author

we could update the root README.md explaining the difference between the two

That could be work, if you think people will read it. I guess the danger is the per-example repos won't have that README in them?

this means that it might be possible to integrate with rollup with the new release?

Give a try? js-ipfs will be ESM-friendly, but it depends on modules that are CJS so that may cause problems.

@achingbrain
Copy link
Contributor Author

@oliveriosousa the fix in webpack/enhanced-resolve#304 solved the build problems for most of the examples, the only problem is nextjs distributes a bundled version of webpack instead of just depending on it like a normal js module.

That means we'll need to wait for a new nextjs release before the fix to enhanced-resolve makes it in, so I've temporarily disabled testing that example.

@achingbrain achingbrain mentioned this pull request Sep 29, 2021
@achingbrain
Copy link
Contributor Author

Going to merge this to unblock testing examples in js-ipfs again, happy to make further PRs to address any review comments.

@achingbrain achingbrain merged commit 4be9336 into master Sep 29, 2021
@achingbrain achingbrain deleted the chore/update-ipfs branch September 29, 2021 14:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants