-
Notifications
You must be signed in to change notification settings - Fork 9
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
Dynamically loaded ipfs-http-client #6
Comments
Thanks @xmaysonnave! If you are able, can you submit pull-requests to this repo for each of the specific changes you made? It would make it much easier to evaluate and integrate them! |
Thanks I will provide some PR. |
Sure, thanks for contributing! In your fork of this repository, you'll need to make a branch of master with only one of your specific changes applied to it. Then, in the Github UI for that branch you will see a button to create a pull request - click that and follow the prompts to create it. Then do that again for each of the changes. Let me know if you have more questions or need help! |
Thanks for your advise.
1 - Right now I forked, made my updates on master and tagged a new version.
I currently build my project against this tag.
What you suggest sounds different:
- fork
- create a branch
- do my updates
- PR
2 - by the way. My requirement is only at the client/browser side level.
Should this code be compliant at the server side? Right now I put a To-do
comment in that situation.
Thanks
…On Wed, 6 Nov 2019, 00:42 Dietrich Ayala, ***@***.***> wrote:
Sure, thanks for contributing!
In your fork of this repository, you'll need to make a branch of master
with only one of your specific changes applied to it. Then, in the Github
UI for that branch you will see a button to create a pull request - click
that and follow the prompts to create it.
Then do that again for each of the changes.
Let me know if you have more questions or need help!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=AE47PBGOO7FOONJXWX27XOTQSHAR7A5CNFSM4JIPEMLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDD7D2A#issuecomment-549974504>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE47PBC65NIIZ7HHER74FG3QSHAR7ANCNFSM4JIPEMLA>
.
|
In your fork, you have made a set of changes that are not related to each
other. My recommendation is to submit those changes as individual PRs so
that each can be evaluated individually by the maintainers of this
repository. Does that make sense? There are several ways to use git and
Github to end up with that outcome, so do whichever feels comfortable for
you :)
Re server support: This library is intended for use in multiple
environments - maybe @lidel or @fsdiogo can comment on this?
On Tue, Nov 5, 2019 at 2:41 PM Xavier Maysonnave <notifications@github.com>
wrote:
… Thanks for your advise.
1 - Right now I forked, made my updates on master and tagged a new version.
I currently build my project against this tag.
What you suggest sounds different:
- fork
- create a branch
- do my updates
- PR
2 - by the way. My requirement is only at the client/browser side level.
Should this code be compliant at the server side? Right now I put a To-do
comment in that situation.
Thanks
On Wed, 6 Nov 2019, 00:42 Dietrich Ayala, ***@***.***>
wrote:
> Sure, thanks for contributing!
>
> In your fork of this repository, you'll need to make a branch of master
> with only one of your specific changes applied to it. Then, in the Github
> UI for that branch you will see a button to create a pull request - click
> that and follow the prompts to create it.
>
> Then do that again for each of the changes.
>
> Let me know if you have more questions or need help!
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <
#6?email_source=notifications&email_token=AE47PBGOO7FOONJXWX27XOTQSHAR7A5CNFSM4JIPEMLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDD7D2A#issuecomment-549974504
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AE47PBC65NIIZ7HHER74FG3QSHAR7ANCNFSM4JIPEMLA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6?email_source=notifications&email_token=AAAMHNZ36DMWW6FBPC2XUKTQSHZDBA5CNFSM4JIPEMLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDETDKI#issuecomment-550056361>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMHN5NCTYBOEMC3VM2XW3QSHZDBANCNFSM4JIPEMLA>
.
|
@autonome yes, we want this library to work in browser, electron and backend nodejs. @xmaysonnave I took a look at changes you made in your fork (diff) and it won't be easy to backport them without making a breaking change of removing Another concern is that we don't want to hardcode specific CDN such as I think we could change the API to accept See proposed API changes in #8: const { ipfs, provider } = await getIpfs({
tryApi: true,
getApiClient: () => import('ipfs-http-client')
})
@xmaysonnave would the above solve your use case? |
@lidel Thanks for your detailed feedback
Some remarks, correct me if I'm wrong:
Final: Thanks for your time. |
For users who want SRI there would be support for <script src="https://cdn.jsdelivr.net/npm/ipfs-http-client@39.0.2/dist/index.min.js" integrity="sha256-x65j2zwTEv1pkZALKuBXmpKP2cMjmqPEQe98pJ3reNY=" crossorigin="anonymous"></script>
Correct, just to be clear I am supportive, we should not force people to bundle http client if they don't use it.
I don't know the context of this snppet, but yes,
Not sure what you mean, its defined in Enable window.ipfs section.
|
Hi Martin, Thanks for your informations, the cdn link you suggested is definitely faster than the unpkg link I started to use. I'm in the process to improve this PR. Not a top priority though. 1 - remove the default instantiation and let the caller the responsibility to load and inject its Ipfs library 2 - add permissions in default opts and deep copy inner arrays if at some point default values are populated to avoid any further problems :
3 - I'm considering js-ipfs-http-client-lite as it seems to be an interesting undergoing work. Could be the default library as its footprint is really small 4 - Check webextension in firefox, chrome and chromium with Ipfs Companion but no luck as the window.chrome is not available 5 - Made a mistake about permissions, no offense to the package maintainers 6 - about sri I do not declare html tags but use javascript, anyway the pattern in this PR fullfill my need. More elegant and readable code is always welcome. Warmly |
@xmaysonnave thank you for fleshing out this. Ad 1: If we don't include Ad 2: what kinds of problems you had? usually something like Ad 4: |
@lidel |
@xmaysonnave Let's keep this open until I find some time to merge #8 and release new version, ideally with #3. |
@xmaysonnave apologies for this taking so long – notifications slipped between cracks. I've just released v1.0.0 which comes with prebuilt browser bundle: I believe you should be able to swap |
Dear Friends,
I'm working on a wiki dapp and needed to lighten its overall size.
I load ipfs-http-client only when users need to update their wiki.
I fork ipfs-provider and made the necessary updates:.
https://github.com/xmaysonnave/tiddlywiki-ipfs
is built against
https://github.com/xmaysonnave/ipfs-provider
Thanks
The text was updated successfully, but these errors were encountered: