Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
feat!: update to latest libp2p dependencies (#4)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: uses new single-issue libp2p interface modules
  • Loading branch information
achingbrain committed Jun 15, 2022
1 parent 440d310 commit 7775b9b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 18 deletions.
34 changes: 19 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
# libp2p-logger <!-- omit in toc -->
# @libp2p/logger <!-- omit in toc -->

[![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)
[![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
[![IRC](https://img.shields.io/badge/freenode-%23libp2p-yellow.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23libp2p)
[![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
[![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p-logger.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p-logger)
[![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)

> A logging component for use in js-libp2p components
> A logging component for use in js-libp2p modules
## Table of Contents <!-- omit in toc -->
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Description](#description)
- [Installation](#installation)
- [Example](#example)
- [License](#license)
- [Contribution](#contribution)
- [Contribution](#contribution)

## Install

```console
$ npm i @libp2p/logger
```

## Description

A map that reports it's size to the libp2p [Metrics](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/metrics#readme) system.

If metrics are disabled a regular map is used.

## Installation

```console
$ npm i @libp2p/logger
```

## Example

```JavaScript
Expand Down Expand Up @@ -52,9 +56,9 @@ with this base32: bafyfoo

Licensed under either of

* Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / http://www.apache.org/licenses/LICENSE-2.0)
* MIT ([LICENSE-MIT](LICENSE-MIT) / http://opensource.org/licenses/MIT)
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)

### Contribution
## Contribution

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.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"exports": {
".": {
"types": "./src/index.d.ts",
"import": "./dist/src/index.js"
}
},
Expand Down Expand Up @@ -133,13 +134,13 @@
"release": "aegir release"
},
"dependencies": {
"@libp2p/interfaces": "^2.0.0",
"@libp2p/interface-peer-id": "^1.0.2",
"debug": "^4.3.3",
"interface-datastore": "^6.1.0",
"multiformats": "^9.6.3"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"aegir": "^37.0.7"
"aegir": "^37.2.0"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import debug from 'debug'
import { base58btc } from 'multiformats/bases/base58'
import { base32 } from 'multiformats/bases/base32'
import { base64 } from 'multiformats/bases/base64'
import type { PeerId } from '@libp2p/interfaces/peer-id'
import type { PeerId } from '@libp2p/interface-peer-id'
import type { CID } from 'multiformats/cid'
import type { Key } from 'interface-datastore'

Expand Down

0 comments on commit 7775b9b

Please sign in to comment.