Skip to content

Commit b752604

Browse files
authored
fix: update project config (#10)
Update config to publish on dep: keyword
1 parent 3235d5f commit b752604

File tree

5 files changed

+137
-56
lines changed

5 files changed

+137
-56
lines changed

.github/dependabot.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ updates:
66
interval: daily
77
time: "10:00"
88
open-pull-requests-limit: 10
9+
commit-message:
10+
prefix: "deps"
11+
prefix-development: "deps(dev)"

.github/workflows/automerge.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# File managed by web3-bot. DO NOT EDIT.
2-
# See https://github.com/protocol/.github/ for details.
3-
41
name: Automerge
52
on: [ pull_request ]
63

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

+25-35
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# File managed by web3-bot. DO NOT EDIT.
2-
# See https://github.com/protocol/.github/ for details.
3-
41
name: test & maybe release
52
on:
63
push:
@@ -15,8 +12,8 @@ jobs:
1512
check:
1613
runs-on: ubuntu-latest
1714
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
2017
with:
2118
node-version: lts/*
2219
- uses: ipfs/aegir/actions/cache-node-modules@master
@@ -32,116 +29,109 @@ jobs:
3229
node: [16]
3330
fail-fast: true
3431
steps:
35-
- uses: actions/checkout@v2
36-
- uses: actions/setup-node@v2
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-node@v3
3734
with:
3835
node-version: ${{ matrix.node }}
3936
- uses: ipfs/aegir/actions/cache-node-modules@master
4037
- run: npm run --if-present test:node
41-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
38+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
4239
with:
43-
directory: ./.nyc_output
4440
flags: node
4541

4642
test-chrome:
4743
needs: check
4844
runs-on: ubuntu-latest
4945
steps:
50-
- uses: actions/checkout@v2
51-
- uses: actions/setup-node@v2
46+
- uses: actions/checkout@v3
47+
- uses: actions/setup-node@v3
5248
with:
5349
node-version: lts/*
5450
- uses: ipfs/aegir/actions/cache-node-modules@master
5551
- run: npm run --if-present test:chrome
56-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
52+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
5753
with:
58-
directory: ./.nyc_output
5954
flags: chrome
6055

6156
test-chrome-webworker:
6257
needs: check
6358
runs-on: ubuntu-latest
6459
steps:
65-
- uses: actions/checkout@v2
66-
- uses: actions/setup-node@v2
60+
- uses: actions/checkout@v3
61+
- uses: actions/setup-node@v3
6762
with:
6863
node-version: lts/*
6964
- uses: ipfs/aegir/actions/cache-node-modules@master
7065
- run: npm run --if-present test:chrome-webworker
71-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
66+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
7267
with:
73-
directory: ./.nyc_output
7468
flags: chrome-webworker
7569

7670
test-firefox:
7771
needs: check
7872
runs-on: ubuntu-latest
7973
steps:
80-
- uses: actions/checkout@v2
81-
- uses: actions/setup-node@v2
74+
- uses: actions/checkout@v3
75+
- uses: actions/setup-node@v3
8276
with:
8377
node-version: lts/*
8478
- uses: ipfs/aegir/actions/cache-node-modules@master
8579
- run: npm run --if-present test:firefox
86-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
80+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
8781
with:
88-
directory: ./.nyc_output
8982
flags: firefox
9083

9184
test-firefox-webworker:
9285
needs: check
9386
runs-on: ubuntu-latest
9487
steps:
95-
- uses: actions/checkout@v2
96-
- uses: actions/setup-node@v2
88+
- uses: actions/checkout@v3
89+
- uses: actions/setup-node@v3
9790
with:
9891
node-version: lts/*
9992
- uses: ipfs/aegir/actions/cache-node-modules@master
10093
- run: npm run --if-present test:firefox-webworker
101-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
94+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
10295
with:
103-
directory: ./.nyc_output
10496
flags: firefox-webworker
10597

10698
test-electron-main:
10799
needs: check
108100
runs-on: ubuntu-latest
109101
steps:
110-
- uses: actions/checkout@v2
111-
- uses: actions/setup-node@v2
102+
- uses: actions/checkout@v3
103+
- uses: actions/setup-node@v3
112104
with:
113105
node-version: lts/*
114106
- uses: ipfs/aegir/actions/cache-node-modules@master
115107
- run: npx xvfb-maybe npm run --if-present test:electron-main
116-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
108+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
117109
with:
118-
directory: ./.nyc_output
119110
flags: electron-main
120111

121112
test-electron-renderer:
122113
needs: check
123114
runs-on: ubuntu-latest
124115
steps:
125-
- uses: actions/checkout@v2
126-
- uses: actions/setup-node@v2
116+
- uses: actions/checkout@v3
117+
- uses: actions/setup-node@v3
127118
with:
128119
node-version: lts/*
129120
- uses: ipfs/aegir/actions/cache-node-modules@master
130121
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
131-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
122+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
132123
with:
133-
directory: ./.nyc_output
134124
flags: electron-renderer
135125

136126
release:
137127
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
138128
runs-on: ubuntu-latest
139129
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
140130
steps:
141-
- uses: actions/checkout@v2
131+
- uses: actions/checkout@v3
142132
with:
143133
fetch-depth: 0
144-
- uses: actions/setup-node@v2
134+
- uses: actions/setup-node@v3
145135
with:
146136
node-version: lts/*
147137
- uses: ipfs/aegir/actions/cache-node-modules@master

README.md

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
1-
# js-libp2p-yamux
1+
# @chainsafe/libp2p-yamux <!-- omit in toc -->
22

33
[![](https://img.shields.io/badge/made%20by-ChainSafe%20Systems-blue.svg?style=flat-square)](http://chainsafe.io)
4-
[![](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
5-
[![](https://img.shields.io/codecov/c/github/chainsafe/js-libp2p-yamux.svg?style=flat-square)](https://codecov.io/gh/chainsafe/js-libp2p-yamux)
6-
[![Build Status](https://github.com/chainsafe/js-libp2p-yamux/actions/workflows/js-test-and-release.yml/badge.svg?branch=master)](https://github.com/chainsafe/js-libp2p-yamux/actions/workflows/js-test-and-release.yml)
7-
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
8-
![](https://img.shields.io/badge/npm-%3E%3D7.0.0-orange.svg?style=flat-square)
9-
![](https://img.shields.io/badge/Node.js-%3E%3D16.0.0-orange.svg?style=flat-square)
4+
[![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)
106

11-
> JavaScript implementation of [yamux](https://github.com/hashicorp/yamux/blob/master/spec.md).
7+
> Yamux stream multiplexer for libp2p
128
13-
[![](https://github.com/libp2p/js-libp2p-interfaces/raw/master/packages/libp2p-interfaces/src/stream-muxer/img/badge.png)](https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-interfaces/src/stream-muxer)
9+
## Table of contents <!-- omit in toc -->
10+
11+
- [Install](#install)
12+
- [Usage](#usage)
13+
- [API](#api)
14+
- [Contribute](#contribute)
15+
- [License](#license)
16+
- [Contribute](#contribute-1)
1417

1518
## Install
1619

17-
```sh
18-
npm install @chainsafe/libp2p-yamux
20+
```console
21+
$ npm i @chainsafe/libp2p-yamux
1922
```
2023

2124
## Usage
@@ -86,16 +89,16 @@ This library implements the `StreamMuxerFactory`, `StreamMuxer` and `Stream` int
8689

8790
The libp2p implementation in JavaScript is a work in progress. As such, there are a few things you can do right now to help out:
8891

89-
- 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.
90-
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
92+
- 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.
93+
- **Perform code reviews**. More eyes will help a) speed the project along b) ensure quality and c) reduce possible future bugs.
9194

9295
## License
9396

9497
Licensed under either of
9598

96-
* Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / http://www.apache.org/licenses/LICENSE-2.0)
97-
* MIT ([LICENSE-MIT](LICENSE-MIT) / http://opensource.org/licenses/MIT)
99+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
100+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
98101

99-
### Contribution
102+
## Contribute
100103

101104
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

+90-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
"keywords": [
1515
"IPFS",
1616
"libp2p",
17-
"stream",
1817
"multiplexer",
19-
"muxer"
18+
"muxer",
19+
"stream"
2020
],
2121
"engines": {
2222
"node": ">=16.0.0",
@@ -48,12 +48,15 @@
4848
],
4949
"exports": {
5050
".": {
51+
"types": "./dist/src/index.d.ts",
5152
"import": "./dist/src/index.js"
5253
},
5354
"./config": {
55+
"types": "./dist/src/config.d.ts",
5456
"import": "./dist/src/config.js"
5557
},
5658
"./stream": {
59+
"types": "./dist/src/stream.d.ts",
5760
"import": "./dist/src/stream.js"
5861
}
5962
},
@@ -66,6 +69,91 @@
6669
"src/*.d.ts"
6770
]
6871
},
72+
"release": {
73+
"branches": [
74+
"master"
75+
],
76+
"plugins": [
77+
[
78+
"@semantic-release/commit-analyzer",
79+
{
80+
"preset": "conventionalcommits",
81+
"releaseRules": [
82+
{
83+
"breaking": true,
84+
"release": "major"
85+
},
86+
{
87+
"revert": true,
88+
"release": "patch"
89+
},
90+
{
91+
"type": "feat",
92+
"release": "minor"
93+
},
94+
{
95+
"type": "fix",
96+
"release": "patch"
97+
},
98+
{
99+
"type": "docs",
100+
"release": "patch"
101+
},
102+
{
103+
"type": "test",
104+
"release": "patch"
105+
},
106+
{
107+
"type": "deps",
108+
"release": "patch"
109+
},
110+
{
111+
"scope": "no-release",
112+
"release": false
113+
}
114+
]
115+
}
116+
],
117+
[
118+
"@semantic-release/release-notes-generator",
119+
{
120+
"preset": "conventionalcommits",
121+
"presetConfig": {
122+
"types": [
123+
{
124+
"type": "feat",
125+
"section": "Features"
126+
},
127+
{
128+
"type": "fix",
129+
"section": "Bug Fixes"
130+
},
131+
{
132+
"type": "chore",
133+
"section": "Trivial Changes"
134+
},
135+
{
136+
"type": "docs",
137+
"section": "Documentation"
138+
},
139+
{
140+
"type": "deps",
141+
"section": "Dependencies"
142+
},
143+
{
144+
"type": "test",
145+
"section": "Tests"
146+
}
147+
]
148+
}
149+
}
150+
],
151+
"@semantic-release/changelog",
152+
"@semantic-release/npm",
153+
"@semantic-release/github",
154+
"@semantic-release/git"
155+
]
156+
},
69157
"scripts": {
70158
"clean": "aegir clean",
71159
"lint": "aegir lint",

0 commit comments

Comments
 (0)