@libp2p/logger 1.1.6 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +19 -15
  2. package/package.json +4 -3
  3. package/src/index.ts +1 -1
package/README.md CHANGED
@@ -1,16 +1,26 @@
1
- # libp2p-logger <!-- omit in toc -->
1
+ # @libp2p/logger <!-- omit in toc -->
2
2
 
3
- [![test & maybe release](https://github.com/libp2p/js-libp2p-logger/actions/workflows/js-test-and-release.yml/badge.svg)](https://github.com/libp2p/js-libp2p-logger/actions/workflows/js-test-and-release.yml)
3
+ [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
+ [![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
5
+ [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
6
+ [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-logger.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-logger)
7
+ [![CI](https://img.shields.io/github/workflow/status/libp2p/js-libp2p-interfaces/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/libp2p/js-libp2p-logger/actions/workflows/js-test-and-release.yml)
4
8
 
5
- > A logging component for use in js-libp2p components
9
+ > A logging component for use in js-libp2p modules
6
10
 
7
- ## Table of Contents <!-- omit in toc -->
11
+ ## Table of contents <!-- omit in toc -->
8
12
 
13
+ - [Install](#install)
9
14
  - [Description](#description)
10
- - [Installation](#installation)
11
15
  - [Example](#example)
12
16
  - [License](#license)
13
- - [Contribution](#contribution)
17
+ - [Contribution](#contribution)
18
+
19
+ ## Install
20
+
21
+ ```console
22
+ $ npm i @libp2p/logger
23
+ ```
14
24
 
15
25
  ## Description
16
26
 
@@ -18,12 +28,6 @@ A map that reports it's size to the libp2p [Metrics](https://github.com/libp2p/j
18
28
 
19
29
  If metrics are disabled a regular map is used.
20
30
 
21
- ## Installation
22
-
23
- ```console
24
- $ npm i @libp2p/logger
25
- ```
26
-
27
31
  ## Example
28
32
 
29
33
  ```JavaScript
@@ -52,9 +56,9 @@ with this base32: bafyfoo
52
56
 
53
57
  Licensed under either of
54
58
 
55
- * Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / http://www.apache.org/licenses/LICENSE-2.0)
56
- * MIT ([LICENSE-MIT](LICENSE-MIT) / http://opensource.org/licenses/MIT)
59
+ - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
60
+ - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
57
61
 
58
- ### Contribution
62
+ ## Contribution
59
63
 
60
64
  Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/logger",
3
- "version": "1.1.6",
3
+ "version": "2.0.0",
4
4
  "description": "A logging component for use in js-libp2p modules",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p-logger#readme",
@@ -28,6 +28,7 @@
28
28
  ],
29
29
  "exports": {
30
30
  ".": {
31
+ "types": "./src/index.d.ts",
31
32
  "import": "./dist/src/index.js"
32
33
  }
33
34
  },
@@ -133,13 +134,13 @@
133
134
  "release": "aegir release"
134
135
  },
135
136
  "dependencies": {
136
- "@libp2p/interfaces": "^2.0.0",
137
+ "@libp2p/interface-peer-id": "^1.0.2",
137
138
  "debug": "^4.3.3",
138
139
  "interface-datastore": "^6.1.0",
139
140
  "multiformats": "^9.6.3"
140
141
  },
141
142
  "devDependencies": {
142
143
  "@types/debug": "^4.1.7",
143
- "aegir": "^37.0.7"
144
+ "aegir": "^37.2.0"
144
145
  }
145
146
  }
package/src/index.ts CHANGED
@@ -2,7 +2,7 @@ import debug from 'debug'
2
2
  import { base58btc } from 'multiformats/bases/base58'
3
3
  import { base32 } from 'multiformats/bases/base32'
4
4
  import { base64 } from 'multiformats/bases/base64'
5
- import type { PeerId } from '@libp2p/interfaces/peer-id'
5
+ import type { PeerId } from '@libp2p/interface-peer-id'
6
6
  import type { CID } from 'multiformats/cid'
7
7
  import type { Key } from 'interface-datastore'
8
8