Skip to content

Commit

Permalink
fix: remove unused deps (#19)
Browse files Browse the repository at this point in the history
Several declared dependencies of this module are unused so remove them.

Also publish API docs.
  • Loading branch information
achingbrain authored Jan 6, 2023
1 parent 6fa8cf4 commit beb4707
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 58 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches:
- master # with #262 - ${{{ github.default_branch }}}
pull_request:
branches:
- master # with #262 - ${{{ github.default_branch }}}

jobs:

Expand All @@ -26,7 +24,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [16]
node: [lts/*]
fail-fast: true
steps:
- uses: actions/checkout@v3
Expand Down
46 changes: 2 additions & 44 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,48 +1,6 @@
docs
package-lock.json
yarn.lock

**/node_modules/
**/*.log
test/repo-tests*
**/bundle.js

# Logs
logs
*.log

coverage

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
.coverage

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

build

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

lib
dist
test/test-data/go-ipfs-repo/LOCK
test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old

# while testing npm5
.docs
.coverage
package-lock.json
yarn.lock
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
# @chainsafe/libp2p-yamux <!-- omit in toc -->

[![](https://img.shields.io/badge/made%20by-ChainSafe%20Systems-blue.svg?style=flat-square)](http://chainsafe.io)
[![codecov](https://img.shields.io/codecov/c/github/ChainSafe/js-libp2p-yamux.svg?style=flat-square)](https://codecov.io/gh/ChainSafe/js-libp2p-yamux)
[![CI](https://img.shields.io/github/workflow/status/ChainSafe/js-libp2p-yamux/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ChainSafe/js-libp2p-yamux/actions/workflows/js-test-and-release.yml)
[![CI](https://img.shields.io/github/actions/workflow/status/ChainSafe/js-libp2p-yamux/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ChainSafe/js-libp2p-yamux/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> Yamux stream multiplexer for libp2p
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Browser `<script>` tag](#browser-script-tag)
- [Usage](#usage)
- [API](#api)
- [Contribute](#contribute)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute-1)
- [Contribution](#contribution)

## Install

```console
$ npm i @chainsafe/libp2p-yamux
```

### Browser `<script>` tag

Loading this module through a script tag will make it's exports available as `ChainsafeLibp2pYamux` in the global namespace.

```html
<script src="https://unpkg.com/@chainsafe/libp2p-yamux/dist/index.min.js"></script>
```

## Usage

```js
Expand Down Expand Up @@ -91,13 +100,17 @@ The libp2p implementation in JavaScript is a work in progress. As such, there ar
- Go through the modules and **check out existing issues**. This is especially useful for modules in active development. Some knowledge of IPFS/libp2p may be required, as well as the infrastructure behind it - for instance, you may need to read up on p2p and more complex operations like muxing to be able to help technically.
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.

## API Docs

- <https://ChainSafe.github.io/js-libp2p-yamux>

## License

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>)

## Contribute
## 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.
12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand Down Expand Up @@ -167,7 +167,8 @@
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
"test:node": "aegir test -t node --cov",
"test:electron-main": "aegir test -t electron-main",
"release": "aegir release"
"release": "aegir release",
"docs": "aegir docs"
},
"dependencies": {
"@libp2p/interface-connection": "^3.0.1",
Expand All @@ -176,18 +177,15 @@
"abortable-iterator": "^4.0.2",
"any-signal": "^3.0.1",
"err-code": "^3.0.1",
"iso-random-stream": "^2.0.2",
"it-pipe": "^2.0.4",
"it-pushable": "^3.1.0",
"multiformats": "^10.0.0",
"uint8arraylist": "^2.3.2",
"uint8arrays": "^4.0.2"
"uint8arraylist": "^2.3.2"
},
"devDependencies": {
"@dapplion/benchmark": "^0.2.2",
"@libp2p/interface-stream-muxer-compliance-tests": "^6.0.0",
"@libp2p/mplex": "^7.0.0",
"aegir": "^37.3.0",
"aegir": "^37.9.1",
"it-drain": "^2.0.0",
"it-pair": "2.0.3",
"it-stream-types": "^1.0.4"
Expand Down

0 comments on commit beb4707

Please sign in to comment.