Skip to content

Commit beb4707

Browse files
authored
fix: remove unused deps (#19)
Several declared dependencies of this module are unused so remove them. Also publish API docs.
1 parent 6fa8cf4 commit beb4707

File tree

4 files changed

+25
-58
lines changed

4 files changed

+25
-58
lines changed

.github/workflows/js-test-and-release.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
branches:
55
- master # with #262 - ${{{ github.default_branch }}}
66
pull_request:
7-
branches:
8-
- master # with #262 - ${{{ github.default_branch }}}
97

108
jobs:
119

@@ -26,7 +24,7 @@ jobs:
2624
strategy:
2725
matrix:
2826
os: [windows-latest, ubuntu-latest, macos-latest]
29-
node: [16]
27+
node: [lts/*]
3028
fail-fast: true
3129
steps:
3230
- uses: actions/checkout@v3

.gitignore

+2-44
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,6 @@
1-
docs
2-
package-lock.json
3-
yarn.lock
4-
5-
**/node_modules/
6-
**/*.log
7-
test/repo-tests*
8-
**/bundle.js
9-
10-
# Logs
11-
logs
12-
*.log
13-
14-
coverage
15-
16-
# Runtime data
17-
pids
18-
*.pid
19-
*.seed
20-
21-
# Directory for instrumented libs generated by jscoverage/JSCover
22-
lib-cov
23-
24-
# Coverage directory used by tools like istanbul
25-
coverage
26-
.coverage
27-
28-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# node-waf configuration
32-
.lock-wscript
33-
34-
build
35-
36-
# Dependency directory
37-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
381
node_modules
39-
40-
lib
412
dist
42-
test/test-data/go-ipfs-repo/LOCK
43-
test/test-data/go-ipfs-repo/LOG
44-
test/test-data/go-ipfs-repo/LOG.old
45-
46-
# while testing npm5
3+
.docs
4+
.coverage
475
package-lock.json
486
yarn.lock

README.md

+17-4
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
# @chainsafe/libp2p-yamux <!-- omit in toc -->
22

3-
[![](https://img.shields.io/badge/made%20by-ChainSafe%20Systems-blue.svg?style=flat-square)](http://chainsafe.io)
43
[![codecov](https://img.shields.io/codecov/c/github/ChainSafe/js-libp2p-yamux.svg?style=flat-square)](https://codecov.io/gh/ChainSafe/js-libp2p-yamux)
5-
[![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)
4+
[![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)
65

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

1110
- [Install](#install)
11+
- [Browser `<script>` tag](#browser-script-tag)
1212
- [Usage](#usage)
1313
- [API](#api)
1414
- [Contribute](#contribute)
15+
- [API Docs](#api-docs)
1516
- [License](#license)
16-
- [Contribute](#contribute-1)
17+
- [Contribution](#contribution)
1718

1819
## Install
1920

2021
```console
2122
$ npm i @chainsafe/libp2p-yamux
2223
```
2324

25+
### Browser `<script>` tag
26+
27+
Loading this module through a script tag will make it's exports available as `ChainsafeLibp2pYamux` in the global namespace.
28+
29+
```html
30+
<script src="https://unpkg.com/@chainsafe/libp2p-yamux/dist/index.min.js"></script>
31+
```
32+
2433
## Usage
2534

2635
```js
@@ -91,13 +100,17 @@ The libp2p implementation in JavaScript is a work in progress. As such, there ar
91100
- 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.
92101
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
93102

103+
## API Docs
104+
105+
- <https://ChainSafe.github.io/js-libp2p-yamux>
106+
94107
## License
95108

96109
Licensed under either of
97110

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

101-
## Contribute
114+
## Contribution
102115

103116
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.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"files": [
4444
"src",
45-
"dist/src",
45+
"dist",
4646
"!dist/test",
4747
"!**/*.tsbuildinfo"
4848
],
@@ -167,7 +167,8 @@
167167
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
168168
"test:node": "aegir test -t node --cov",
169169
"test:electron-main": "aegir test -t electron-main",
170-
"release": "aegir release"
170+
"release": "aegir release",
171+
"docs": "aegir docs"
171172
},
172173
"dependencies": {
173174
"@libp2p/interface-connection": "^3.0.1",
@@ -176,18 +177,15 @@
176177
"abortable-iterator": "^4.0.2",
177178
"any-signal": "^3.0.1",
178179
"err-code": "^3.0.1",
179-
"iso-random-stream": "^2.0.2",
180180
"it-pipe": "^2.0.4",
181181
"it-pushable": "^3.1.0",
182-
"multiformats": "^10.0.0",
183-
"uint8arraylist": "^2.3.2",
184-
"uint8arrays": "^4.0.2"
182+
"uint8arraylist": "^2.3.2"
185183
},
186184
"devDependencies": {
187185
"@dapplion/benchmark": "^0.2.2",
188186
"@libp2p/interface-stream-muxer-compliance-tests": "^6.0.0",
189187
"@libp2p/mplex": "^7.0.0",
190-
"aegir": "^37.3.0",
188+
"aegir": "^37.9.1",
191189
"it-drain": "^2.0.0",
192190
"it-pair": "2.0.3",
193191
"it-stream-types": "^1.0.4"

0 commit comments

Comments
 (0)