Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

feat: detect and support window.ipfs.enable experiment #2

Merged
merged 3 commits into from
Nov 19, 2018

Conversation

lidel
Copy link
Contributor

@lidel lidel commented Nov 14, 2018

Just to get the ball rolling, this PR adds a simple heuristic for forward-compatible detection of IPFS API exposed by experimental branch of ipfs-companion: ipfs/ipfs-companion#589

@alanshaw I can take care of releasing this if you make me a colaborator on NPM.

@lidel lidel requested a review from alanshaw November 14, 2018 13:57
This is a simple heuristic for forward-compatible detection of IPFS API
exposed by ipfs-companion

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
Copy link
Contributor

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

Code LGTM - would you mind adding a test?

index.js Outdated Show resolved Hide resolved
While we are at it, make it possible to request specific permissions
and in future other capabilities provided by this interface.

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel
Copy link
Contributor Author

lidel commented Nov 17, 2018

@alanshaw done, check now:

  • added test
  • added support for overriding defaults
    • did not want to name it 'permissions` as we may want to pass other flags

@alanshaw
Copy link
Contributor

  • added support for overriding defaults

hmm, I don't expect to pass "defaults" normally! It suggests something is going to override them...when actually what I pass would usually override anything set by default.

  • did not want to name it 'permissions` as we may want to pass other flags

Unless you have something in mind right now I'd suggest sticking to permissions (we know we want that) and change it when we want to pass something else/more.

License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
@lidel
Copy link
Contributor Author

lidel commented Nov 19, 2018

@alanshaw lets go with permissions for now (bed7c72)

@alanshaw alanshaw merged commit 82ba3d6 into master Nov 19, 2018
@alanshaw alanshaw deleted the feat/window.ipfs-2.0 branch November 19, 2018 14:53
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