This repository was archived by the owner on Mar 10, 2020. It is now read-only.
Commit 3e5967a
Alan Shaw
refactor: async await roundup (#1173)
This is a round up of the remaining async/await PRs along with some cleanup and docs fixes.
resolves #1103
resolves #1122
resolves #1158 (hopefully!)
closes #1164
closes #1165
closes #1166
closes #1169
closes #1170
closes #1172
BREAKING CHANGE: The `log.tail` method now returns an async iterator that yields log messages. Use it like:
```js
for await (const message of ipfs.log.tail()) {
console.log(message)
}
```
BREAKING CHANGE: The response to a call to `log.level` now returns an object that has camel cased keys. i.e. `Message` and `Error` properties have changed to `message` and `error`.
BREAKING CHANGE: Dropped support for go-ipfs <= 0.4.4 in `swarm.peers` response.
BREAKING CHANGE: The signature for `ipfs.mount` has changed from `ipfs.mount([ipfsPath], [ipnsPath])` to `ipfs.mount([options])`. Where `options` is an optional object that may contain two boolean properties `ipfsPath` and `ipnsPath`. The response object has also changed to be camel case. See https://docs.ipfs.io/reference/api/http/#api-v0-mount.
BREAKING CHANGE: Default ping `count` of 1 in client has been removed. The default ping count is now whatever the IPFS node defaults it to (currently 10). If you specifically need 1 ping message then please pass `count: 1` in options for `ipfs.ping()`.
BREAKING CHANGE: Multi parameter constructor options are no longer supported. To create a new IPFS HTTP client, pass a single parameter to the constructor. The parameter can be one of:
* String, formatted as one of:
* Multiaddr e.g. /ip4/127.0.0.1/tcp/5001
* URL e.g. http://127.0.0.1:5001
* [Multiaddr](https://www.npmjs.com/package/multiaddr) instance
* Object, in format of either:
* Address and path e.g. `{ apiAddr: '/ip4/127.0.0.1/tcp/5001': apiPath: '/api/v0' }` (Note: `apiAddr` can also be a string in URL form or a Multiaddr instance)
* Node.js style address e.g. `{ host: '127.0.0.1', port: 5001, protocol: 'http' }`1 parent fc73da7 commit 3e5967a
File tree
109 files changed
+1079
-2581
lines changed- src
- add
- bitswap
- block
- bootstrap
- config
- profiles
- dag
- dht
- diag
- key
- lib
- log
- name
- pubsub
- object
- pin
- pubsub
- refs
- repo
- stats
- swarm
- utils
- test
- node
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
109 files changed
+1079
-2581
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
46 | 45 | | |
47 | 46 | | |
48 | 47 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
54 | | - | |
55 | 53 | | |
56 | | - | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | 56 | | |
61 | | - | |
62 | 57 | | |
63 | 58 | | |
64 | 59 | | |
65 | 60 | | |
66 | 61 | | |
67 | 62 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 63 | | |
72 | | - | |
| 64 | + | |
73 | 65 | | |
74 | 66 | | |
75 | | - | |
76 | 67 | | |
77 | 68 | | |
78 | 69 | | |
79 | 70 | | |
| 71 | + | |
80 | 72 | | |
81 | 73 | | |
82 | 74 | | |
83 | | - | |
84 | | - | |
85 | 75 | | |
86 | 76 | | |
87 | 77 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 78 | + | |
97 | 79 | | |
98 | 80 | | |
99 | 81 | | |
| 82 | + | |
100 | 83 | | |
101 | 84 | | |
| 85 | + | |
102 | 86 | | |
103 | | - | |
| 87 | + | |
104 | 88 | | |
| 89 | + | |
105 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
106 | 94 | | |
107 | 95 | | |
108 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments