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: support window.ipfs.enable() #5

Merged
merged 1 commit into from
Sep 2, 2019
Merged

Conversation

lidel
Copy link
Member

@lidel lidel commented Aug 26, 2019

This PR enables support for asynchronous window.ipfs.enable :

const { ipfs, provider } = await getIpfs({
  tryWindow: true,
  permissions: { commands: ['add','cat','id', 'version'] },
  tryJsIpfs: true,
...

Closes #1
cc ipfs/ipfs-companion#589

  • support for asynchronous window.ipfs.enable
  • support passing commands and experiments to window.ipfs.enable
    • Other providers may want to add support for those in the future, so those could be top-level config options.

Closes #1

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@lidel
Copy link
Member Author

lidel commented Aug 26, 2019

@fsdiogo are you still maintaining this repo, or want to hand it over?
Would need NPM publishing rights as well.

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.

Loooks good!

@fsdiogo
Copy link
Contributor

fsdiogo commented Aug 30, 2019

@fsdiogo are you still maintaining this repo, or want to hand it over?
Would need NPM publishing rights as well.

I wouldn't mind maintaining this repo, but I've been removed from the ipfs-shipyard org, so I don't have any perms on this repo now.

I've added you and Oli to the npm admin list, so you should be good to go:

npm

Ping me if otherwise!

@lidel
Copy link
Member Author

lidel commented Sep 2, 2019

@fsdiogo added you back as a Collaborator to this repo :)

@lidel lidel merged commit b720386 into master Sep 2, 2019
@lidel lidel deleted the feat/window.ipfs.enable branch September 2, 2019 22:08
@lidel
Copy link
Member Author

lidel commented Sep 2, 2019

@fsdiogo I see this repo was not set up with aegir: how did you build & release it to NPM before?

I want to release this as 0.2.2 to remove deprecation warning about window.ipfs v1,
but afraid to make invasive changes by introducing aegir in patch release.

@fsdiogo
Copy link
Contributor

fsdiogo commented Sep 3, 2019

@lidel I just published v0.2.2.

There is no need to build, it works out of the box. Yeah, I opted out of using aegir as I didn't see any benefits of using it for this, but feel free to add it if you think otherwise!

Publish to to npm:

  • Update the package.json to the desired version
  • Commit to GitHub (e.g. 883b4c7)
  • Create a tag with the version and push it
  • Run npm publish on the project folder in the terminal

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.

Add support for window.ipfs.enable({commands, experiments})
3 participants