Skip to content

Commit a510fdc

Browse files
deps(dev): bump aegir from 40.0.13 to 41.0.0 (#601)
Bumps [aegir](https://github.com/ipfs/aegir) from 40.0.13 to 41.0.0. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v40.0.13...v41.0.0) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent 061acfa commit a510fdc

File tree

6 files changed

+41
-33
lines changed

6 files changed

+41
-33
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@ This object will be a [movingAverage](https://github.com/pgte/moving-average#rea
127127

128128
You can run performance tests like this:
129129

130-
$ npm run benchmarks
130+
```
131+
$ npm run benchmarks
132+
```
131133

132134
### Profiling
133135

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"eslintConfig": {
3535
"extends": "ipfs",
3636
"parserOptions": {
37+
"project": true,
3738
"sourceType": "module"
3839
},
3940
"ignorePatterns": [
@@ -181,7 +182,7 @@
181182
"@types/sinon": "^10.0.15",
182183
"@types/stats-lite": "^2.2.0",
183184
"@types/varint": "^6.0.0",
184-
"aegir": "^40.0.2",
185+
"aegir": "^41.0.0",
185186
"benchmark": "^2.1.4",
186187
"delay": "^6.0.0",
187188
"iso-random-stream": "^2.0.0",

src/decision-engine/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ export interface TaskMerger {
2222
* Given the existing tasks with the same topic, does the task add some new
2323
* information? Used to decide whether to merge the task or ignore it.
2424
*/
25-
hasNewInfo: (task: Task, tasksWithTopic: Task[]) => boolean
25+
hasNewInfo(task: Task, tasksWithTopic: Task[]): boolean
2626

2727
/**
2828
* Merge the information from the task into the existing pending task.
2929
*/
30-
merge: (newTask: Task, existingTask: Task) => void
30+
merge(newTask: Task, existingTask: Task): void
3131
}
3232

3333
export interface Task {

src/index.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ export interface WantListEntry {
1414
cid: CID
1515
priority: number
1616
wantType: Message.Wantlist.WantType
17-
inc: () => void
18-
dec: () => void
19-
hasRefs: () => boolean
17+
inc(): void
18+
dec(): void
19+
hasRefs(): boolean
2020
}
2121

2222
export interface Wantlist {
2323
length: number
24-
add: (cid: CID, priority: number, wantType: Message.Wantlist.WantType) => void
25-
remove: (cid: CID) => void
26-
removeForce: (cid: string) => void
27-
forEach: (fn: (entry: WantListEntry, key: string) => void) => void
28-
sortedEntries: () => Map<string, WantListEntry>
29-
contains: (cid: CID) => boolean
30-
get: (cid: CID) => WantListEntry
24+
add(cid: CID, priority: number, wantType: Message.Wantlist.WantType): void
25+
remove(cid: CID): void
26+
removeForce(cid: string): void
27+
forEach(fn: (entry: WantListEntry, key: string) => void): void
28+
sortedEntries(): Map<string, WantListEntry>
29+
contains(cid: CID): boolean
30+
get(cid: CID): WantListEntry
3131
}
3232

3333
export interface Ledger {
@@ -39,22 +39,22 @@ export interface Ledger {
3939
}
4040

4141
export interface Stat {
42-
enable: () => void
43-
disable: () => void
44-
stop: () => void
42+
enable(): void
43+
disable(): void
44+
stop(): void
4545
snapshot: Record<string, bigint>
4646
movingAverages: Record<string, Record<number, IMovingAverage>>
47-
push: (counter: string, inc: number) => void
47+
push(counter: string, inc: number): void
4848
}
4949

5050
export interface Stats {
5151
snapshot: Record<string, bigint>
5252
movingAverages: Record<string, Record<number, IMovingAverage>>
53-
enable: () => void
54-
disable: () => void
55-
stop: () => void
56-
forPeer: (peerId: PeerId | string) => Stat | undefined
57-
push: (peer: string, counter: string, inc: number) => void
53+
enable(): void
54+
disable(): void
55+
stop(): void
56+
forPeer(peerId: PeerId | string): Stat | undefined
57+
push(peer: string, counter: string, inc: number): void
5858
}
5959

6060
export type BitswapWantProgressEvents =
@@ -79,25 +79,25 @@ export interface Bitswap extends Startable {
7979
*/
8080
peers: PeerId[]
8181

82-
wantlistForPeer: (peerId: PeerId) => Map<string, WantListEntry>
83-
ledgerForPeer: (peerId: PeerId) => Ledger | undefined
84-
unwant: (cids: CID | CID[]) => void
85-
cancelWants: (cids: CID | CID[]) => void
86-
getWantlist: () => IterableIterator<[string, WantListEntry]>
82+
wantlistForPeer(peerId: PeerId): Map<string, WantListEntry>
83+
ledgerForPeer(peerId: PeerId): Ledger | undefined
84+
unwant(cids: CID | CID[]): void
85+
cancelWants(cids: CID | CID[]): void
86+
getWantlist(): IterableIterator<[string, WantListEntry]>
8787

8888
/**
8989
* Notify bitswap that a new block is available
9090
*/
91-
notify: (cid: CID, block: Uint8Array, options?: ProgressOptions<BitswapNotifyProgressEvents>) => void
91+
notify(cid: CID, block: Uint8Array, options?: ProgressOptions<BitswapNotifyProgressEvents>): void
9292

9393
/**
9494
* Retrieve a block from the network
9595
*/
96-
want: (cid: CID, options?: AbortOptions & ProgressOptions<BitswapWantProgressEvents>) => Promise<Uint8Array>
96+
want(cid: CID, options?: AbortOptions & ProgressOptions<BitswapWantProgressEvents>): Promise<Uint8Array>
9797
}
9898

9999
export interface MultihashHasherLoader {
100-
getHasher: (codeOrName: number | string) => Promise<MultihashHasher>
100+
getHasher(codeOrName: number | string): Promise<MultihashHasher>
101101
}
102102

103103
export interface BitswapOptions {

test/utils/helpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect } from 'aegir/chai'
22
import range from 'lodash.range'
33

4-
export const orderedFinish = (n: number): { (i: number): void, assert: () => void } => {
4+
export const orderedFinish = (n: number): { (i: number): void, assert(): void } => {
55
const r = range(1, n + 1)
66
const finishes: number[] = []
77

@@ -17,7 +17,7 @@ export const orderedFinish = (n: number): { (i: number): void, assert: () => voi
1717
return output
1818
}
1919

20-
export const countToFinish = (n: number): { (): void, assert: () => void } => {
20+
export const countToFinish = (n: number): { (): void, assert(): void } => {
2121
let pending = n
2222

2323
const output = (): void => {

typedoc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"entryPoints": [
3+
"./src/index.ts"
4+
]
5+
}

0 commit comments

Comments
 (0)