diff --git a/CHANGELOG.md b/CHANGELOG.md index 0532a5428..322c068c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,72 +1,72 @@ -## [26.1.2](https://github.com/ipfs/js-ipfs-api/compare/v26.1.0...v26.1.2) (2018-11-03) +## [26.1.2](https://github.com/ipfs/js-ipfs-http-client/compare/v26.1.0...v26.1.2) (2018-11-03) ### Features -* go-ipfs 0.4.18 ([e3e4d6c](https://github.com/ipfs/js-ipfs-api/commit/e3e4d6c)) -* upload example works with big files ([62b844f](https://github.com/ipfs/js-ipfs-api/commit/62b844f)) +* go-ipfs 0.4.18 ([e3e4d6c](https://github.com/ipfs/js-ipfs-http-client/commit/e3e4d6c)) +* upload example works with big files ([62b844f](https://github.com/ipfs/js-ipfs-http-client/commit/62b844f)) -## [26.1.1](https://github.com/ipfs/js-ipfs-api/compare/v26.1.0...v26.1.1) (2018-11-03) +## [26.1.1](https://github.com/ipfs/js-ipfs-http-client/compare/v26.1.0...v26.1.1) (2018-11-03) ### Features -* go-ipfs 0.4.18 ([9178e7d](https://github.com/ipfs/js-ipfs-api/commit/9178e7d)) +* go-ipfs 0.4.18 ([9178e7d](https://github.com/ipfs/js-ipfs-http-client/commit/9178e7d)) -# [26.1.0](https://github.com/ipfs/js-ipfs-api/compare/v26.0.3...v26.1.0) (2018-10-31) +# [26.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v26.0.3...v26.1.0) (2018-10-31) ### Bug Fixes -* make ping not mix errors with responses ([#883](https://github.com/ipfs/js-ipfs-api/issues/883)) ([80725f2](https://github.com/ipfs/js-ipfs-api/commit/80725f2)) +* make ping not mix errors with responses ([#883](https://github.com/ipfs/js-ipfs-http-client/issues/883)) ([80725f2](https://github.com/ipfs/js-ipfs-http-client/commit/80725f2)) -## [26.0.3](https://github.com/ipfs/js-ipfs-api/compare/v26.0.2...v26.0.3) (2018-10-31) +## [26.0.3](https://github.com/ipfs/js-ipfs-http-client/compare/v26.0.2...v26.0.3) (2018-10-31) -## [26.0.2](https://github.com/ipfs/js-ipfs-api/compare/v26.0.0...v26.0.2) (2018-10-31) +## [26.0.2](https://github.com/ipfs/js-ipfs-http-client/compare/v26.0.0...v26.0.2) (2018-10-31) ### Bug Fixes -* pin.ls ignored opts when hash was present ([#875](https://github.com/ipfs/js-ipfs-api/issues/875)) ([0b46750](https://github.com/ipfs/js-ipfs-api/commit/0b46750)), closes [/github.com/ipfs-shipyard/ipfs-companion/issues/360#issuecomment-427525801](https://github.com//github.com/ipfs-shipyard/ipfs-companion/issues/360/issues/issuecomment-427525801) +* pin.ls ignored opts when hash was present ([#875](https://github.com/ipfs/js-ipfs-http-client/issues/875)) ([0b46750](https://github.com/ipfs/js-ipfs-http-client/commit/0b46750)), closes [/github.com/ipfs-shipyard/ipfs-companion/issues/360#issuecomment-427525801](https://github.com//github.com/ipfs-shipyard/ipfs-companion/issues/360/issues/issuecomment-427525801) -## [26.0.1](https://github.com/ipfs/js-ipfs-api/compare/v26.0.0...v26.0.1) (2018-10-30) +## [26.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v26.0.0...v26.0.1) (2018-10-30) -# [26.0.0](https://github.com/ipfs/js-ipfs-api/compare/v25.0.0...v26.0.0) (2018-10-30) +# [26.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v25.0.0...v26.0.0) (2018-10-30) ### Bug Fixes -* add missing and remove unused dependencies ([#879](https://github.com/ipfs/js-ipfs-api/issues/879)) ([979d8b5](https://github.com/ipfs/js-ipfs-api/commit/979d8b5)) +* add missing and remove unused dependencies ([#879](https://github.com/ipfs/js-ipfs-http-client/issues/879)) ([979d8b5](https://github.com/ipfs/js-ipfs-http-client/commit/979d8b5)) ### Chores -* remove ipld formats re-export ([#872](https://github.com/ipfs/js-ipfs-api/issues/872)) ([c534375](https://github.com/ipfs/js-ipfs-api/commit/c534375)) -* update to ipld-dag-cbor 0.13 ([0652ac0](https://github.com/ipfs/js-ipfs-api/commit/0652ac0)) +* remove ipld formats re-export ([#872](https://github.com/ipfs/js-ipfs-http-client/issues/872)) ([c534375](https://github.com/ipfs/js-ipfs-http-client/commit/c534375)) +* update to ipld-dag-cbor 0.13 ([0652ac0](https://github.com/ipfs/js-ipfs-http-client/commit/0652ac0)) ### Features -* ipns over pubsub ([#846](https://github.com/ipfs/js-ipfs-api/issues/846)) ([ef49e95](https://github.com/ipfs/js-ipfs-api/commit/ef49e95)) +* ipns over pubsub ([#846](https://github.com/ipfs/js-ipfs-http-client/issues/846)) ([ef49e95](https://github.com/ipfs/js-ipfs-http-client/commit/ef49e95)) ### BREAKING CHANGES @@ -130,42 +130,42 @@ you need to bundle them yourself. -# [25.0.0](https://github.com/ipfs/js-ipfs-api/compare/v24.0.2...v25.0.0) (2018-10-15) +# [25.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v24.0.2...v25.0.0) (2018-10-15) ### Bug Fixes -* >150mb bodies no longer crashing Chromium ([#868](https://github.com/ipfs/js-ipfs-api/issues/868)) ([180da77](https://github.com/ipfs/js-ipfs-api/commit/180da77)), closes [#654](https://github.com/ipfs/js-ipfs-api/issues/654) -* add bl module to package dependencies ([#853](https://github.com/ipfs/js-ipfs-api/issues/853)) ([#854](https://github.com/ipfs/js-ipfs-api/issues/854)) ([834934f](https://github.com/ipfs/js-ipfs-api/commit/834934f)) -* add lodash dependency ([#873](https://github.com/ipfs/js-ipfs-api/issues/873)) ([c510cb7](https://github.com/ipfs/js-ipfs-api/commit/c510cb7)), closes [#870](https://github.com/ipfs/js-ipfs-api/issues/870) +* >150mb bodies no longer crashing Chromium ([#868](https://github.com/ipfs/js-ipfs-http-client/issues/868)) ([180da77](https://github.com/ipfs/js-ipfs-http-client/commit/180da77)), closes [#654](https://github.com/ipfs/js-ipfs-http-client/issues/654) +* add bl module to package dependencies ([#853](https://github.com/ipfs/js-ipfs-http-client/issues/853)) ([#854](https://github.com/ipfs/js-ipfs-http-client/issues/854)) ([834934f](https://github.com/ipfs/js-ipfs-http-client/commit/834934f)) +* add lodash dependency ([#873](https://github.com/ipfs/js-ipfs-http-client/issues/873)) ([c510cb7](https://github.com/ipfs/js-ipfs-http-client/commit/c510cb7)), closes [#870](https://github.com/ipfs/js-ipfs-http-client/issues/870) -## [24.0.2](https://github.com/ipfs/js-ipfs-api/compare/v24.0.1...v24.0.2) (2018-09-21) +## [24.0.2](https://github.com/ipfs/js-ipfs-http-client/compare/v24.0.1...v24.0.2) (2018-09-21) ### Bug Fixes -* block.put options ([#844](https://github.com/ipfs/js-ipfs-api/issues/844)) ([e290a38](https://github.com/ipfs/js-ipfs-api/commit/e290a38)) +* block.put options ([#844](https://github.com/ipfs/js-ipfs-http-client/issues/844)) ([e290a38](https://github.com/ipfs/js-ipfs-http-client/commit/e290a38)) -## [24.0.1](https://github.com/ipfs/js-ipfs-api/compare/v24.0.0...v24.0.1) (2018-08-21) +## [24.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v24.0.0...v24.0.1) (2018-08-21) -# [24.0.0](https://github.com/ipfs/js-ipfs-api/compare/v23.0.0...v24.0.0) (2018-08-15) +# [24.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v23.0.0...v24.0.0) (2018-08-15) ### Bug Fixes -* add test data to IPFS before fetching it ([#832](https://github.com/ipfs/js-ipfs-api/issues/832)) ([b2a77d6](https://github.com/ipfs/js-ipfs-api/commit/b2a77d6)) -* BREAKING CHANGE use data-encoding arg so data is not corrupted ([#806](https://github.com/ipfs/js-ipfs-api/issues/806)) ([553c3fb](https://github.com/ipfs/js-ipfs-api/commit/553c3fb)) -* dag.get return error on missing multicodec ([#831](https://github.com/ipfs/js-ipfs-api/issues/831)) ([ff7c7e5](https://github.com/ipfs/js-ipfs-api/commit/ff7c7e5)) -* remove external urls from addFromURL tests ([#834](https://github.com/ipfs/js-ipfs-api/issues/834)) ([7cf7998](https://github.com/ipfs/js-ipfs-api/commit/7cf7998)), closes [#803](https://github.com/ipfs/js-ipfs-api/issues/803) +* add test data to IPFS before fetching it ([#832](https://github.com/ipfs/js-ipfs-http-client/issues/832)) ([b2a77d6](https://github.com/ipfs/js-ipfs-http-client/commit/b2a77d6)) +* BREAKING CHANGE use data-encoding arg so data is not corrupted ([#806](https://github.com/ipfs/js-ipfs-http-client/issues/806)) ([553c3fb](https://github.com/ipfs/js-ipfs-http-client/commit/553c3fb)) +* dag.get return error on missing multicodec ([#831](https://github.com/ipfs/js-ipfs-http-client/issues/831)) ([ff7c7e5](https://github.com/ipfs/js-ipfs-http-client/commit/ff7c7e5)) +* remove external urls from addFromURL tests ([#834](https://github.com/ipfs/js-ipfs-http-client/issues/834)) ([7cf7998](https://github.com/ipfs/js-ipfs-http-client/commit/7cf7998)), closes [#803](https://github.com/ipfs/js-ipfs-http-client/issues/803) ### BREAKING CHANGES @@ -175,160 +175,160 @@ you need to bundle them yourself. -# [23.0.0](https://github.com/ipfs/js-ipfs-api/compare/v22.3.0...v23.0.0) (2018-08-06) +# [23.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v22.3.0...v23.0.0) (2018-08-06) ### Bug Fixes -* config get ([#825](https://github.com/ipfs/js-ipfs-api/issues/825)) ([ef5a4a3](https://github.com/ipfs/js-ipfs-api/commit/ef5a4a3)) +* config get ([#825](https://github.com/ipfs/js-ipfs-http-client/issues/825)) ([ef5a4a3](https://github.com/ipfs/js-ipfs-http-client/commit/ef5a4a3)) ### Features -* add resolve cmd ([#826](https://github.com/ipfs/js-ipfs-api/issues/826)) ([c7ad0e4](https://github.com/ipfs/js-ipfs-api/commit/c7ad0e4)) +* add resolve cmd ([#826](https://github.com/ipfs/js-ipfs-http-client/issues/826)) ([c7ad0e4](https://github.com/ipfs/js-ipfs-http-client/commit/c7ad0e4)) -# [22.3.0](https://github.com/ipfs/js-ipfs-api/compare/v22.2.4...v22.3.0) (2018-08-02) +# [22.3.0](https://github.com/ipfs/js-ipfs-http-client/compare/v22.2.4...v22.3.0) (2018-08-02) ### Bug Fixes -* config.set rejects buffer values ([#800](https://github.com/ipfs/js-ipfs-api/issues/800)) ([f3e6bf1](https://github.com/ipfs/js-ipfs-api/commit/f3e6bf1)) +* config.set rejects buffer values ([#800](https://github.com/ipfs/js-ipfs-http-client/issues/800)) ([f3e6bf1](https://github.com/ipfs/js-ipfs-http-client/commit/f3e6bf1)) ### Features -* compatible with go-ipfs 0.4.16 ([8536ee4](https://github.com/ipfs/js-ipfs-api/commit/8536ee4)) -* expose mfs files.read*Stream methods ([#823](https://github.com/ipfs/js-ipfs-api/issues/823)) ([70c9df1](https://github.com/ipfs/js-ipfs-api/commit/70c9df1)) +* compatible with go-ipfs 0.4.16 ([8536ee4](https://github.com/ipfs/js-ipfs-http-client/commit/8536ee4)) +* expose mfs files.read*Stream methods ([#823](https://github.com/ipfs/js-ipfs-http-client/issues/823)) ([70c9df1](https://github.com/ipfs/js-ipfs-http-client/commit/70c9df1)) -## [22.2.4](https://github.com/ipfs/js-ipfs-api/compare/v22.2.3...v22.2.4) (2018-07-17) +## [22.2.4](https://github.com/ipfs/js-ipfs-http-client/compare/v22.2.3...v22.2.4) (2018-07-17) ### Bug Fixes -* increase browserNoActivityTimeout to account for before ([328e338](https://github.com/ipfs/js-ipfs-api/commit/328e338)) -* increase timeout for .name after all ([3dc4313](https://github.com/ipfs/js-ipfs-api/commit/3dc4313)) -* missing debug dependency fixes [#809](https://github.com/ipfs/js-ipfs-api/issues/809) ([#810](https://github.com/ipfs/js-ipfs-api/issues/810)) ([0f1fe95](https://github.com/ipfs/js-ipfs-api/commit/0f1fe95)) +* increase browserNoActivityTimeout to account for before ([328e338](https://github.com/ipfs/js-ipfs-http-client/commit/328e338)) +* increase timeout for .name after all ([3dc4313](https://github.com/ipfs/js-ipfs-http-client/commit/3dc4313)) +* missing debug dependency fixes [#809](https://github.com/ipfs/js-ipfs-http-client/issues/809) ([#810](https://github.com/ipfs/js-ipfs-http-client/issues/810)) ([0f1fe95](https://github.com/ipfs/js-ipfs-http-client/commit/0f1fe95)) -## [22.2.3](https://github.com/ipfs/js-ipfs-api/compare/v22.2.2...v22.2.3) (2018-07-10) +## [22.2.3](https://github.com/ipfs/js-ipfs-http-client/compare/v22.2.2...v22.2.3) (2018-07-10) ### Bug Fixes -* Request logging broken in Electron ([#808](https://github.com/ipfs/js-ipfs-api/issues/808)) ([52298ae](https://github.com/ipfs/js-ipfs-api/commit/52298ae)) +* Request logging broken in Electron ([#808](https://github.com/ipfs/js-ipfs-http-client/issues/808)) ([52298ae](https://github.com/ipfs/js-ipfs-http-client/commit/52298ae)) -## [22.2.2](https://github.com/ipfs/js-ipfs-api/compare/v22.2.1...v22.2.2) (2018-07-05) +## [22.2.2](https://github.com/ipfs/js-ipfs-http-client/compare/v22.2.1...v22.2.2) (2018-07-05) ### Bug Fixes -* ignore response body for some mfs commands ([#805](https://github.com/ipfs/js-ipfs-api/issues/805)) ([b604a64](https://github.com/ipfs/js-ipfs-api/commit/b604a64)) +* ignore response body for some mfs commands ([#805](https://github.com/ipfs/js-ipfs-http-client/issues/805)) ([b604a64](https://github.com/ipfs/js-ipfs-http-client/commit/b604a64)) ### Features -* modular interface tests ([#785](https://github.com/ipfs/js-ipfs-api/issues/785)) ([2426072](https://github.com/ipfs/js-ipfs-api/commit/2426072)), closes [#339](https://github.com/ipfs/js-ipfs-api/issues/339) [#802](https://github.com/ipfs/js-ipfs-api/issues/802) [#801](https://github.com/ipfs/js-ipfs-api/issues/801) +* modular interface tests ([#785](https://github.com/ipfs/js-ipfs-http-client/issues/785)) ([2426072](https://github.com/ipfs/js-ipfs-http-client/commit/2426072)), closes [#339](https://github.com/ipfs/js-ipfs-http-client/issues/339) [#802](https://github.com/ipfs/js-ipfs-http-client/issues/802) [#801](https://github.com/ipfs/js-ipfs-http-client/issues/801) -## [22.2.1](https://github.com/ipfs/js-ipfs-api/compare/v22.2.0...v22.2.1) (2018-06-29) +## [22.2.1](https://github.com/ipfs/js-ipfs-http-client/compare/v22.2.0...v22.2.1) (2018-06-29) ### Bug Fixes -* res.req only in Node.js, in browser use res.url instead ([#798](https://github.com/ipfs/js-ipfs-api/issues/798)) ([e8a5ab9](https://github.com/ipfs/js-ipfs-api/commit/e8a5ab9)) +* res.req only in Node.js, in browser use res.url instead ([#798](https://github.com/ipfs/js-ipfs-http-client/issues/798)) ([e8a5ab9](https://github.com/ipfs/js-ipfs-http-client/commit/e8a5ab9)) -# [22.2.0](https://github.com/ipfs/js-ipfs-api/compare/v22.1.1...v22.2.0) (2018-06-29) +# [22.2.0](https://github.com/ipfs/js-ipfs-http-client/compare/v22.1.1...v22.2.0) (2018-06-29) ### Features -* logs path & querystring for requests ([#796](https://github.com/ipfs/js-ipfs-api/issues/796)) ([4e55d19](https://github.com/ipfs/js-ipfs-api/commit/4e55d19)) +* logs path & querystring for requests ([#796](https://github.com/ipfs/js-ipfs-http-client/issues/796)) ([4e55d19](https://github.com/ipfs/js-ipfs-http-client/commit/4e55d19)) -## [22.1.1](https://github.com/ipfs/js-ipfs-api/compare/v22.1.0...v22.1.1) (2018-06-25) +## [22.1.1](https://github.com/ipfs/js-ipfs-http-client/compare/v22.1.0...v22.1.1) (2018-06-25) ### Bug Fixes -* get block with empty data ([#789](https://github.com/ipfs/js-ipfs-api/issues/789)) ([88edd83](https://github.com/ipfs/js-ipfs-api/commit/88edd83)) +* get block with empty data ([#789](https://github.com/ipfs/js-ipfs-http-client/issues/789)) ([88edd83](https://github.com/ipfs/js-ipfs-http-client/commit/88edd83)) -# [22.1.0](https://github.com/ipfs/js-ipfs-api/compare/v22.0.2...v22.1.0) (2018-06-18) +# [22.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v22.0.2...v22.1.0) (2018-06-18) ### Features -* add support for custom headers to send-request ([#741](https://github.com/ipfs/js-ipfs-api/issues/741)) ([7fb2e07](https://github.com/ipfs/js-ipfs-api/commit/7fb2e07)) -* implement bitswap wantlist peer ID param and bitswap unwant ([#761](https://github.com/ipfs/js-ipfs-api/issues/761)) ([73a153e](https://github.com/ipfs/js-ipfs-api/commit/73a153e)) +* add support for custom headers to send-request ([#741](https://github.com/ipfs/js-ipfs-http-client/issues/741)) ([7fb2e07](https://github.com/ipfs/js-ipfs-http-client/commit/7fb2e07)) +* implement bitswap wantlist peer ID param and bitswap unwant ([#761](https://github.com/ipfs/js-ipfs-http-client/issues/761)) ([73a153e](https://github.com/ipfs/js-ipfs-http-client/commit/73a153e)) -## [22.0.2](https://github.com/ipfs/js-ipfs-api/compare/v22.0.1...v22.0.2) (2018-06-14) +## [22.0.2](https://github.com/ipfs/js-ipfs-http-client/compare/v22.0.1...v22.0.2) (2018-06-14) ### Bug Fixes -* json-loader error in upload-file-via-browser example ([#784](https://github.com/ipfs/js-ipfs-api/issues/784)) ([5e7b7c4](https://github.com/ipfs/js-ipfs-api/commit/5e7b7c4)) +* json-loader error in upload-file-via-browser example ([#784](https://github.com/ipfs/js-ipfs-http-client/issues/784)) ([5e7b7c4](https://github.com/ipfs/js-ipfs-http-client/commit/5e7b7c4)) -## [22.0.1](https://github.com/ipfs/js-ipfs-api/compare/v22.0.0...v22.0.1) (2018-05-30) +## [22.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v22.0.0...v22.0.1) (2018-05-30) ### Bug Fixes -* configure webpack to not use esmodules in dependencies ([dc14333](https://github.com/ipfs/js-ipfs-api/commit/dc14333)) -* correctly differentiate pong responses ([4ad25a3](https://github.com/ipfs/js-ipfs-api/commit/4ad25a3)) -* util.addFromURL with URL-escaped file ([a3bd811](https://github.com/ipfs/js-ipfs-api/commit/a3bd811)) +* configure webpack to not use esmodules in dependencies ([dc14333](https://github.com/ipfs/js-ipfs-http-client/commit/dc14333)) +* correctly differentiate pong responses ([4ad25a3](https://github.com/ipfs/js-ipfs-http-client/commit/4ad25a3)) +* util.addFromURL with URL-escaped file ([a3bd811](https://github.com/ipfs/js-ipfs-http-client/commit/a3bd811)) -# [22.0.0](https://github.com/ipfs/js-ipfs-api/compare/v21.0.0...v22.0.0) (2018-05-20) +# [22.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v21.0.0...v22.0.0) (2018-05-20) ### Bug Fixes -* callback from unsub after stream ends ([51a80f2](https://github.com/ipfs/js-ipfs-api/commit/51a80f2)) -* do not fail stop node if failed start node ([533760f](https://github.com/ipfs/js-ipfs-api/commit/533760f)) -* **ping:** convert the ping messages to lowercase ([632af40](https://github.com/ipfs/js-ipfs-api/commit/632af40)) -* more robust ping tests ([fc6d301](https://github.com/ipfs/js-ipfs-api/commit/fc6d301)) -* remove .only ([0e21c8a](https://github.com/ipfs/js-ipfs-api/commit/0e21c8a)) -* result.Peers can be null, ensure callback is called ([f5f2e83](https://github.com/ipfs/js-ipfs-api/commit/f5f2e83)) -* update asserted error message ([17c1f1c](https://github.com/ipfs/js-ipfs-api/commit/17c1f1c)) -* use async/setImmediate vs process.nextTick ([faa51b4](https://github.com/ipfs/js-ipfs-api/commit/faa51b4)) +* callback from unsub after stream ends ([51a80f2](https://github.com/ipfs/js-ipfs-http-client/commit/51a80f2)) +* do not fail stop node if failed start node ([533760f](https://github.com/ipfs/js-ipfs-http-client/commit/533760f)) +* **ping:** convert the ping messages to lowercase ([632af40](https://github.com/ipfs/js-ipfs-http-client/commit/632af40)) +* more robust ping tests ([fc6d301](https://github.com/ipfs/js-ipfs-http-client/commit/fc6d301)) +* remove .only ([0e21c8a](https://github.com/ipfs/js-ipfs-http-client/commit/0e21c8a)) +* result.Peers can be null, ensure callback is called ([f5f2e83](https://github.com/ipfs/js-ipfs-http-client/commit/f5f2e83)) +* update asserted error message ([17c1f1c](https://github.com/ipfs/js-ipfs-http-client/commit/17c1f1c)) +* use async/setImmediate vs process.nextTick ([faa51b4](https://github.com/ipfs/js-ipfs-http-client/commit/faa51b4)) -# [21.0.0](https://github.com/ipfs/js-ipfs-api/compare/v20.2.1...v21.0.0) (2018-05-12) +# [21.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v20.2.1...v21.0.0) (2018-05-12) ### Bug Fixes -* make pubsub.unsubscribe async and alter pubsub.subscribe signature ([b98f8f3](https://github.com/ipfs/js-ipfs-api/commit/b98f8f3)) +* make pubsub.unsubscribe async and alter pubsub.subscribe signature ([b98f8f3](https://github.com/ipfs/js-ipfs-http-client/commit/b98f8f3)) ### BREAKING CHANGES @@ -341,448 +341,448 @@ Signed-off-by: Alan Shaw -## [20.2.1](https://github.com/ipfs/js-ipfs-api/compare/v20.2.0...v20.2.1) (2018-05-06) +## [20.2.1](https://github.com/ipfs/js-ipfs-http-client/compare/v20.2.0...v20.2.1) (2018-05-06) -# [20.2.0](https://github.com/ipfs/js-ipfs-api/compare/v20.0.1...v20.2.0) (2018-04-30) +# [20.2.0](https://github.com/ipfs/js-ipfs-http-client/compare/v20.0.1...v20.2.0) (2018-04-30) ### Bug Fixes -* adding files by pull stream ([2fa16c5](https://github.com/ipfs/js-ipfs-api/commit/2fa16c5)) -* handle request errors in addFromURL ([7c5cea5](https://github.com/ipfs/js-ipfs-api/commit/7c5cea5)) -* increase timeout for name.publish and fix setup code ([ceb1106](https://github.com/ipfs/js-ipfs-api/commit/ceb1106)) -* ipfs add url wrap doesn't work ([#750](https://github.com/ipfs/js-ipfs-api/issues/750)) ([f6f1bf0](https://github.com/ipfs/js-ipfs-api/commit/f6f1bf0)) +* adding files by pull stream ([2fa16c5](https://github.com/ipfs/js-ipfs-http-client/commit/2fa16c5)) +* handle request errors in addFromURL ([7c5cea5](https://github.com/ipfs/js-ipfs-http-client/commit/7c5cea5)) +* increase timeout for name.publish and fix setup code ([ceb1106](https://github.com/ipfs/js-ipfs-http-client/commit/ceb1106)) +* ipfs add url wrap doesn't work ([#750](https://github.com/ipfs/js-ipfs-http-client/issues/750)) ([f6f1bf0](https://github.com/ipfs/js-ipfs-http-client/commit/f6f1bf0)) ### Features -* Add offset/length arguments to files.cat ([17967c1](https://github.com/ipfs/js-ipfs-api/commit/17967c1)) -* get it ready for release ([#751](https://github.com/ipfs/js-ipfs-api/issues/751)) ([1885af4](https://github.com/ipfs/js-ipfs-api/commit/1885af4)) +* Add offset/length arguments to files.cat ([17967c1](https://github.com/ipfs/js-ipfs-http-client/commit/17967c1)) +* get it ready for release ([#751](https://github.com/ipfs/js-ipfs-http-client/issues/751)) ([1885af4](https://github.com/ipfs/js-ipfs-http-client/commit/1885af4)) -# [20.1.0](https://github.com/ipfs/js-ipfs-api/compare/v20.0.1...v20.1.0) (2018-04-30) +# [20.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v20.0.1...v20.1.0) (2018-04-30) ### Bug Fixes -* adding files by pull stream ([2fa16c5](https://github.com/ipfs/js-ipfs-api/commit/2fa16c5)) -* handle request errors in addFromURL ([7c5cea5](https://github.com/ipfs/js-ipfs-api/commit/7c5cea5)) -* increase timeout for name.publish and fix setup code ([ceb1106](https://github.com/ipfs/js-ipfs-api/commit/ceb1106)) -* ipfs add url wrap doesn't work ([#750](https://github.com/ipfs/js-ipfs-api/issues/750)) ([f6f1bf0](https://github.com/ipfs/js-ipfs-api/commit/f6f1bf0)) +* adding files by pull stream ([2fa16c5](https://github.com/ipfs/js-ipfs-http-client/commit/2fa16c5)) +* handle request errors in addFromURL ([7c5cea5](https://github.com/ipfs/js-ipfs-http-client/commit/7c5cea5)) +* increase timeout for name.publish and fix setup code ([ceb1106](https://github.com/ipfs/js-ipfs-http-client/commit/ceb1106)) +* ipfs add url wrap doesn't work ([#750](https://github.com/ipfs/js-ipfs-http-client/issues/750)) ([f6f1bf0](https://github.com/ipfs/js-ipfs-http-client/commit/f6f1bf0)) ### Features -* Add offset/length arguments to files.cat ([17967c1](https://github.com/ipfs/js-ipfs-api/commit/17967c1)) -* get it ready for release ([#751](https://github.com/ipfs/js-ipfs-api/issues/751)) ([1885af4](https://github.com/ipfs/js-ipfs-api/commit/1885af4)) +* Add offset/length arguments to files.cat ([17967c1](https://github.com/ipfs/js-ipfs-http-client/commit/17967c1)) +* get it ready for release ([#751](https://github.com/ipfs/js-ipfs-http-client/issues/751)) ([1885af4](https://github.com/ipfs/js-ipfs-http-client/commit/1885af4)) -## [20.0.1](https://github.com/ipfs/js-ipfs-api/compare/v20.0.0...v20.0.1) (2018-04-12) +## [20.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v20.0.0...v20.0.1) (2018-04-12) -# [20.0.0](https://github.com/ipfs/js-ipfs-api/compare/v19.0.0...v20.0.0) (2018-04-05) +# [20.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v19.0.0...v20.0.0) (2018-04-05) ### Bug Fixes -* **dag:** js-ipld format resolver take the raw block ([2683c7e](https://github.com/ipfs/js-ipfs-api/commit/2683c7e)) -* **dag:** path logic for DAG get was wrong ([d2b203b](https://github.com/ipfs/js-ipfs-api/commit/d2b203b)) -* **dag:** use SendOneFile for dag put ([9c37213](https://github.com/ipfs/js-ipfs-api/commit/9c37213)) +* **dag:** js-ipld format resolver take the raw block ([2683c7e](https://github.com/ipfs/js-ipfs-http-client/commit/2683c7e)) +* **dag:** path logic for DAG get was wrong ([d2b203b](https://github.com/ipfs/js-ipfs-http-client/commit/d2b203b)) +* **dag:** use SendOneFile for dag put ([9c37213](https://github.com/ipfs/js-ipfs-http-client/commit/9c37213)) ### Features -* dag.put ([9463d3a](https://github.com/ipfs/js-ipfs-api/commit/9463d3a)) -* **dag:** proper get implementation ([7ba0343](https://github.com/ipfs/js-ipfs-api/commit/7ba0343)) -* **dag:** rebase, use waterfall for put ([ad9eab8](https://github.com/ipfs/js-ipfs-api/commit/ad9eab8)) -* **dag:** update option names to reflect go-ipfs API ([9bf1c6c](https://github.com/ipfs/js-ipfs-api/commit/9bf1c6c)) -* Provide access to bundled libraries when in browser ([#732](https://github.com/ipfs/js-ipfs-api/issues/732)) ([994bdad](https://github.com/ipfs/js-ipfs-api/commit/994bdad)), closes [#406](https://github.com/ipfs/js-ipfs-api/issues/406) -* public-readonly-method-for-getting-host-and-port ([41d32e3](https://github.com/ipfs/js-ipfs-api/commit/41d32e3)), closes [#580](https://github.com/ipfs/js-ipfs-api/issues/580) -* Wrap with dir ([#730](https://github.com/ipfs/js-ipfs-api/issues/730)) ([160860e](https://github.com/ipfs/js-ipfs-api/commit/160860e)) +* dag.put ([9463d3a](https://github.com/ipfs/js-ipfs-http-client/commit/9463d3a)) +* **dag:** proper get implementation ([7ba0343](https://github.com/ipfs/js-ipfs-http-client/commit/7ba0343)) +* **dag:** rebase, use waterfall for put ([ad9eab8](https://github.com/ipfs/js-ipfs-http-client/commit/ad9eab8)) +* **dag:** update option names to reflect go-ipfs API ([9bf1c6c](https://github.com/ipfs/js-ipfs-http-client/commit/9bf1c6c)) +* Provide access to bundled libraries when in browser ([#732](https://github.com/ipfs/js-ipfs-http-client/issues/732)) ([994bdad](https://github.com/ipfs/js-ipfs-http-client/commit/994bdad)), closes [#406](https://github.com/ipfs/js-ipfs-http-client/issues/406) +* public-readonly-method-for-getting-host-and-port ([41d32e3](https://github.com/ipfs/js-ipfs-http-client/commit/41d32e3)), closes [#580](https://github.com/ipfs/js-ipfs-http-client/issues/580) +* Wrap with dir ([#730](https://github.com/ipfs/js-ipfs-http-client/issues/730)) ([160860e](https://github.com/ipfs/js-ipfs-http-client/commit/160860e)) -# [19.0.0](https://github.com/ipfs/js-ipfs-api/compare/v18.2.1...v19.0.0) (2018-03-28) +# [19.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v18.2.1...v19.0.0) (2018-03-28) ### Bug Fixes -* **bitswap:** 0.4.14 returns empty array instead of null ([5e37a54](https://github.com/ipfs/js-ipfs-api/commit/5e37a54)) -* **ping:** tests were failing and there it was missing to catch when count and n are used at the same time ([2181568](https://github.com/ipfs/js-ipfs-api/commit/2181568)) +* **bitswap:** 0.4.14 returns empty array instead of null ([5e37a54](https://github.com/ipfs/js-ipfs-http-client/commit/5e37a54)) +* **ping:** tests were failing and there it was missing to catch when count and n are used at the same time ([2181568](https://github.com/ipfs/js-ipfs-http-client/commit/2181568)) ### Features -* streamable ping and optional packet number ([#723](https://github.com/ipfs/js-ipfs-api/issues/723)) ([3f3ce8a](https://github.com/ipfs/js-ipfs-api/commit/3f3ce8a)) +* streamable ping and optional packet number ([#723](https://github.com/ipfs/js-ipfs-http-client/issues/723)) ([3f3ce8a](https://github.com/ipfs/js-ipfs-http-client/commit/3f3ce8a)) -## [18.2.1](https://github.com/ipfs/js-ipfs-api/compare/v18.2.0...v18.2.1) (2018-03-22) +## [18.2.1](https://github.com/ipfs/js-ipfs-http-client/compare/v18.2.0...v18.2.1) (2018-03-22) ### Features -* add ability to files.cat with a cid instance ([aeeb94e](https://github.com/ipfs/js-ipfs-api/commit/aeeb94e)) +* add ability to files.cat with a cid instance ([aeeb94e](https://github.com/ipfs/js-ipfs-http-client/commit/aeeb94e)) -# [18.2.0](https://github.com/ipfs/js-ipfs-api/compare/v18.1.2...v18.2.0) (2018-03-16) +# [18.2.0](https://github.com/ipfs/js-ipfs-http-client/compare/v18.1.2...v18.2.0) (2018-03-16) ### Bug Fixes -* disable Browser test on Windows ([385a6c3](https://github.com/ipfs/js-ipfs-api/commit/385a6c3)) -* don't create one webpack bundle for every test file ([3967e96](https://github.com/ipfs/js-ipfs-api/commit/3967e96)) -* last fixes for green ([#719](https://github.com/ipfs/js-ipfs-api/issues/719)) ([658bad2](https://github.com/ipfs/js-ipfs-api/commit/658bad2)) -* set the FileResultStreamConverter explicitly ([dfad55e](https://github.com/ipfs/js-ipfs-api/commit/dfad55e)), closes [#696](https://github.com/ipfs/js-ipfs-api/issues/696) -* use a different remote server for test ([1fc15a5](https://github.com/ipfs/js-ipfs-api/commit/1fc15a5)) +* disable Browser test on Windows ([385a6c3](https://github.com/ipfs/js-ipfs-http-client/commit/385a6c3)) +* don't create one webpack bundle for every test file ([3967e96](https://github.com/ipfs/js-ipfs-http-client/commit/3967e96)) +* last fixes for green ([#719](https://github.com/ipfs/js-ipfs-http-client/issues/719)) ([658bad2](https://github.com/ipfs/js-ipfs-http-client/commit/658bad2)) +* set the FileResultStreamConverter explicitly ([dfad55e](https://github.com/ipfs/js-ipfs-http-client/commit/dfad55e)), closes [#696](https://github.com/ipfs/js-ipfs-http-client/issues/696) +* use a different remote server for test ([1fc15a5](https://github.com/ipfs/js-ipfs-http-client/commit/1fc15a5)) ### Features -* --only-hash ([#717](https://github.com/ipfs/js-ipfs-api/issues/717)) ([1137401](https://github.com/ipfs/js-ipfs-api/commit/1137401)), closes [#700](https://github.com/ipfs/js-ipfs-api/issues/700) -* add support for ipfs files stat --with-local ([#695](https://github.com/ipfs/js-ipfs-api/issues/695)) ([b08f21a](https://github.com/ipfs/js-ipfs-api/commit/b08f21a)) +* --only-hash ([#717](https://github.com/ipfs/js-ipfs-http-client/issues/717)) ([1137401](https://github.com/ipfs/js-ipfs-http-client/commit/1137401)), closes [#700](https://github.com/ipfs/js-ipfs-http-client/issues/700) +* add support for ipfs files stat --with-local ([#695](https://github.com/ipfs/js-ipfs-http-client/issues/695)) ([b08f21a](https://github.com/ipfs/js-ipfs-http-client/commit/b08f21a)) -## [18.1.2](https://github.com/ipfs/js-ipfs-api/compare/v18.1.1...v18.1.2) (2018-03-09) +## [18.1.2](https://github.com/ipfs/js-ipfs-http-client/compare/v18.1.1...v18.1.2) (2018-03-09) ### Bug Fixes -* regression on files.add and update deps ([#709](https://github.com/ipfs/js-ipfs-api/issues/709)) ([85cc2a8](https://github.com/ipfs/js-ipfs-api/commit/85cc2a8)) -* remove argument from .stats.bw* ([#699](https://github.com/ipfs/js-ipfs-api/issues/699)) ([f81dce5](https://github.com/ipfs/js-ipfs-api/commit/f81dce5)) +* regression on files.add and update deps ([#709](https://github.com/ipfs/js-ipfs-http-client/issues/709)) ([85cc2a8](https://github.com/ipfs/js-ipfs-http-client/commit/85cc2a8)) +* remove argument from .stats.bw* ([#699](https://github.com/ipfs/js-ipfs-http-client/issues/699)) ([f81dce5](https://github.com/ipfs/js-ipfs-http-client/commit/f81dce5)) -## [18.1.1](https://github.com/ipfs/js-ipfs-api/compare/v18.0.0...v18.1.1) (2018-02-20) +## [18.1.1](https://github.com/ipfs/js-ipfs-http-client/compare/v18.0.0...v18.1.1) (2018-02-20) ### Features -* support recursive ipfs ls ([cfe95f6](https://github.com/ipfs/js-ipfs-api/commit/cfe95f6)) +* support recursive ipfs ls ([cfe95f6](https://github.com/ipfs/js-ipfs-http-client/commit/cfe95f6)) -# [18.1.0](https://github.com/ipfs/js-ipfs-api/compare/v18.0.0...v18.1.0) (2018-02-20) +# [18.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v18.0.0...v18.1.0) (2018-02-20) ### Features -* support recursive ipfs ls ([cfe95f6](https://github.com/ipfs/js-ipfs-api/commit/cfe95f6)) +* support recursive ipfs ls ([cfe95f6](https://github.com/ipfs/js-ipfs-http-client/commit/cfe95f6)) -# [18.0.0](https://github.com/ipfs/js-ipfs-api/compare/v17.5.0...v18.0.0) (2018-02-14) +# [18.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.5.0...v18.0.0) (2018-02-14) ### Bug Fixes -* exception when dir is empty ([#680](https://github.com/ipfs/js-ipfs-api/issues/680)) ([ec04f6e](https://github.com/ipfs/js-ipfs-api/commit/ec04f6e)) -* support all the Buffer shims and load fixtures correctly ([066988f](https://github.com/ipfs/js-ipfs-api/commit/066988f)) -* update stats API ([#684](https://github.com/ipfs/js-ipfs-api/issues/684)) ([4f7999d](https://github.com/ipfs/js-ipfs-api/commit/4f7999d)) +* exception when dir is empty ([#680](https://github.com/ipfs/js-ipfs-http-client/issues/680)) ([ec04f6e](https://github.com/ipfs/js-ipfs-http-client/commit/ec04f6e)) +* support all the Buffer shims and load fixtures correctly ([066988f](https://github.com/ipfs/js-ipfs-http-client/commit/066988f)) +* update stats API ([#684](https://github.com/ipfs/js-ipfs-http-client/issues/684)) ([4f7999d](https://github.com/ipfs/js-ipfs-http-client/commit/4f7999d)) ### Features -* (breaking change) stats spec, spec repo, stream to value on files read ([#679](https://github.com/ipfs/js-ipfs-api/issues/679)) ([118456e](https://github.com/ipfs/js-ipfs-api/commit/118456e)) -* **breaking change:** use stream on stats.bw ([#686](https://github.com/ipfs/js-ipfs-api/issues/686)) ([895760e](https://github.com/ipfs/js-ipfs-api/commit/895760e)) -* ipfs.stop ([5091115](https://github.com/ipfs/js-ipfs-api/commit/5091115)) +* (breaking change) stats spec, spec repo, stream to value on files read ([#679](https://github.com/ipfs/js-ipfs-http-client/issues/679)) ([118456e](https://github.com/ipfs/js-ipfs-http-client/commit/118456e)) +* **breaking change:** use stream on stats.bw ([#686](https://github.com/ipfs/js-ipfs-http-client/issues/686)) ([895760e](https://github.com/ipfs/js-ipfs-http-client/commit/895760e)) +* ipfs.stop ([5091115](https://github.com/ipfs/js-ipfs-http-client/commit/5091115)) -# [17.5.0](https://github.com/ipfs/js-ipfs-api/compare/v17.3.0...v17.5.0) (2018-01-24) +# [17.5.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.3.0...v17.5.0) (2018-01-24) ### Bug Fixes -* normalize stats fields ([#669](https://github.com/ipfs/js-ipfs-api/issues/669)) ([5803d39](https://github.com/ipfs/js-ipfs-api/commit/5803d39)) +* normalize stats fields ([#669](https://github.com/ipfs/js-ipfs-http-client/issues/669)) ([5803d39](https://github.com/ipfs/js-ipfs-http-client/commit/5803d39)) ### Features -* /api/v0/repo/version ([#676](https://github.com/ipfs/js-ipfs-api/issues/676)) ([ecf70b9](https://github.com/ipfs/js-ipfs-api/commit/ecf70b9)) -* integrate new ipfsd-ctl ([2b1820b](https://github.com/ipfs/js-ipfs-api/commit/2b1820b)) +* /api/v0/repo/version ([#676](https://github.com/ipfs/js-ipfs-http-client/issues/676)) ([ecf70b9](https://github.com/ipfs/js-ipfs-http-client/commit/ecf70b9)) +* integrate new ipfsd-ctl ([2b1820b](https://github.com/ipfs/js-ipfs-http-client/commit/2b1820b)) -# [17.4.0](https://github.com/ipfs/js-ipfs-api/compare/v17.3.0...v17.4.0) (2018-01-24) +# [17.4.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.3.0...v17.4.0) (2018-01-24) ### Bug Fixes -* normalize stats fields ([#669](https://github.com/ipfs/js-ipfs-api/issues/669)) ([5803d39](https://github.com/ipfs/js-ipfs-api/commit/5803d39)) +* normalize stats fields ([#669](https://github.com/ipfs/js-ipfs-http-client/issues/669)) ([5803d39](https://github.com/ipfs/js-ipfs-http-client/commit/5803d39)) ### Features -* integrate new ipfsd-ctl ([2b1820b](https://github.com/ipfs/js-ipfs-api/commit/2b1820b)) +* integrate new ipfsd-ctl ([2b1820b](https://github.com/ipfs/js-ipfs-http-client/commit/2b1820b)) -# [17.3.0](https://github.com/ipfs/js-ipfs-api/compare/v17.2.7...v17.3.0) (2018-01-12) +# [17.3.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.7...v17.3.0) (2018-01-12) ### Features -* /api/v0/dns ([#665](https://github.com/ipfs/js-ipfs-api/issues/665)) ([81016bb](https://github.com/ipfs/js-ipfs-api/commit/81016bb)) +* /api/v0/dns ([#665](https://github.com/ipfs/js-ipfs-http-client/issues/665)) ([81016bb](https://github.com/ipfs/js-ipfs-http-client/commit/81016bb)) -## [17.2.7](https://github.com/ipfs/js-ipfs-api/compare/v17.2.6...v17.2.7) (2018-01-11) +## [17.2.7](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.6...v17.2.7) (2018-01-11) ### Bug Fixes -* name and key tests ([#661](https://github.com/ipfs/js-ipfs-api/issues/661)) ([5ab1d02](https://github.com/ipfs/js-ipfs-api/commit/5ab1d02)) +* name and key tests ([#661](https://github.com/ipfs/js-ipfs-http-client/issues/661)) ([5ab1d02](https://github.com/ipfs/js-ipfs-http-client/commit/5ab1d02)) ### Features -* normalize KEY API ([#659](https://github.com/ipfs/js-ipfs-api/issues/659)) ([1b10821](https://github.com/ipfs/js-ipfs-api/commit/1b10821)) -* normalize NAME API ([#658](https://github.com/ipfs/js-ipfs-api/issues/658)) ([9b8ef48](https://github.com/ipfs/js-ipfs-api/commit/9b8ef48)) +* normalize KEY API ([#659](https://github.com/ipfs/js-ipfs-http-client/issues/659)) ([1b10821](https://github.com/ipfs/js-ipfs-http-client/commit/1b10821)) +* normalize NAME API ([#658](https://github.com/ipfs/js-ipfs-http-client/issues/658)) ([9b8ef48](https://github.com/ipfs/js-ipfs-http-client/commit/9b8ef48)) -## [17.2.6](https://github.com/ipfs/js-ipfs-api/compare/v17.2.5...v17.2.6) (2017-12-28) +## [17.2.6](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.5...v17.2.6) (2017-12-28) ### Features -* support key/export and key/import ([#653](https://github.com/ipfs/js-ipfs-api/issues/653)) ([496f08e](https://github.com/ipfs/js-ipfs-api/commit/496f08e)) +* support key/export and key/import ([#653](https://github.com/ipfs/js-ipfs-http-client/issues/653)) ([496f08e](https://github.com/ipfs/js-ipfs-http-client/commit/496f08e)) -## [17.2.5](https://github.com/ipfs/js-ipfs-api/compare/v17.2.4...v17.2.5) (2017-12-20) +## [17.2.5](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.4...v17.2.5) (2017-12-20) ### Bug Fixes -* **files.add:** handle weird directory names ([#646](https://github.com/ipfs/js-ipfs-api/issues/646)) ([012b86c](https://github.com/ipfs/js-ipfs-api/commit/012b86c)) +* **files.add:** handle weird directory names ([#646](https://github.com/ipfs/js-ipfs-http-client/issues/646)) ([012b86c](https://github.com/ipfs/js-ipfs-http-client/commit/012b86c)) ### Features -* add files/flush ([#643](https://github.com/ipfs/js-ipfs-api/issues/643)) ([5c254eb](https://github.com/ipfs/js-ipfs-api/commit/5c254eb)) -* support key/rm and key/rename ([#641](https://github.com/ipfs/js-ipfs-api/issues/641)) ([113030a](https://github.com/ipfs/js-ipfs-api/commit/113030a)) +* add files/flush ([#643](https://github.com/ipfs/js-ipfs-http-client/issues/643)) ([5c254eb](https://github.com/ipfs/js-ipfs-http-client/commit/5c254eb)) +* support key/rm and key/rename ([#641](https://github.com/ipfs/js-ipfs-http-client/issues/641)) ([113030a](https://github.com/ipfs/js-ipfs-http-client/commit/113030a)) -## [17.2.4](https://github.com/ipfs/js-ipfs-api/compare/v17.2.3...v17.2.4) (2017-12-06) +## [17.2.4](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.3...v17.2.4) (2017-12-06) ### Bug Fixes -* stats/bw uses stream ([#640](https://github.com/ipfs/js-ipfs-api/issues/640)) ([c4e922e](https://github.com/ipfs/js-ipfs-api/commit/c4e922e)) +* stats/bw uses stream ([#640](https://github.com/ipfs/js-ipfs-http-client/issues/640)) ([c4e922e](https://github.com/ipfs/js-ipfs-http-client/commit/c4e922e)) -## [17.2.3](https://github.com/ipfs/js-ipfs-api/compare/v17.2.2...v17.2.3) (2017-12-05) +## [17.2.3](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.2...v17.2.3) (2017-12-05) -## [17.2.2](https://github.com/ipfs/js-ipfs-api/compare/v17.2.1...v17.2.2) (2017-12-05) +## [17.2.2](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.1...v17.2.2) (2017-12-05) -## [17.2.1](https://github.com/ipfs/js-ipfs-api/compare/v17.2.0...v17.2.1) (2017-12-05) +## [17.2.1](https://github.com/ipfs/js-ipfs-http-client/compare/v17.2.0...v17.2.1) (2017-12-05) ### Features -* add the stat commands ([#639](https://github.com/ipfs/js-ipfs-api/issues/639)) ([76c3068](https://github.com/ipfs/js-ipfs-api/commit/76c3068)) +* add the stat commands ([#639](https://github.com/ipfs/js-ipfs-http-client/issues/639)) ([76c3068](https://github.com/ipfs/js-ipfs-http-client/commit/76c3068)) -# [17.2.0](https://github.com/ipfs/js-ipfs-api/compare/v17.1.3...v17.2.0) (2017-12-01) +# [17.2.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.1.3...v17.2.0) (2017-12-01) ### Bug Fixes -* propagate trailer errors correctly ([#636](https://github.com/ipfs/js-ipfs-api/issues/636)) ([62d733e](https://github.com/ipfs/js-ipfs-api/commit/62d733e)) +* propagate trailer errors correctly ([#636](https://github.com/ipfs/js-ipfs-http-client/issues/636)) ([62d733e](https://github.com/ipfs/js-ipfs-http-client/commit/62d733e)) -## [17.1.3](https://github.com/ipfs/js-ipfs-api/compare/v17.1.2...v17.1.3) (2017-11-23) +## [17.1.3](https://github.com/ipfs/js-ipfs-http-client/compare/v17.1.2...v17.1.3) (2017-11-23) -## [17.1.2](https://github.com/ipfs/js-ipfs-api/compare/v17.1.1...v17.1.2) (2017-11-22) +## [17.1.2](https://github.com/ipfs/js-ipfs-http-client/compare/v17.1.1...v17.1.2) (2017-11-22) ### Bug Fixes -* config.replace ([#634](https://github.com/ipfs/js-ipfs-api/issues/634)) ([79d79c5](https://github.com/ipfs/js-ipfs-api/commit/79d79c5)), closes [#633](https://github.com/ipfs/js-ipfs-api/issues/633) +* config.replace ([#634](https://github.com/ipfs/js-ipfs-http-client/issues/634)) ([79d79c5](https://github.com/ipfs/js-ipfs-http-client/commit/79d79c5)), closes [#633](https://github.com/ipfs/js-ipfs-http-client/issues/633) -## [17.1.1](https://github.com/ipfs/js-ipfs-api/compare/v17.1.0...v17.1.1) (2017-11-22) +## [17.1.1](https://github.com/ipfs/js-ipfs-http-client/compare/v17.1.0...v17.1.1) (2017-11-22) ### Bug Fixes -* pubsub do not eat error messages ([#632](https://github.com/ipfs/js-ipfs-api/issues/632)) ([5a1bf9b](https://github.com/ipfs/js-ipfs-api/commit/5a1bf9b)) +* pubsub do not eat error messages ([#632](https://github.com/ipfs/js-ipfs-http-client/issues/632)) ([5a1bf9b](https://github.com/ipfs/js-ipfs-http-client/commit/5a1bf9b)) -# [17.1.0](https://github.com/ipfs/js-ipfs-api/compare/v17.0.1...v17.1.0) (2017-11-20) +# [17.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v17.0.1...v17.1.0) (2017-11-20) ### Features -* send files HTTP request should stream ([#629](https://github.com/ipfs/js-ipfs-api/issues/629)) ([dae62cb](https://github.com/ipfs/js-ipfs-api/commit/dae62cb)) +* send files HTTP request should stream ([#629](https://github.com/ipfs/js-ipfs-http-client/issues/629)) ([dae62cb](https://github.com/ipfs/js-ipfs-http-client/commit/dae62cb)) -## [17.0.1](https://github.com/ipfs/js-ipfs-api/compare/v17.0.0...v17.0.1) (2017-11-20) +## [17.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v17.0.0...v17.0.1) (2017-11-20) ### Bug Fixes -* allow topicCIDs from older peers ([#631](https://github.com/ipfs/js-ipfs-api/issues/631)) ([fe7cc22](https://github.com/ipfs/js-ipfs-api/commit/fe7cc22)) +* allow topicCIDs from older peers ([#631](https://github.com/ipfs/js-ipfs-http-client/issues/631)) ([fe7cc22](https://github.com/ipfs/js-ipfs-http-client/commit/fe7cc22)) -# [17.0.0](https://github.com/ipfs/js-ipfs-api/compare/v16.0.0...v17.0.0) (2017-11-17) +# [17.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v16.0.0...v17.0.0) (2017-11-17) ### Features -* Implementing the new interfaces ([#619](https://github.com/ipfs/js-ipfs-api/issues/619)) ([e1b38bf](https://github.com/ipfs/js-ipfs-api/commit/e1b38bf)) +* Implementing the new interfaces ([#619](https://github.com/ipfs/js-ipfs-http-client/issues/619)) ([e1b38bf](https://github.com/ipfs/js-ipfs-http-client/commit/e1b38bf)) -# [16.0.0](https://github.com/ipfs/js-ipfs-api/compare/v15.1.0...v16.0.0) (2017-11-16) +# [16.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v15.1.0...v16.0.0) (2017-11-16) ### Bug Fixes -* pubsub message fields ([#627](https://github.com/ipfs/js-ipfs-api/issues/627)) ([470777d](https://github.com/ipfs/js-ipfs-api/commit/470777d)) +* pubsub message fields ([#627](https://github.com/ipfs/js-ipfs-http-client/issues/627)) ([470777d](https://github.com/ipfs/js-ipfs-http-client/commit/470777d)) -# [15.1.0](https://github.com/ipfs/js-ipfs-api/compare/v15.0.2...v15.1.0) (2017-11-14) +# [15.1.0](https://github.com/ipfs/js-ipfs-http-client/compare/v15.0.2...v15.1.0) (2017-11-14) ### Bug Fixes -* adapting HTTP API to the interface-ipfs-core spec ([#625](https://github.com/ipfs/js-ipfs-api/issues/625)) ([8e58225](https://github.com/ipfs/js-ipfs-api/commit/8e58225)) +* adapting HTTP API to the interface-ipfs-core spec ([#625](https://github.com/ipfs/js-ipfs-http-client/issues/625)) ([8e58225](https://github.com/ipfs/js-ipfs-http-client/commit/8e58225)) ### Features -* windows interop ([#624](https://github.com/ipfs/js-ipfs-api/issues/624)) ([40557d0](https://github.com/ipfs/js-ipfs-api/commit/40557d0)) +* windows interop ([#624](https://github.com/ipfs/js-ipfs-http-client/issues/624)) ([40557d0](https://github.com/ipfs/js-ipfs-http-client/commit/40557d0)) -## [15.0.2](https://github.com/ipfs/js-ipfs-api/compare/v15.0.1...v15.0.2) (2017-11-13) +## [15.0.2](https://github.com/ipfs/js-ipfs-http-client/compare/v15.0.1...v15.0.2) (2017-11-13) -## [15.0.1](https://github.com/ipfs/js-ipfs-api/compare/v15.0.0...v15.0.1) (2017-10-22) +## [15.0.1](https://github.com/ipfs/js-ipfs-http-client/compare/v15.0.0...v15.0.1) (2017-10-22) -# [15.0.0](https://github.com/ipfs/js-ipfs-api/compare/v14.3.7...v15.0.0) (2017-10-22) +# [15.0.0](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.7...v15.0.0) (2017-10-22) ### Features -* update pin API to match interface-ipfs-core ([9102643](https://github.com/ipfs/js-ipfs-api/commit/9102643)) +* update pin API to match interface-ipfs-core ([9102643](https://github.com/ipfs/js-ipfs-http-client/commit/9102643)) -## [14.3.7](https://github.com/ipfs/js-ipfs-api/compare/v14.3.6...v14.3.7) (2017-10-18) +## [14.3.7](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.6...v14.3.7) (2017-10-18) -## [14.3.6](https://github.com/ipfs/js-ipfs-api/compare/v14.3.5...v14.3.6) (2017-10-18) +## [14.3.6](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.5...v14.3.6) (2017-10-18) ### Bug Fixes -* pass the config protocol to http requests ([#609](https://github.com/ipfs/js-ipfs-api/issues/609)) ([38d7289](https://github.com/ipfs/js-ipfs-api/commit/38d7289)) +* pass the config protocol to http requests ([#609](https://github.com/ipfs/js-ipfs-http-client/issues/609)) ([38d7289](https://github.com/ipfs/js-ipfs-http-client/commit/38d7289)) ### Features -* avoid doing multiple RPC requests for files.add, fixes [#522](https://github.com/ipfs/js-ipfs-api/issues/522) ([#595](https://github.com/ipfs/js-ipfs-api/issues/595)) ([0ea5f57](https://github.com/ipfs/js-ipfs-api/commit/0ea5f57)) -* report progress on ipfs add ([e2d894c](https://github.com/ipfs/js-ipfs-api/commit/e2d894c)) +* avoid doing multiple RPC requests for files.add, fixes [#522](https://github.com/ipfs/js-ipfs-http-client/issues/522) ([#595](https://github.com/ipfs/js-ipfs-http-client/issues/595)) ([0ea5f57](https://github.com/ipfs/js-ipfs-http-client/commit/0ea5f57)) +* report progress on ipfs add ([e2d894c](https://github.com/ipfs/js-ipfs-http-client/commit/e2d894c)) -## [14.3.5](https://github.com/ipfs/js-ipfs-api/compare/v14.3.4...v14.3.5) (2017-09-08) +## [14.3.5](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.4...v14.3.5) (2017-09-08) ### Features -* Support specify hash algorithm in files.add ([#597](https://github.com/ipfs/js-ipfs-api/issues/597)) ([ed68657](https://github.com/ipfs/js-ipfs-api/commit/ed68657)) +* Support specify hash algorithm in files.add ([#597](https://github.com/ipfs/js-ipfs-http-client/issues/597)) ([ed68657](https://github.com/ipfs/js-ipfs-http-client/commit/ed68657)) -## [14.3.4](https://github.com/ipfs/js-ipfs-api/compare/v14.3.3...v14.3.4) (2017-09-07) +## [14.3.4](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.3...v14.3.4) (2017-09-07) -## [14.3.3](https://github.com/ipfs/js-ipfs-api/compare/v14.3.2...v14.3.3) (2017-09-07) +## [14.3.3](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.2...v14.3.3) (2017-09-07) ### Features -* support options for .add / files.add ([8c717b2](https://github.com/ipfs/js-ipfs-api/commit/8c717b2)) +* support options for .add / files.add ([8c717b2](https://github.com/ipfs/js-ipfs-http-client/commit/8c717b2)) -## [14.3.2](https://github.com/ipfs/js-ipfs-api/compare/v14.3.1...v14.3.2) (2017-09-04) +## [14.3.2](https://github.com/ipfs/js-ipfs-http-client/compare/v14.3.1...v14.3.2) (2017-09-04) ### Bug Fixes -* new fixed aegir ([93ac472](https://github.com/ipfs/js-ipfs-api/commit/93ac472)) +* new fixed aegir ([93ac472](https://github.com/ipfs/js-ipfs-http-client/commit/93ac472)) diff --git a/README.md b/README.md index a5fd30e6f..7484d6a00 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,11 @@

