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

Commit

Permalink
fix: case for addFromURL (#907)
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
  • Loading branch information
Alan Shaw authored Dec 11, 2018
1 parent 05a84a4 commit 99ac7be
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ Specifically, the following changes have been made:
* `ipfs.files.getPullStream` => `ipfs.getPullStream`
* `ipfs.files.getReadableStream` => `ipfs.getReadableStream`

Additionally, `addFromFs`, `addFromUrl`, `addFromStream` have moved from `util` to the root namespace:
Additionally, `addFromFs`, `addFromURL`, `addFromStream` have moved from `util` to the root namespace:

* `ipfs.util.addFromFs` => `ipfs.addFromFs`
* `ipfs.util.addFromUrl` => `ipfs.addFromUrl`
* `ipfs.util.addFromURL` => `ipfs.addFromURL`
* `ipfs.util.addFromStream` => `ipfs.addFromStream`

License: MIT
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ const ipfs = ipfsClient({
- [`ipfs.addReadableStream([options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addreadablestream)
- [`ipfs.addFromStream(stream, [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromstream)
- [`ipfs.addFromFs(path, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromfs)
- [`ipfs.addFromUrl(url, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromurl)
- [`ipfs.addFromURL(url, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#addfromurl)
- [`ipfs.cat(ipfsPath, [options], [callback])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#cat)
- [`ipfs.catPullStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catpullstream)
- [`ipfs.catReadableStream(ipfsPath, [options])`](https://github.com/ipfs/interface-ipfs-core/blob/master/SPEC/FILES.md#catreadablestream)
Expand Down
2 changes: 1 addition & 1 deletion src/files-regular/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (arg) => {
addReadableStream: require('../files-regular/add-readable-stream')(send),
addPullStream: require('../files-regular/add-pull-stream')(send),
addFromFs: require('../files-regular/add-from-fs')(send),
addFromUrl: require('../files-regular/add-from-url')(send),
addFromURL: require('../files-regular/add-from-url')(send),
addFromStream: require('../files-regular/add')(send),
cat: require('../files-regular/cat')(send),
catReadableStream: require('../files-regular/cat-readable-stream')(send),
Expand Down
7 changes: 6 additions & 1 deletion test/interface.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ describe('interface-ipfs-core tests', () => {
name: 'addFromFs',
reason: 'Not designed to run in the browser'
},
// .addFromUrl
// .addFromURL
isNode ? null : {
name: 'addFromURL',
reason: 'Not designed to run in the browser'
},
// TODO: remove when interface-ipfs-core updated
isNode ? null : {
name: 'addFromUrl',
reason: 'Not designed to run in the browser'
Expand Down
2 changes: 1 addition & 1 deletion test/sub-modules.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ describe('submodules', () => {
expect(filesRegular.addPullStream).to.be.a('function')
expect(filesRegular.addFromStream).to.be.a('function')
expect(filesRegular.addFromFs).to.be.a('function')
expect(filesRegular.addFromUrl).to.be.a('function')
expect(filesRegular.addFromURL).to.be.a('function')
expect(filesRegular.get).to.be.a('function')
expect(filesRegular.getReadableStream).to.be.a('function')
expect(filesRegular.getPullStream).to.be.a('function')
Expand Down

0 comments on commit 99ac7be

Please sign in to comment.