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

feat: lazy load js-ipfs-http-client and async iterator support #8

Merged
merged 3 commits into from
Apr 22, 2020

Conversation

lidel
Copy link
Member

@lidel lidel commented Nov 8, 2019

This PR:

First two are breaking changes, so I plan to release as v1.0.0.
We need this for unblocking some collabs, such as kiwix-js.

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lidel this LGTM. Although it is a breaking change, I think we could actually merge it right ahead.

@hacdias

This comment has been minimized.

@lidel

This comment has been minimized.

@lidel

This comment has been minimized.

@lidel lidel force-pushed the feat/lazy-load-ipfs-http-client branch from 5eeaa4d to 99807d9 Compare January 6, 2020 19:14
@lidel lidel force-pushed the feat/lazy-load-ipfs-http-client branch from 5d4f4e7 to e4d7144 Compare April 22, 2020 18:12
- remove external dependency
- support window.IpfsHttpClient
- remove defaultApiAddress (simplifies api)

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
- Renamed functions responsible for loading respective modules to more
  meaningful ones.
- Updated examples/browser-browserify
- Removed info about support for dynamic imports (JS modules) until we
  have a working example

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@lidel lidel force-pushed the feat/lazy-load-ipfs-http-client branch 3 times, most recently from 0cafb99 to 3785592 Compare April 22, 2020 20:25
@lidel lidel changed the title feat: lazy load js-ipfs-http-client feat: lazy load js-ipfs-http-client and async iterator support Apr 22, 2020
@lidel lidel marked this pull request as ready for review April 22, 2020 20:31
@lidel lidel requested a review from hacdias April 22, 2020 20:31
BREAKING CHANGE: this switched ipfs-provider to the new JS APIs based on
async iterators. More details in: https://blog.ipfs.io/2020-02-01-async-await-refactor/

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@lidel lidel force-pushed the feat/lazy-load-ipfs-http-client branch from 3785592 to 7901704 Compare April 22, 2020 20:34
@lidel
Copy link
Member Author

lidel commented Apr 22, 2020

@hacdias mind looking at this? I want to merge this and then release it as v1.0.0,
but it may impact your use cases, as you created #19 recently.

@lidel lidel requested a review from autonome April 22, 2020 20:45
Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code LGTM! Tests seem to pass and I like the changes. Let's 1.0!

but it may impact your use cases, as you created #19 recently.

I prefer it this way where you can bring your own ipfs-http-client. Unless the constructor changes dramatically, this won't need to be updated in order for other stuff that depends on it to get updated, which is awesome.

@lidel lidel merged commit cac51fa into master Apr 22, 2020
@lidel lidel deleted the feat/lazy-load-ipfs-http-client branch April 22, 2020 21:39
@xmaysonnave
Copy link

@lidel Thanks for the new build. Integrated and tested on my side. Lazy load without the internal dependency is working as suggested. Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamically loaded ipfs-http-client
3 participants