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

refactor: export types and utilities statically #1908

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Mar 5, 2019

Allows users to access these additional types and utilities without having to create an instance first.

BREAKING CHANGE: ipfs.util.isIPFS and ipfs.util.crypto have moved to static exports and should be accessed via const { isIPFS, crypto } = require('ipfs').

The modules available under ipfs.types.* have also become static exports.

refs ipfs-inactive/js-ipfs-http-client#902
refs ipfs-inactive/js-ipfs-http-client#951

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

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

This makes way more sense! 👍

And the changes look good

Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

👍

Alan Shaw added 2 commits March 6, 2019 11:38
Allows users to access these additional types and utilities without having to create an instance first.

BREAKING CHANGE: `ipfs.util.isIPFS` and `ipfs.util.crypto` have moved to static exports and should be accessed via `const { isIPFS, crypto } = require('ipfs')`.

The modules available under `ipfs.types.*` have also become static exports.

License: MIT
Signed-off-by: Alan Shaw <[email protected]>
License: MIT
Signed-off-by: Alan Shaw <[email protected]>
@alanshaw alanshaw force-pushed the refactor/static-exports branch from 706c8af to cdbeed7 Compare March 6, 2019 11:39
@alanshaw alanshaw mentioned this pull request Mar 6, 2019
50 tasks
@alanshaw alanshaw merged commit 79d7fef into master Mar 6, 2019
@alanshaw alanshaw deleted the refactor/static-exports branch March 6, 2019 12:44
@ghost ghost removed the status/in-progress In progress label Mar 6, 2019
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.

3 participants