Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit dcf934d

Browse files
authored
Merge pull request #303 from orbitdb/ipfs-0.43
wip: upgrade to js-ipfs 0.43.0 and go-ipfs 0.5.0
2 parents 882673b + 5ad315d commit dcf934d

25 files changed

+184
-251
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ ipfs-log-benchmarks/
1313
examples/browser/bundle.js.map
1414
examples/browser/ipfs.min.js
1515
examples/browser/ipfslog.min.js
16+
.nyc_output

lib/es5/default-access-controller.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,15 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
1010

1111
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
1212

13-
var AccessController =
14-
/*#__PURE__*/
15-
function () {
13+
var AccessController = /*#__PURE__*/function () {
1614
function AccessController() {
1715
(0, _classCallCheck2.default)(this, AccessController);
1816
}
1917

2018
(0, _createClass2.default)(AccessController, [{
2119
key: "canAppend",
2220
value: function () {
23-
var _canAppend = (0, _asyncToGenerator2.default)(
24-
/*#__PURE__*/
25-
_regenerator.default.mark(function _callee(entry, identityProvider) {
21+
var _canAppend = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(entry, identityProvider) {
2622
return _regenerator.default.wrap(function _callee$(_context) {
2723
while (1) {
2824
switch (_context.prev = _context.next) {

lib/es5/entry-index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
66

77
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
88

9-
var EntryIndex =
10-
/*#__PURE__*/
11-
function () {
9+
var EntryIndex = /*#__PURE__*/function () {
1210
function EntryIndex() {
1311
var entries = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1412
(0, _classCallCheck2.default)(this, EntryIndex);

lib/es5/entry-io.js

Lines changed: 11 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ var hasItems = function hasItems(arr) {
2020
return arr && arr.length > 0;
2121
};
2222

23-
var EntryIO =
24-
/*#__PURE__*/
25-
function () {
23+
var EntryIO = /*#__PURE__*/function () {
2624
function EntryIO() {
2725
(0, _classCallCheck2.default)(this, EntryIO);
2826
}
@@ -31,9 +29,7 @@ function () {
3129
key: "fetchParallel",
3230
// Fetch log graphs in parallel
3331
value: function () {
34-
var _fetchParallel = (0, _asyncToGenerator2.default)(
35-
/*#__PURE__*/
36-
_regenerator.default.mark(function _callee2(ipfs, hashes, _ref) {
32+
var _fetchParallel = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(ipfs, hashes, _ref) {
3733
var length, _ref$exclude, exclude, timeout, concurrency, onProgressCallback, fetchOne, concatArrays, flatten, res;
3834

3935
return _regenerator.default.wrap(function _callee2$(_context2) {
@@ -42,12 +38,8 @@ function () {
4238
case 0:
4339
length = _ref.length, _ref$exclude = _ref.exclude, exclude = _ref$exclude === void 0 ? [] : _ref$exclude, timeout = _ref.timeout, concurrency = _ref.concurrency, onProgressCallback = _ref.onProgressCallback;
4440

45-
fetchOne =
46-
/*#__PURE__*/
47-
function () {
48-
var _ref2 = (0, _asyncToGenerator2.default)(
49-
/*#__PURE__*/
50-
_regenerator.default.mark(function _callee(hash) {
41+
fetchOne = /*#__PURE__*/function () {
42+
var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(hash) {
5143
return _regenerator.default.wrap(function _callee$(_context) {
5244
while (1) {
5345
switch (_context.prev = _context.next) {
@@ -120,9 +112,7 @@ function () {
120112
}, {
121113
key: "fetchAll",
122114
value: function () {
123-
var _fetchAll = (0, _asyncToGenerator2.default)(
124-
/*#__PURE__*/
125-
_regenerator.default.mark(function _callee6(ipfs, hashes) {
115+
var _fetchAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(ipfs, hashes) {
126116
var _ref3,
127117
_ref3$length,
128118
length,
@@ -215,12 +205,8 @@ function () {
215205
}; // Fetch one entry and add it to the results
216206

217207

218-
fetchEntry =
219-
/*#__PURE__*/
220-
function () {
221-
var _ref4 = (0, _asyncToGenerator2.default)(
222-
/*#__PURE__*/
223-
_regenerator.default.mark(function _callee4(hash) {
208+
fetchEntry = /*#__PURE__*/function () {
209+
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(hash) {
224210
return _regenerator.default.wrap(function _callee4$(_context4) {
225211
while (1) {
226212
switch (_context4.prev = _context4.next) {
@@ -233,12 +219,8 @@ function () {
233219
return _context4.abrupt("return");
234220

235221
case 2:
236-
return _context4.abrupt("return", new Promise(
237-
/*#__PURE__*/
238-
function () {
239-
var _ref5 = (0, _asyncToGenerator2.default)(
240-
/*#__PURE__*/
241-
_regenerator.default.mark(function _callee3(resolve, reject) {
222+
return _context4.abrupt("return", new Promise( /*#__PURE__*/function () {
223+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {
242224
var timer, addToResults, entry, sleep;
243225
return _regenerator.default.wrap(function _callee3$(_context3) {
244226
while (1) {
@@ -369,12 +351,8 @@ function () {
369351
}(); // One loop of processing the loading queue
370352

371353

372-
_processQueue =
373-
/*#__PURE__*/
374-
function () {
375-
var _ref6 = (0, _asyncToGenerator2.default)(
376-
/*#__PURE__*/
377-
_regenerator.default.mark(function _callee5() {
354+
_processQueue = /*#__PURE__*/function () {
355+
var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5() {
378356
var nexts;
379357
return _regenerator.default.wrap(function _callee5$(_context5) {
380358
while (1) {

lib/es5/entry.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ var getWriteFormat = function getWriteFormat(e) {
3232
return Entry.isEntry(e) ? getWriteFormatForVersion(e.v) : getWriteFormatForVersion(e);
3333
};
3434

35-
var Entry =
36-
/*#__PURE__*/
37-
function () {
35+
var Entry = /*#__PURE__*/function () {
3836
function Entry() {
3937
(0, _classCallCheck2.default)(this, Entry);
4038
}
@@ -57,9 +55,7 @@ function () {
5755
* // { hash: null, payload: "hello", next: [] }
5856
*/
5957
value: function () {
60-
var _create = (0, _asyncToGenerator2.default)(
61-
/*#__PURE__*/
62-
_regenerator.default.mark(function _callee(ipfs, identity, logId, data) {
58+
var _create = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(ipfs, identity, logId, data) {
6359
var next,
6460
clock,
6561
refs,
@@ -178,9 +174,7 @@ function () {
178174
}, {
179175
key: "verify",
180176
value: function () {
181-
var _verify = (0, _asyncToGenerator2.default)(
182-
/*#__PURE__*/
183-
_regenerator.default.mark(function _callee2(identityProvider, entry) {
177+
var _verify = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(identityProvider, entry) {
184178
var e, verifier;
185179
return _regenerator.default.wrap(function _callee2$(_context2) {
186180
while (1) {
@@ -265,9 +259,7 @@ function () {
265259
}, {
266260
key: "toMultihash",
267261
value: function () {
268-
var _toMultihash = (0, _asyncToGenerator2.default)(
269-
/*#__PURE__*/
270-
_regenerator.default.mark(function _callee3(ipfs, entry) {
262+
var _toMultihash = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(ipfs, entry) {
271263
var pin,
272264
e,
273265
_args3 = arguments;
@@ -365,9 +357,7 @@ function () {
365357
}, {
366358
key: "fromMultihash",
367359
value: function () {
368-
var _fromMultihash = (0, _asyncToGenerator2.default)(
369-
/*#__PURE__*/
370-
_regenerator.default.mark(function _callee4(ipfs, hash) {
360+
var _fromMultihash = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(ipfs, hash) {
371361
var e, entry;
372362
return _regenerator.default.wrap(function _callee4$(_context4) {
373363
while (1) {

lib/es5/g-set.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
1313

1414
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
1515

16-
var GSet =
17-
/*#__PURE__*/
18-
function () {
16+
var GSet = /*#__PURE__*/function () {
1917
function GSet(values) {
2018
(0, _classCallCheck2.default)(this, GSet);
2119
} // eslint-disable-line

lib/es5/lamport-clock.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
66

77
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
88

9-
var LamportClock =
10-
/*#__PURE__*/
11-
function () {
9+
var LamportClock = /*#__PURE__*/function () {
1210
function LamportClock(id, time) {
1311
(0, _classCallCheck2.default)(this, LamportClock);
1412
this.id = id;

lib/es5/log-io.js

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ var last = function last(arr, n) {
3333
return arr.slice(arr.length - Math.min(arr.length, n), arr.length);
3434
};
3535

36-
var LogIO =
37-
/*#__PURE__*/
38-
function () {
36+
var LogIO = /*#__PURE__*/function () {
3937
function LogIO() {
4038
(0, _classCallCheck2.default)(this, LogIO);
4139
}
@@ -52,9 +50,7 @@ function () {
5250
* @deprecated
5351
*/
5452
value: function () {
55-
var _toMultihash = (0, _asyncToGenerator2.default)(
56-
/*#__PURE__*/
57-
_regenerator.default.mark(function _callee(ipfs, log) {
53+
var _toMultihash = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(ipfs, log) {
5854
var _ref,
5955
format,
6056
_args = arguments;
@@ -122,9 +118,7 @@ function () {
122118
}, {
123119
key: "fromMultihash",
124120
value: function () {
125-
var _fromMultihash = (0, _asyncToGenerator2.default)(
126-
/*#__PURE__*/
127-
_regenerator.default.mark(function _callee2(ipfs, hash, _ref2) {
121+
var _fromMultihash = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(ipfs, hash, _ref2) {
128122
var _ref2$length, length, _ref2$exclude, exclude, timeout, concurrency, sortFn, onProgressCallback, logData, isHead, all, logId, entries, heads;
129123

130124
return _regenerator.default.wrap(function _callee2$(_context2) {
@@ -219,9 +213,7 @@ function () {
219213
}, {
220214
key: "fromEntryHash",
221215
value: function () {
222-
var _fromEntryHash = (0, _asyncToGenerator2.default)(
223-
/*#__PURE__*/
224-
_regenerator.default.mark(function _callee3(ipfs, hash, _ref3) {
216+
var _fromEntryHash = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(ipfs, hash, _ref3) {
225217
var _ref3$length, length, _ref3$exclude, exclude, timeout, concurrency, sortFn, onProgressCallback, hashes, all, entries;
226218

227219
return _regenerator.default.wrap(function _callee3$(_context3) {
@@ -296,9 +288,7 @@ function () {
296288
}, {
297289
key: "fromJSON",
298290
value: function () {
299-
var _fromJSON = (0, _asyncToGenerator2.default)(
300-
/*#__PURE__*/
301-
_regenerator.default.mark(function _callee4(ipfs, json, _ref4) {
291+
var _fromJSON = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(ipfs, json, _ref4) {
302292
var _ref4$length, length, timeout, concurrency, onProgressCallback, id, heads, headHashes, all, entries;
303293

304294
return _regenerator.default.wrap(function _callee4$(_context4) {
@@ -363,9 +353,7 @@ function () {
363353
}, {
364354
key: "fromEntry",
365355
value: function () {
366-
var _fromEntry = (0, _asyncToGenerator2.default)(
367-
/*#__PURE__*/
368-
_regenerator.default.mark(function _callee5(ipfs, sourceEntries, _ref5) {
356+
var _fromEntry = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(ipfs, sourceEntries, _ref5) {
369357
var _ref5$length, length, _ref5$exclude, exclude, timeout, concurrency, onProgressCallback, hashes, all, combined, uniques, sliced, missingSourceEntries, replaceInFront, entries, logId;
370358

371359
return _regenerator.default.wrap(function _callee5$(_context5) {

0 commit comments

Comments
 (0)