- - - + + +
- + @@ -51,7 +51,7 @@ This module uses node.js, and can be installed through npm: ```bash -npm install --save ipfs-api +npm install --save ipfs-http-client ``` We support both the Current and Active LTS versions of Node.js. Please see [nodejs.org](https://nodejs.org/) for what these currently are. @@ -75,27 +75,27 @@ To interact with the API, you need to have a local daemon running. It needs to b ### Importing the module and usage ```javascript -var ipfsAPI = require('ipfs-api') +var ipfsClient = require('ipfs-http-client') // connect to ipfs daemon API server -var ipfs = ipfsAPI('localhost', '5001', {protocol: 'http'}) // leaving out the arguments will default to these values +var ipfs = ipfsClient('localhost', '5001', { protocol: 'http' }) // leaving out the arguments will default to these values // or connect with multiaddr -var ipfs = ipfsAPI('/ip4/127.0.0.1/tcp/5001') +var ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001') // or using options -var ipfs = ipfsAPI({host: 'localhost', port: '5001', protocol: 'http'}) +var ipfs = ipfsClient({ host: 'localhost', port: '5001', protocol: 'http' }) // or specifying a specific API path -var ipfs = ipfsAPI({host: '1.1.1.1', port: '80', 'api-path': '/ipfs/api/v0'}) +var ipfs = ipfsClient({ host: '1.1.1.1', port: '80', 'api-path': '/ipfs/api/v0' }) ``` ### Importing a sub-module and usage ```javascript -const bitswap = require('ipfs-api/src/bitswap')('/ip4/127.0.0.1/tcp/5001') +const bitswap = require('ipfs-http-client/src/bitswap')('/ip4/127.0.0.1/tcp/5001') -bitswap.unwant(key, (err) => { +bitswap.wantlist(key, (err) => { // ... }) ``` @@ -110,7 +110,7 @@ See the example in the [examples folder](/examples/bundle-browserify) to get a b **through webpack** -See the example in the [examples folder](/examples/bundle-webpack) to get an idea on how to use js-ipfs-api with webpack. +See the example in the [examples folder](/examples/bundle-webpack) to get an idea on how to use `js-ipfs-http-client` with webpack. **from CDN** @@ -120,9 +120,9 @@ To always request the latest version, use the following: ```html - + - + ``` For maximum security you may also decide to: @@ -134,26 +134,26 @@ For maximum security you may also decide to: Example: ```html - ``` -CDN-based IPFS API provides the `IpfsApi` constructor as a method of the global `window` object. Example: +CDN-based IPFS API provides the `IpfsHttpClient` constructor as a method of the global `window` object. Example: ```js -const ipfs = window.IpfsApi('localhost', '5001') +const ipfs = window.IpfsHttpClient('localhost', '5001') ``` -If you omit the host and port, the API will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways: +If you omit the host and port, the client will parse `window.host`, and use this information. This also works, and can be useful if you want to write apps that can be run from multiple different gateways: ```js -const ipfs = window.IpfsApi() +const ipfs = window.IpfsHttpClient() ``` ### CORS -In a web browser IPFS API (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS ("Cross Origin Resource Sharing") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this: +In a web browser IPFS HTTP client (either browserified or CDN-based) might encounter an error saying that the origin is not allowed. This would be a CORS ("Cross Origin Resource Sharing") failure: IPFS servers are designed to reject requests from unknown domains by default. You can whitelist the domain that you are calling from by changing your ipfs config like this: ```bash ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://example.com\"]" @@ -165,8 +165,8 @@ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods "[\"PUT\", \"POS If you wish to send custom headers with each request made by this library, for example, the Authorization header. You can use the config to do so: -``` -const ipfs = IpfsApi({ +```js +const ipfs = ipfsClient({ host: 'localhost', port: 5001, protocol: 'http', @@ -182,7 +182,7 @@ const ipfs = IpfsApi({ [![IPFS Core API Compatible](https://cdn.rawgit.com/ipfs/interface-ipfs-core/master/img/badge.svg)](https://github.com/ipfs/interface-ipfs-core) -> `js-ipfs-api` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available. +> `js-ipfs-http-client` follows the spec defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), which concerns the interface to expect from IPFS implementations. This interface is a currently active endeavor. You can use it today to consult the methods available. #### Files @@ -329,18 +329,18 @@ const ipfs = IpfsApi({ #### Pubsub Caveat -**Currently, the [PubSub API only works in Node.js environment](https://github.com/ipfs/js-ipfs-api/issues/518)** +**Currently, the [PubSub API only works in Node.js environment](https://github.com/ipfs/js-ipfs-http-client/issues/518)** We currently don't support pubsub when run in the browser, and we test it with separate set of tests to make sure if it's being used in the browser, pubsub errors. -More info: https://github.com/ipfs/js-ipfs-api/issues/518 +More info: https://github.com/ipfs/js-ipfs-http-client/issues/518 This means: -- You can use pubsub from js-ipfs-api in Node.js -- You can use pubsub from js-ipfs-api in Electron - (when js-ipfs-api is ran in the main process of Electron) -- You can't use pubsub from js-ipfs-api in the browser -- You can't use pubsub from js-ipfs-api in Electron's +- You can use pubsub from js-ipfs-http-client in Node.js +- You can use pubsub from js-ipfs-http-client in Electron + (when js-ipfs-http-client is ran in the main process of Electron) +- You can't use pubsub from js-ipfs-http-client in the browser +- You can't use pubsub from js-ipfs-http-client in Electron's renderer process - You can use pubsub from js-ipfs in the browsers - You can use pubsub from js-ipfs in Node.js @@ -360,14 +360,12 @@ A set of data types are exposed directly from the IPFS instance under `ipfs.type - [`ipfs.types.multibase`](https://github.com/multiformats/multibase) - [`ipfs.types.multihash`](https://github.com/multiformats/js-multihash) - [`ipfs.types.CID`](https://github.com/ipld/js-cid) -- [`ipfs.types.dagPB`](https://github.com/ipld/js-ipld-dag-pb) -- [`ipfs.types.dagCBOR`](https://github.com/ipld/js-ipld-dag-cbor) #### Extra (util) functions -Adding to the methods defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), `js-ipfs-api` exposes a set of extra utility methods. These utility functions are scoped behind the `ipfs.util`. +Adding to the methods defined by [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core), `js-ipfs-http-client` exposes a set of extra utility methods. These utility functions are scoped behind the `ipfs.util`. -Complete documentation for these methods is coming with: https://github.com/ipfs/js-ipfs-api/pull/305 +Complete documentation for these methods is coming with: https://github.com/ipfs/js-ipfs-http-client/pull/305 ##### Get endpoint configuration (host and port) @@ -395,9 +393,9 @@ We run tests by executing `npm test` in a terminal window. This will run both No ## Contribute -The js-ipfs-api is a work in progress. As such, there's a few things you can do right now to help out: +The js-ipfs-http-client is a work in progress. As such, there's a few things you can do right now to help out: -- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-api/issues)**! +- **[Check out the existing issues](https://github.com/ipfs/js-ipfs-http-client/issues)**! - **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs. - **Add tests**. There can never be enough tests. Note that interface tests exist inside [`interface-ipfs-core`](https://github.com/ipfs/interface-ipfs-core/tree/master/js/src). - **Contribute to the [FAQ repository](https://github.com/ipfs/faq/issues)** with any questions you have about IPFS or any of the relevant technology. A good example would be asking, 'What is a merkledag tree?'. If you don't know a term, odds are, someone else doesn't either. Eventually, we should have a good understanding of where we need to improve communications and teaching together to make IPFS and IPN better. @@ -414,4 +412,4 @@ This module started as a direct mapping from the go-ipfs cli to a JavaScript imp [MIT](LICENSE) -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-api.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-api?ref=badge_large) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fipfs%2Fjs-ipfs-http-client?ref=badge_large) diff --git a/examples/bundle-browserify/README.md b/examples/bundle-browserify/README.md index 80944615d..a185527e0 100644 --- a/examples/bundle-browserify/README.md +++ b/examples/bundle-browserify/README.md @@ -1,15 +1,15 @@ -# Bundle js-ipfs-api with Browserify! +# Bundle js-ipfs-http-client with Browserify! -> In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs-api with browserify, so that you can use it in your own web app! +> In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs-http-client with browserify, so that you can use it in your own web app! ## Setup -As for any js-ipfs-api example, **you need a running IPFS daemon**, you learn how to do that here: +As for any js-ipfs-http-client example, **you need a running IPFS daemon**, you learn how to do that here: - [Spawn a go-ipfs daemon](https://ipfs.io/docs/getting-started/) - [Spawn a js-ipfs daemon](https://github.com/ipfs/js-ipfs#usage) -**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-api#cors to learn how to do that. +**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-http-client#cors to learn how to do that. A quick (and dirty way to get it done) is: diff --git a/examples/bundle-browserify/index.js b/examples/bundle-browserify/index.js index b9dfce26a..1be85b9d9 100644 --- a/examples/bundle-browserify/index.js +++ b/examples/bundle-browserify/index.js @@ -1,6 +1,6 @@ 'use strict' -var IPFS = require('ipfs-api') +var IPFS = require('ipfs-http-client') var ipfs = IPFS() diff --git a/examples/bundle-browserify/package.json b/examples/bundle-browserify/package.json index 576b8304c..4e64ef8a5 100644 --- a/examples/bundle-browserify/package.json +++ b/examples/bundle-browserify/package.json @@ -1,7 +1,7 @@ { "name": "bundle-browserify", "version": "1.0.0", - "description": "Bundle js-ipfs-api with Browserify", + "description": "Bundle js-ipfs-http-client with Browserify", "main": "index.js", "scripts": { "start": "browserify index.js > bundle.js && http-server -a 127.0.0.1 -p 8888" @@ -11,7 +11,7 @@ "license": "MIT", "devDependencies": { "browserify": "^13.1.1", - "ipfs-api": "../../", + "ipfs-http-client": "../../", "http-server": "~0.9.0" }, "dependencies": {} diff --git a/examples/bundle-webpack/README.md b/examples/bundle-webpack/README.md index 6349cab74..3b894b7f5 100644 --- a/examples/bundle-webpack/README.md +++ b/examples/bundle-webpack/README.md @@ -1,15 +1,15 @@ -# Bundle js-ipfs-api with Webpack! +# Bundle js-ipfs-http-client with Webpack! -> In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs-api with webpack, so that you can use it in your own web app! +> In this example, you will find a boilerplate you can use to guide yourself into bundling js-ipfs-http-client with webpack, so that you can use it in your own web app! ## Setup -As for any js-ipfs-api example, **you need a running IPFS daemon**, you learn how to do that here: +As for any js-ipfs-http-client example, **you need a running IPFS daemon**, you learn how to do that here: - [Spawn a go-ipfs daemon](https://ipfs.io/docs/getting-started/) - [Spawn a js-ipfs daemon](https://github.com/ipfs/js-ipfs#usage) -**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-api#cors to learn how to do that. +**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-http-client#cors to learn how to do that. A quick (and dirty way to get it done) is: diff --git a/examples/bundle-webpack/package.json b/examples/bundle-webpack/package.json index be4be8fa6..bd72b6710 100644 --- a/examples/bundle-webpack/package.json +++ b/examples/bundle-webpack/package.json @@ -1,7 +1,7 @@ { "name": "bundle-webpack", "version": "1.0.0", - "description": "Bundle js-ipfs-api with Webpack", + "description": "Bundle js-ipfs-http-client with Webpack", "scripts": { "start": "node server.js" }, @@ -11,7 +11,7 @@ "devDependencies": { "babel-core": "^5.4.7", "babel-loader": "^5.1.2", - "ipfs-api": "../../", + "ipfs-http-client": "../../", "json-loader": "~0.5.3", "react": "~0.13.0", "react-hot-loader": "^1.3.0", diff --git a/examples/bundle-webpack/src/App.js b/examples/bundle-webpack/src/App.js index 1c8d3d149..50889088c 100644 --- a/examples/bundle-webpack/src/App.js +++ b/examples/bundle-webpack/src/App.js @@ -1,8 +1,8 @@ 'use strict' const React = require('react') -const ipfsAPI = require('ipfs-api') +const ipfsClient = require('ipfs-http-client') -const ipfs = ipfsAPI('localhost', '5001') +const ipfs = ipfsClient('localhost', '5001') const stringToUse = 'hello world from webpacked IPFS' class App extends React.Component { diff --git a/examples/name-api/README.md b/examples/name-api/README.md index 5a9189940..11d814464 100644 --- a/examples/name-api/README.md +++ b/examples/name-api/README.md @@ -4,7 +4,7 @@ Install [go-ipfs](https://ipfs.io/docs/install/) and start the daemon. -Configure CORS as suggested by the README https://github.com/ipfs/js-ipfs-api#cors +Configure CORS as suggested by the README https://github.com/ipfs/js-ipfs-http-client#cors ```bash > ipfs daemon diff --git a/examples/name-api/index.html b/examples/name-api/index.html index f277dd98e..3e5fba013 100644 --- a/examples/name-api/index.html +++ b/examples/name-api/index.html @@ -15,7 +15,7 @@ -

js-ipfs-api

+

js-ipfs-http-client

name.publish() and name.resolve()

initializing... @@ -58,7 +58,7 @@

Resolve an IPNS name

- + diff --git a/examples/name-api/index.js b/examples/name-api/index.js index 263c051cf..1c1c75a30 100644 --- a/examples/name-api/index.js +++ b/examples/name-api/index.js @@ -1,6 +1,6 @@ 'use strict' -const ipfs = window.IpfsApi('/ip4/127.0.0.1/tcp/5001') +const ipfs = window.IpfsHttpClient('/ip4/127.0.0.1/tcp/5001') const DOM = { status: document.getElementById('status'), diff --git a/examples/name-api/package.json b/examples/name-api/package.json index 388d50e01..b8b0cab35 100644 --- a/examples/name-api/package.json +++ b/examples/name-api/package.json @@ -1,5 +1,5 @@ { - "name": "js-ipfs-api-example-name-publish-resolve", + "name": "js-ipfs-http-client-example-name-publish-resolve", "version": "1.0.0", "description": "", "main": "index.js", diff --git a/examples/upload-file-via-browser/README.md b/examples/upload-file-via-browser/README.md index 170f67fe2..20d1a6957 100644 --- a/examples/upload-file-via-browser/README.md +++ b/examples/upload-file-via-browser/README.md @@ -1,15 +1,15 @@ -# Upload file to IPFS via browser using js-ipfs-api +# Upload file to IPFS via browser using js-ipfs-http-client -> In this example, you will find a simple React app to upload a file to IPFS via the browser using js-ipfs-api and Webpack. +> In this example, you will find a simple React app to upload a file to IPFS via the browser using js-ipfs-http-client and Webpack. ## Setup -As for any js-ipfs-api example, **you need a running IPFS daemon**, you learn how to do that here: +As for any js-ipfs-http-client example, **you need a running IPFS daemon**, you learn how to do that here: - [Spawn a go-ipfs daemon](https://ipfs.io/docs/getting-started/) - [Spawn a js-ipfs daemon](https://github.com/ipfs/js-ipfs#usage) -**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-api#cors to learn how to do that. +**Note:** If you load your app from a different domain than the one the daemon is running (most probably), you will need to set up CORS, see https://github.com/ipfs/js-ipfs-http-client#cors to learn how to do that. A quick (and dirty way to get it done) is: @@ -31,4 +31,4 @@ Now open your browser at `http://localhost:3000` After uploading a file (left screen), and opening the uploaded file (right screen), you should see something like: -![App Screenshot](https://cdn.rawgit.com/ipfs/js-ipfs-api/320fcfc6155a771027bdf0cc661e37a407d35efb/examples/upload-file-via-browser/screenshot.png) +![App Screenshot](https://cdn.rawgit.com/ipfs/js-ipfs-http-client/320fcfc6155a771027bdf0cc661e37a407d35efb/examples/upload-file-via-browser/screenshot.png) diff --git a/examples/upload-file-via-browser/package.json b/examples/upload-file-via-browser/package.json index da0a05880..24130b384 100644 --- a/examples/upload-file-via-browser/package.json +++ b/examples/upload-file-via-browser/package.json @@ -1,7 +1,7 @@ { "name": "upload-file-via-browser", "version": "1.0.0", - "description": "Upload file to IPFS via browser using js-ipfs-api with Webpack", + "description": "Upload file to IPFS via browser using js-ipfs-http-client with Webpack", "scripts": { "start": "node server.js" }, @@ -13,7 +13,7 @@ "devDependencies": { "babel-core": "~6.26.3", "babel-loader": "~8.0.4", - "ipfs-api": "../../", + "ipfs-http-client": "../../", "pull-file-reader": "~1.0.2", "react": "~16.6.3", "react-dom": "~16.6.3", diff --git a/examples/upload-file-via-browser/src/App.js b/examples/upload-file-via-browser/src/App.js index 732bec401..77f5b43d2 100644 --- a/examples/upload-file-via-browser/src/App.js +++ b/examples/upload-file-via-browser/src/App.js @@ -1,6 +1,6 @@ 'use strict' const React = require('react') -const ipfsAPI = require('ipfs-api') +const ipfsClient = require('ipfs-http-client') // create a stream from a file, which enables uploads of big files without allocating memory twice const fileReaderPullStream = require('pull-file-reader') @@ -11,7 +11,7 @@ class App extends React.Component { this.state = { added_file_hash: null } - this.ipfsApi = ipfsAPI('localhost', '5001') + this.ipfs = ipfsClient('localhost', '5001') // bind methods this.captureFile = this.captureFile.bind(this) @@ -35,7 +35,7 @@ class App extends React.Component { saveToIpfs (file) { let ipfsId const fileStream = fileReaderPullStream(file) - this.ipfsApi.add(fileStream, { progress: (prog) => console.log(`received: ${prog}`) }) + this.ipfs.add(fileStream, { progress: (prog) => console.log(`received: ${prog}`) }) .then((response) => { console.log(response) ipfsId = response[0].hash @@ -59,7 +59,7 @@ class App extends React.Component { wrapWithDirectory: true, progress: (prog) => console.log(`received: ${prog}`) } - this.ipfsApi.add(fileDetails, options) + this.ipfs.add(fileDetails, options) .then((response) => { console.log(response) // CID of wrapping directory is returned last diff --git a/package.json b/package.json index aaa11a6fd..7d9aa1392 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "ipfs-api", + "name": "ipfs-http-client", "version": "26.1.2", "description": "A client library for the IPFS HTTP API", "leadMaintainer": "Alan Shaw ", @@ -9,7 +9,7 @@ "fs": false, "stream": "readable-stream", "http": "stream-http", - "ipfs-api": false, + "ipfs-http-client": false, "ipfs": false }, "scripts": { @@ -74,7 +74,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/ipfs/js-ipfs-api" + "url": "https://github.com/ipfs/js-ipfs-http-client" }, "devDependencies": { "aegir": "^17.1.1", @@ -178,7 +178,7 @@ ], "license": "MIT", "bugs": { - "url": "https://github.com/ipfs/js-ipfs-api/issues" + "url": "https://github.com/ipfs/js-ipfs-http-client/issues" }, - "homepage": "https://github.com/ipfs/js-ipfs-api" + "homepage": "https://github.com/ipfs/js-ipfs-http-client" } diff --git a/src/dag/get.js b/src/dag/get.js index f3b7027e2..dc4e46b4a 100644 --- a/src/dag/get.js +++ b/src/dag/get.js @@ -47,7 +47,7 @@ module.exports = (send) => { (ipfsBlock, path, cb) => { const dagResolver = resolvers[ipfsBlock.cid.codec] if (!dagResolver) { - const error = new Error('ipfs-api is missing DAG resolver for "' + ipfsBlock.cid.codec + '" multicodec') + const error = new Error('ipfs-http-client is missing DAG resolver for "' + ipfsBlock.cid.codec + '" multicodec') error.missingMulticodec = ipfsBlock.cid.codec cb(error) return diff --git a/src/index.js b/src/index.js index 323cab653..5643084d0 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ const loadCommands = require('./utils/load-commands') const getConfig = require('./utils/default-config') const sendRequest = require('./utils/send-request') -function IpfsAPI (hostOrMultiaddr, port, opts) { +function ipfsClient (hostOrMultiaddr, port, opts) { const config = getConfig() try { @@ -44,4 +44,4 @@ function IpfsAPI (hostOrMultiaddr, port, opts) { return cmds } -exports = module.exports = IpfsAPI +module.exports = ipfsClient diff --git a/src/utils/send-request.js b/src/utils/send-request.js index c8dfb4dd8..16351bb39 100644 --- a/src/utils/send-request.js +++ b/src/utils/send-request.js @@ -9,7 +9,7 @@ const once = require('once') const streamToValue = require('./stream-to-value') const streamToJsonValue = require('./stream-to-json-value') const request = require('./request') -const log = require('debug')('ipfs-api:request') +const log = require('debug')('ipfs-http-client:request') // -- Internal diff --git a/test/commands.spec.js b/test/commands.spec.js index 2e82f6d8d..dd97269ba 100644 --- a/test/commands.spec.js +++ b/test/commands.spec.js @@ -6,7 +6,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') @@ -20,7 +20,7 @@ describe('.commands', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/constructor.spec.js b/test/constructor.spec.js index 0a3af1897..e2ec239f0 100644 --- a/test/constructor.spec.js +++ b/test/constructor.spec.js @@ -7,7 +7,7 @@ const expect = chai.expect chai.use(dirtyChai) const f = require('./utils/factory') -const ipfsAPI = require('../src/index.js') +const ipfsClient = require('../src/index.js') function clientWorks (client, done) { client.id((err, id) => { @@ -19,7 +19,7 @@ function clientWorks (client, done) { }) } -describe('ipfs-api constructor tests', () => { +describe('ipfs-http-client constructor tests', () => { describe('parameter permuations', () => { let apiAddr let ipfsd @@ -42,7 +42,7 @@ describe('ipfs-api constructor tests', () => { it('opts', (done) => { const splitted = apiAddr.split('/') - clientWorks(ipfsAPI({ + clientWorks(ipfsClient({ host: splitted[2], port: splitted[4], protocol: 'http' @@ -50,19 +50,19 @@ describe('ipfs-api constructor tests', () => { }) it('mutliaddr, opts', (done) => { - clientWorks(ipfsAPI(apiAddr, { protocol: 'http' }), done) + clientWorks(ipfsClient(apiAddr, { protocol: 'http' }), done) }) it('host, port', (done) => { const splitted = apiAddr.split('/') - clientWorks(ipfsAPI(splitted[2], splitted[4]), done) + clientWorks(ipfsClient(splitted[2], splitted[4]), done) }) it('specify host, port and api path', (done) => { const splitted = apiAddr.split('/') - clientWorks(ipfsAPI({ + clientWorks(ipfsClient({ host: splitted[2], port: splitted[4], 'api-path': '/api/v0/' @@ -72,7 +72,7 @@ describe('ipfs-api constructor tests', () => { it('host, port, opts', (done) => { const splitted = apiAddr.split('/') - clientWorks(ipfsAPI(splitted[2], splitted[4], { protocol: 'http' }), done) + clientWorks(ipfsClient(splitted[2], splitted[4], { protocol: 'http' }), done) }) }) }) diff --git a/test/custom-headers.spec.js b/test/custom-headers.spec.js index 2cf4c71c3..bda3c60b0 100644 --- a/test/custom-headers.spec.js +++ b/test/custom-headers.spec.js @@ -7,7 +7,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('custom headers', function () { @@ -21,7 +21,7 @@ describe('custom headers', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi({ + ipfs = ipfsClient({ host: 'localhost', port: 6001, protocol: 'http', diff --git a/test/dag.spec.js b/test/dag.spec.js index a944f5c57..9c92c2d14 100644 --- a/test/dag.spec.js +++ b/test/dag.spec.js @@ -11,7 +11,7 @@ const series = require('async/series') const dagPB = require('ipld-dag-pb') const DAGNode = dagPB.DAGNode const CID = require('cids') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') let ipfsd @@ -24,7 +24,7 @@ describe('.dag', function () { (cb) => f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) cb() }) ], done) @@ -79,7 +79,7 @@ describe('.dag', function () { ipfs.dag.get(cid, (err, result) => { expect(result).to.not.exist() - expect(err.message).to.equal('ipfs-api is missing DAG resolver for "raw" multicodec') + expect(err.message).to.equal('ipfs-http-client is missing DAG resolver for "raw" multicodec') done() }) }) diff --git a/test/diag.spec.js b/test/diag.spec.js index d2648024d..c3afffe05 100644 --- a/test/diag.spec.js +++ b/test/diag.spec.js @@ -7,7 +7,7 @@ const expect = chai.expect chai.use(dirtyChai) const platform = require('browser-process-platform') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.diag', function () { @@ -23,7 +23,7 @@ describe('.diag', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/files-mfs.spec.js b/test/files-mfs.spec.js index 2929bea16..38fc35a40 100644 --- a/test/files-mfs.spec.js +++ b/test/files-mfs.spec.js @@ -11,7 +11,7 @@ const mh = require('multihashes') const CID = require('cids') const pull = require('pull-stream') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') const expectTimeout = require('./utils/expect-timeout') @@ -41,7 +41,7 @@ describe('.files (the MFS API part)', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/get.spec.js b/test/get.spec.js index 29987bce1..84abf5c80 100644 --- a/test/get.spec.js +++ b/test/get.spec.js @@ -11,7 +11,7 @@ const isNode = require('detect-node') const series = require('async/series') const loadFixture = require('aegir/fixtures') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.get (specific go-ipfs features)', function () { @@ -34,7 +34,7 @@ describe('.get (specific go-ipfs features)', function () { (cb) => f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) cb() }), (cb) => ipfs.add(smallFile.data, cb) diff --git a/test/interface.spec.js b/test/interface.spec.js index eef7f0434..b726f8cb0 100644 --- a/test/interface.spec.js +++ b/test/interface.spec.js @@ -4,7 +4,7 @@ const tests = require('interface-ipfs-core') const isNode = require('detect-node') const CommonFactory = require('./utils/interface-common-factory') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const isWindows = process.platform && process.platform === 'win32' describe('interface-ipfs-core tests', () => { @@ -43,7 +43,7 @@ describe('interface-ipfs-core tests', () => { // config.replace { name: 'replace', - reason: 'FIXME Waiting for fix on go-ipfs https://github.com/ipfs/js-ipfs-api/pull/307#discussion_r69281789 and https://github.com/ipfs/go-ipfs/issues/2927' + reason: 'FIXME Waiting for fix on go-ipfs https://github.com/ipfs/js-ipfs-http-client/pull/307#discussion_r69281789 and https://github.com/ipfs/go-ipfs/issues/2927' } ] }) @@ -96,21 +96,21 @@ describe('interface-ipfs-core tests', () => { // .add isNode ? null : { name: 'should add a nested directory as array of tupples', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, isNode ? null : { name: 'should add a nested directory as array of tupples with progress', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .addPullStream isNode ? null : { name: 'should add pull stream of valid files and dirs', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .addReadableStream isNode ? null : { name: 'should add readable stream of valid files and dirs', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .addFromStream isNode ? null : { @@ -143,22 +143,22 @@ describe('interface-ipfs-core tests', () => { // .get isNode ? null : { name: 'should get a directory', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .ls isNode ? null : { name: 'should ls with a base58 encoded CID', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .lsPullStream isNode ? null : { name: 'should pull stream ls with a base58 encoded CID', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' }, // .lsReadableStream isNode ? null : { name: 'should readable stream ls with a base58 encoded CID', - reason: 'FIXME https://github.com/ipfs/js-ipfs-api/issues/339' + reason: 'FIXME https://github.com/ipfs/js-ipfs-http-client/issues/339' } ] }) @@ -234,7 +234,7 @@ describe('interface-ipfs-core tests', () => { reason: 'FIXME https://github.com/ipfs/interface-ipfs-core/pull/188#issuecomment-354673246 and https://github.com/ipfs/go-ipfs/issues/4778' } : null ] : { - reason: 'FIXME pubsub is not supported in the browser https://github.com/ipfs/js-ipfs-api/issues/518' + reason: 'FIXME pubsub is not supported in the browser https://github.com/ipfs/js-ipfs-http-client/issues/518' } }) @@ -265,7 +265,7 @@ describe('interface-ipfs-core tests', () => { } nodes.push(_ipfsd) - cb(null, IPFSApi(_ipfsd.apiAddr)) + cb(null, ipfsClient(_ipfsd.apiAddr)) }) } }) diff --git a/test/key.spec.js b/test/key.spec.js index 7de7a2a97..5c729a90e 100644 --- a/test/key.spec.js +++ b/test/key.spec.js @@ -7,7 +7,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.key', function () { @@ -20,7 +20,7 @@ describe('.key', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/log.spec.js b/test/log.spec.js index 38f9cf58c..ebccc029c 100644 --- a/test/log.spec.js +++ b/test/log.spec.js @@ -7,7 +7,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.log', function () { @@ -20,7 +20,7 @@ describe('.log', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/name.spec.js b/test/name.spec.js index 58de812fe..3b352e6b9 100644 --- a/test/name.spec.js +++ b/test/name.spec.js @@ -10,7 +10,7 @@ const parallel = require('async/parallel') const series = require('async/series') const loadFixture = require('aegir/fixtures') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') const testfile = loadFixture('test/fixtures/testfile.txt') @@ -31,7 +31,7 @@ describe('.name', () => { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) cb() }) }, diff --git a/test/node/swarm.js b/test/node/swarm.js index 5ac36ca6b..0ba0fe73f 100644 --- a/test/node/swarm.js +++ b/test/node/swarm.js @@ -7,12 +7,12 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../../src') +const ipfsClient = require('../../src') describe('.swarm.peers', function () { this.timeout(50 * 1000) // slow CI - const ipfs = IPFSApi('/ip4/127.0.0.1/tcp/5001') + const ipfs = ipfsClient('/ip4/127.0.0.1/tcp/5001') const apiUrl = 'http://127.0.0.1:5001' it('handles a peer response', (done) => { diff --git a/test/ping.spec.js b/test/ping.spec.js index 184f99b8d..2dede0328 100644 --- a/test/ping.spec.js +++ b/test/ping.spec.js @@ -11,7 +11,7 @@ chai.use(dirtyChai) const parallel = require('async/parallel') const series = require('async/series') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const PingMessageStream = require('../src/utils/ping-message-stream') const f = require('./utils/factory') @@ -37,7 +37,7 @@ describe('.ping', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) cb() }) }, diff --git a/test/pubsub-in-browser.spec.js b/test/pubsub-in-browser.spec.js index 6a47044f9..0f7dc3ce7 100644 --- a/test/pubsub-in-browser.spec.js +++ b/test/pubsub-in-browser.spec.js @@ -3,15 +3,15 @@ and we test it with separate set of tests to make sure if it's being used in the browser, pubsub errors. - More info: https://github.com/ipfs/js-ipfs-api/issues/518 + More info: https://github.com/ipfs/js-ipfs-http-client/issues/518 This means: - - You can use pubsub from js-ipfs-api in Node.js - - You can use pubsub from js-ipfs-api in Electron - (when js-ipfs-api is ran in the main process of Electron) + - You can use pubsub from js-ipfs-http-client in Node.js + - You can use pubsub from js-ipfs-http-client in Electron + (when js-ipfs-http-client is ran in the main process of Electron) - - You can't use pubsub from js-ipfs-api in the browser - - You can't use pubsub from js-ipfs-api in Electron's + - You can't use pubsub from js-ipfs-http-client in the browser + - You can't use pubsub from js-ipfs-http-client in Electron's renderer process - You can use pubsub from js-ipfs in the browsers @@ -32,7 +32,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') const expectedError = 'pubsub is currently not supported when run in the browser' @@ -50,7 +50,7 @@ describe('.pubsub is not supported in the browser, yet!', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/refs.spec.js b/test/refs.spec.js index 4f6cc2864..06fe10142 100644 --- a/test/refs.spec.js +++ b/test/refs.spec.js @@ -10,7 +10,7 @@ const waterfall = require('async/waterfall') const path = require('path') const fs = require('fs') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.refs', function () { @@ -38,7 +38,7 @@ describe('.refs', function () { (cb) => f.spawn({ initOptions: { bits: 1024 } }, cb), (_ipfsd, cb) => { ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) ipfs.addFromFs(filesPath, { recursive: true }, cb) }, (hashes, cb) => { diff --git a/test/repo.spec.js b/test/repo.spec.js index 8bdf95bd7..142ff5659 100644 --- a/test/repo.spec.js +++ b/test/repo.spec.js @@ -6,7 +6,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.repo', function () { @@ -19,7 +19,7 @@ describe('.repo', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/request-api.spec.js b/test/request-api.spec.js index 8f43a3fae..02f342e53 100644 --- a/test/request-api.spec.js +++ b/test/request-api.spec.js @@ -6,7 +6,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) const isNode = require('detect-node') -const ipfsAPI = require('../src/index.js') +const ipfsClient = require('../src/index.js') const ndjson = require('ndjson') const pump = require('pump') @@ -28,7 +28,7 @@ describe('\'deal with HTTP weirdness\' tests', () => { }) server.listen(6001, () => { - ipfsAPI('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json', (err) => { + ipfsClient('/ip4/127.0.0.1/tcp/6001').config.replace('test/fixtures/r-config.json', (err) => { expect(err).to.not.exist() server.close(done) }) @@ -37,7 +37,7 @@ describe('\'deal with HTTP weirdness\' tests', () => { }) describe('trailer headers', () => { - // TODO: needs fixing https://github.com/ipfs/js-ipfs-api/pull/624#issuecomment-344181950 + // TODO: needs fixing https://github.com/ipfs/js-ipfs-http-client/pull/624#issuecomment-344181950 it.skip('should deal with trailer x-stream-error correctly', (done) => { if (!isNode) { return done() } @@ -52,7 +52,7 @@ describe('trailer headers', () => { }) server.listen(6001, () => { - const ipfs = ipfsAPI('/ip4/127.0.0.1/tcp/6001') + const ipfs = ipfsClient('/ip4/127.0.0.1/tcp/6001') /* eslint-disable */ ipfs.add(Buffer.from('Hello there!'), (err, res) => { // TODO: error's are not being correctly diff --git a/test/stats.spec.js b/test/stats.spec.js index c7eb48c13..4c93da490 100644 --- a/test/stats.spec.js +++ b/test/stats.spec.js @@ -6,7 +6,7 @@ const dirtyChai = require('dirty-chai') const expect = chai.expect chai.use(dirtyChai) -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('stats', function () { @@ -19,7 +19,7 @@ describe('stats', function () { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/util.spec.js b/test/util.spec.js index 559f9abd7..ff0b83c81 100644 --- a/test/util.spec.js +++ b/test/util.spec.js @@ -8,7 +8,7 @@ const expect = chai.expect chai.use(dirtyChai) const isNode = require('detect-node') -const IPFSApi = require('../src') +const ipfsClient = require('../src') const f = require('./utils/factory') describe('.util', () => { @@ -23,7 +23,7 @@ describe('.util', () => { f.spawn({ initOptions: { bits: 1024 } }, (err, _ipfsd) => { expect(err).to.not.exist() ipfsd = _ipfsd - ipfs = IPFSApi(_ipfsd.apiAddr) + ipfs = ipfsClient(_ipfsd.apiAddr) done() }) }) diff --git a/test/utils/interface-common-factory.js b/test/utils/interface-common-factory.js index dbbf3eb18..db3960e59 100644 --- a/test/utils/interface-common-factory.js +++ b/test/utils/interface-common-factory.js @@ -3,7 +3,7 @@ const each = require('async/each') const IPFSFactory = require('ipfsd-ctl') -const IPFSApi = require('../../src') +const ipfsClient = require('../../src') function createFactory (options) { options = options || {} @@ -29,7 +29,7 @@ function createFactory (options) { } nodes.push(_ipfsd) - cb(null, IPFSApi(_ipfsd.apiAddr)) + cb(null, ipfsClient(_ipfsd.apiAddr)) }) } })