Skip to content

Commit 451d936

Browse files
authored
deps: update interface-datastore and aegir (libp2p#29)
Not a breaking change as interface-datastore is not part of the public api
1 parent a24089e commit 451d936

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ dist
66
node_modules
77
package-lock.json
88
yarn.lock
9+
.vscode

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Browser `<script>` tag](#browser-script-tag)
1414
- [Description](#description)
1515
- [Example](#example)
16+
- [API Docs](#api-docs)
1617
- [License](#license)
1718
- [Contribution](#contribution)
1819

@@ -60,6 +61,10 @@ with this base58btc: Qmfoo
6061
with this base32: bafyfoo
6162
```
6263

64+
## API Docs
65+
66+
- <https://libp2p.github.io/js-libp2p-logger>
67+
6368
## License
6469

6570
Licensed under either of

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@
141141
"dependencies": {
142142
"@libp2p/interface-peer-id": "^2.0.0",
143143
"debug": "^4.3.3",
144-
"interface-datastore": "^7.0.0",
144+
"interface-datastore": "^8.0.0",
145145
"multiformats": "^11.0.0"
146146
},
147147
"devDependencies": {
148148
"@types/debug": "^4.1.7",
149-
"aegir": "^37.9.1"
149+
"aegir": "^38.1.7"
150150
}
151151
}

src/index.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,32 @@ import type { CID } from 'multiformats/cid'
77
import type { Key } from 'interface-datastore'
88

99
// Add a formatter for converting to a base58 string
10-
debug.formatters.b = (v?: Uint8Array) => {
10+
debug.formatters.b = (v?: Uint8Array): string => {
1111
return v == null ? 'undefined' : base58btc.baseEncode(v)
1212
}
1313

1414
// Add a formatter for converting to a base32 string
15-
debug.formatters.t = (v?: Uint8Array) => {
15+
debug.formatters.t = (v?: Uint8Array): string => {
1616
return v == null ? 'undefined' : base32.baseEncode(v)
1717
}
1818

1919
// Add a formatter for converting to a base64 string
20-
debug.formatters.m = (v?: Uint8Array) => {
20+
debug.formatters.m = (v?: Uint8Array): string => {
2121
return v == null ? 'undefined' : base64.baseEncode(v)
2222
}
2323

2424
// Add a formatter for stringifying peer ids
25-
debug.formatters.p = (v?: PeerId) => {
25+
debug.formatters.p = (v?: PeerId): string => {
2626
return v == null ? 'undefined' : v.toString()
2727
}
2828

2929
// Add a formatter for stringifying CIDs
30-
debug.formatters.c = (v?: CID) => {
30+
debug.formatters.c = (v?: CID): string => {
3131
return v == null ? 'undefined' : v.toString()
3232
}
3333

3434
// Add a formatter for stringifying Datastore keys
35-
debug.formatters.k = (v: Key) => {
35+
debug.formatters.k = (v: Key): string => {
3636
return v == null ? 'undefined' : v.toString()
3737
}
3838

@@ -50,14 +50,14 @@ export function logger (name: string): Logger {
5050
})
5151
}
5252

53-
export function disable () {
53+
export function disable (): void {
5454
debug.disable()
5555
}
5656

57-
export function enable (namespaces: string) {
57+
export function enable (namespaces: string): void {
5858
debug.enable(namespaces)
5959
}
6060

61-
export function enabled (namespaces: string) {
61+
export function enabled (namespaces: string): boolean {
6262
return debug.enabled(namespaces)
6363
}

0 commit comments

Comments
 (0)