Skip to content

Commit 73bdd19

Browse files
authored
chore: update to new multiformats (#340)
Replaces the old `ipld-*` modules with the new (smaller) multiformats modules. BREAKING CHANGE: uses the CID class from the new multiformats module
1 parent 0c12280 commit 73bdd19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1481
-1135
lines changed

.aegir.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = {
2727
}
2828
},
2929
build: {
30-
bundlesizeMax: '63KB',
30+
bundlesizeMax: '44KB',
3131
config: esbuild
3232
}
3333
}

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,24 @@
1919

2020
## Table of Contents
2121

22-
- [Install](#install)
23-
- [npm](#npm)
24-
- [Use in Node.js](#use-in-nodejs)
25-
- [Use in a browser with browserify, webpack or any other bundler](#use-in-a-browser-with-browserify-webpack-or-any-other-bundler)
26-
- [Use in a browser using a script tag](#use-in-a-browser-using-a-script-tag)
27-
- [Usage](#usage)
28-
- [API](#api)
29-
- [Contribute](#contribute)
30-
- [License](#license)
22+
- [ipfs-bitswap](#ipfs-bitswap)
23+
- [Lead Maintainer](#lead-maintainer)
24+
- [Table of Contents](#table-of-contents)
25+
- [Install](#install)
26+
- [npm](#npm)
27+
- [Use in Node.js or in the browser with browserify, webpack or any other bundler](#use-in-nodejs-or-in-the-browser-with-browserify-webpack-or-any-other-bundler)
28+
- [Use in a browser using a script tag](#use-in-a-browser-using-a-script-tag)
29+
- [API](#api)
30+
- [Stats](#stats)
31+
- [Peer accessor:](#peer-accessor)
32+
- [Global snapshot accessor:](#global-snapshot-accessor)
33+
- [Moving average accessor:](#moving-average-accessor)
34+
- [Development](#development)
35+
- [Structure](#structure)
36+
- [Performance tests](#performance-tests)
37+
- [Profiling](#profiling)
38+
- [Contribute](#contribute)
39+
- [License](#license)
3140

3241
## Install
3342

benchmarks/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const assert = require('assert')
55
const range = require('lodash.range')
66

7-
const makeBlock = require('../test/utils/make-block')
7+
const makeBlock = require('../test/utils/make-blocks')
88
const genBitswapNetwork = require('../test/utils/mocks').genBitswapNetwork
99

1010
const nodes = [2, 5, 10, 20]

benchmarks/put-get.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Benchmark = require('benchmark')
66
const assert = require('assert')
77
const all = require('it-all')
88
const drain = require('it-drain')
9-
const makeBlock = require('../test/utils/make-block')
9+
const makeBlock = require('../test/utils/make-blocks')
1010
const genBitswapNetwork = require('../test/utils/mocks').genBitswapNetwork
1111

1212
const suite = new Benchmark.Suite('put-get')

package.json

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"./test/utils/create-libp2p-node": false
99
},
1010
"types": "dist/src/index.d.ts",
11+
"tsd": {
12+
"directory": "test"
13+
},
1114
"typesVersions": {
1215
"*": {
1316
"src/*": [
@@ -22,7 +25,9 @@
2225
"eslintConfig": {
2326
"extends": "ipfs",
2427
"ignorePatterns": [
25-
"scripts/*"
28+
"scripts/*",
29+
"src/types/message/message.*",
30+
"*.test-d.ts"
2631
]
2732
},
2833
"files": [
@@ -38,7 +43,8 @@
3843
"test": "aegir test",
3944
"test:browser": "aegir test -t browser -t webworker",
4045
"test:node": "aegir test -t node",
41-
"lint": "aegir lint",
46+
"test:types": "tsd",
47+
"lint": "aegir ts -p check && aegir lint",
4248
"check": "aegir ts -p check",
4349
"release": "aegir release",
4450
"release-minor": "aegir release --type minor",
@@ -66,57 +72,57 @@
6672
"devDependencies": {
6773
"@nodeutils/defaults-deep": "^1.1.0",
6874
"@types/debug": "^4.1.5",
69-
"aegir": "^33.1.0",
75+
"@types/stats-lite": "^2.2.0",
76+
"@types/varint": "^6.0.0",
77+
"aegir": "^34.0.2",
7078
"assert": "^2.0.0",
7179
"benchmark": "^2.1.4",
7280
"delay": "^5.0.0",
73-
"interface-datastore": "^4.0.1",
74-
"ipfs-repo": "^9.1.0",
75-
"ipfs-utils": "^6.0.1",
81+
"interface-datastore": "^5.0.0",
7682
"iso-random-stream": "^2.0.0",
7783
"it-all": "^1.0.5",
7884
"it-drain": "^1.0.4",
79-
"libp2p": "^0.31.2",
80-
"libp2p-kad-dht": "^0.22.0",
85+
"libp2p": "next",
86+
"libp2p-kad-dht": "^0.23.1",
8187
"libp2p-mplex": "^0.10.2",
82-
"libp2p-noise": "^3.0.0",
83-
"libp2p-tcp": "^0.15.3",
88+
"libp2p-noise": "^4.0.0",
89+
"libp2p-tcp": "^0.17.1",
8490
"lodash.difference": "^4.5.0",
8591
"lodash.flatten": "^4.4.0",
8692
"lodash.range": "^3.2.0",
8793
"lodash.without": "^4.4.0",
8894
"p-defer": "^3.0.0",
8995
"p-event": "^4.2.0",
9096
"p-wait-for": "^3.2.0",
91-
"peer-id": "^0.14.3",
97+
"peer-id": "^0.15.0",
9298
"process": "^0.11.10",
9399
"promisify-es6": "^1.0.3",
94100
"rimraf": "^3.0.2",
95-
"sinon": "^10.0.0",
101+
"sinon": "^11.1.1",
96102
"stats-lite": "^2.2.0",
97-
"uuid": "^8.3.2"
103+
"tsd": "^0.17.0",
104+
"url": "^0.11.0",
105+
"util": "^0.12.3",
106+
"uuid": "^8.3.2",
107+
"varint": "^6.0.0"
98108
},
99109
"dependencies": {
100110
"@vascosantos/moving-average": "^1.1.0",
101111
"abort-controller": "^3.0.0",
102112
"any-signal": "^2.1.2",
103-
"cids": "^1.1.6",
104113
"debug": "^4.2.0",
105-
"ipld-block": "^0.11.0",
114+
"err-code": "^3.0.1",
115+
"interface-blockstore": "^1.0.0",
106116
"it-length-prefixed": "^5.0.2",
107117
"it-pipe": "^1.1.0",
108118
"just-debounce-it": "^1.1.0",
109-
"libp2p-interfaces": "^0.10.0",
110-
"multiaddr": "^9.0.1",
111-
"multicodec": "^3.0.1",
112-
"multihashing-async": "^2.1.2",
119+
"libp2p-interfaces": "^1.0.1",
120+
"multiaddr": "^10.0.0",
121+
"multiformats": "^9.0.4",
113122
"native-abort-controller": "^1.0.3",
114123
"protobufjs": "^6.10.2",
115124
"readable-stream": "^3.6.0",
116-
"streaming-iterables": "^5.0.4",
117125
"uint8arrays": "^2.1.3",
118-
"url": "^0.11.0",
119-
"util": "^0.12.3",
120126
"varint-decoder": "^1.0.0"
121127
},
122128
"pre-push": [

0 commit comments

Comments
 (0)