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

fix: case for addFromURL #907

Merged
merged 1 commit into from
Dec 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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