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

Commit

Permalink
feat: convert to async/await (#49)
Browse files Browse the repository at this point in the history
* feat: convert to async/await

BREAKING CHANGES:

1. Everything is now async/await
2. No more callbacks, Readable Streams or Pull Streams
3. `stat` and `ls` commands return `cid` objects instead of string hashes
4. `stat` and `ls` commands return all fields, `hash`, `long` etc options are now ignored

* chore: standardise error codes, use latest cids and ipld formats

* chore: update importer and exporter

* chore: update importer again

* chore: update deps
  • Loading branch information
achingbrain committed May 18, 2019
1 parent 25bf86b commit f02a941
Show file tree
Hide file tree
Showing 63 changed files with 2,027 additions and 3,094 deletions.
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"release": "aegir release",
"release-minor": "aegir release --type minor",
"release-major": "aegir release --type major",
"coverage": "aegir coverage"
"coverage": "aegir coverage",
"dep-check": "aegir dep-check"
},
"repository": {
"type": "git",
Expand All @@ -38,41 +39,38 @@
"homepage": "https://github.com/ipfs/js-ipfs-mfs#readme",
"devDependencies": {
"aegir": "^18.0.2",
"async-iterator-all": "^1.0.0",
"chai": "^4.2.0",
"detect-node": "^2.0.4",
"detect-webworker": "^1.0.0",
"dirty-chai": "^2.0.1",
"ipld": "~0.21.1",
"ipld-in-memory": "^2.0.0",
"multihashes": "~0.4.14",
"pull-buffer-stream": "^1.0.1",
"pull-traverse": "^1.0.3",
"ipfs-block-service": "~0.15.2",
"ipfs-repo": "~0.26.4",
"ipld": "~0.24.0",
"memdown": "^4.0.0",
"temp-write": "^3.4.0"
},
"dependencies": {
"async": "^2.6.1",
"cids": "~0.5.5",
"async-iterator-last": "^1.0.0",
"boom": "^7.2.0",
"cids": "~0.7.1",
"debug": "^4.1.0",
"filereader-stream": "^2.0.0",
"err-code": "^1.1.2",
"hamt-sharding": "~0.0.2",
"interface-datastore": "~0.6.0",
"ipfs-multipart": "~0.1.0",
"ipfs-unixfs": "~0.1.16",
"ipfs-unixfs-exporter": "~0.36.1",
"ipfs-unixfs-importer": "~0.38.5",
"ipld-dag-pb": "~0.15.2",
"is-pull-stream": "~0.0.0",
"is-stream": "^1.1.0",
"ipfs-unixfs-exporter": "~0.37.1",
"ipfs-unixfs-importer": "~0.39.3",
"ipld-dag-pb": "~0.17.1",
"joi": "^14.3.0",
"joi-browser": "^13.4.0",
"mortice": "^1.2.1",
"multicodec": "~0.5.1",
"multihashes": "~0.4.14",
"once": "^1.4.0",
"promisify-es6": "^1.0.3",
"pull-cat": "^1.1.11",
"pull-defer": "~0.2.3",
"pull-stream": "^3.6.9",
"pull-stream-to-stream": "^1.3.4",
"stream-to-pull-stream": "^1.7.2"
"pull-stream": "^3.6.9"
},
"contributors": [
"Alan Shaw <alan.shaw@protocol.ai>",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/flush.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const {
FILE_SEPARATOR
} = require('../core/utils')
} = require('../core/utils/constants')

module.exports = {
command: 'flush [path]',
Expand Down
2 changes: 1 addition & 1 deletion src/cli/ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const {
} = require('./utils')
const {
FILE_SEPARATOR
} = require('../core/utils')
} = require('../core/utils/constants')

module.exports = {
command: 'ls [path]',
Expand Down
2 changes: 1 addition & 1 deletion src/cli/write.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = {
argv.resolve((async () => {
const ipfs = await getIpfs()

return ipfs.files.write(path, process.stdin, {
await ipfs.files.write(path, process.stdin, {
offset,
length,
create,
Expand Down
Loading

0 comments on commit f02a941

Please sign in to comment.