Skip to content

Commit ccd291c

Browse files
authored
chore: update project config (#102)
Update all project config to the latest version
1 parent 6cdc799 commit ccd291c

File tree

8 files changed

+134
-81
lines changed

8 files changed

+134
-81
lines changed

.github/dependabot.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: daily
7-
time: "11:00"
7+
time: "10:00"
88
open-pull-requests-limit: 10
9+
commit-message:
10+
prefix: "deps"
11+
prefix-development: "deps(dev)"

.github/workflows/automerge.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Automerge
2+
on: [ pull_request ]
3+
4+
jobs:
5+
automerge:
6+
uses: protocol/.github/.github/workflows/automerge.yml@master
7+
with:
8+
job: 'automerge'

.github/workflows/main.yml renamed to .github/workflows/js-test-and-release.yml

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ name: test & maybe release
22
on:
33
push:
44
branches:
5-
- master
5+
- master # with #262 - ${{{ github.default_branch }}}
66
pull_request:
77
branches:
8-
- master
8+
- master # with #262 - ${{{ github.default_branch }}}
99

1010
jobs:
1111

1212
check:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
1717
with:
1818
node-version: lts/*
1919
- uses: ipfs/aegir/actions/cache-node-modules@master
@@ -29,95 +29,115 @@ jobs:
2929
node: [16]
3030
fail-fast: true
3131
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/setup-node@v2
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-node@v3
3434
with:
3535
node-version: ${{ matrix.node }}
3636
- uses: ipfs/aegir/actions/cache-node-modules@master
3737
- run: npm run --if-present test:node
38-
- uses: codecov/codecov-action@v1
38+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
39+
with:
40+
flags: node
3941

4042
test-chrome:
4143
needs: check
4244
runs-on: ubuntu-latest
4345
steps:
44-
- uses: actions/checkout@v2
45-
- uses: actions/setup-node@v2
46+
- uses: actions/checkout@v3
47+
- uses: actions/setup-node@v3
4648
with:
4749
node-version: lts/*
4850
- uses: ipfs/aegir/actions/cache-node-modules@master
4951
- run: npm run --if-present test:chrome
52+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
53+
with:
54+
flags: chrome
5055

5156
test-chrome-webworker:
5257
needs: check
5358
runs-on: ubuntu-latest
5459
steps:
55-
- uses: actions/checkout@v2
56-
- uses: actions/setup-node@v2
60+
- uses: actions/checkout@v3
61+
- uses: actions/setup-node@v3
5762
with:
5863
node-version: lts/*
5964
- uses: ipfs/aegir/actions/cache-node-modules@master
6065
- run: npm run --if-present test:chrome-webworker
66+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
67+
with:
68+
flags: chrome-webworker
6169

6270
test-firefox:
6371
needs: check
6472
runs-on: ubuntu-latest
6573
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions/setup-node@v2
74+
- uses: actions/checkout@v3
75+
- uses: actions/setup-node@v3
6876
with:
6977
node-version: lts/*
7078
- uses: ipfs/aegir/actions/cache-node-modules@master
7179
- run: npm run --if-present test:firefox
80+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
81+
with:
82+
flags: firefox
7283

7384
test-firefox-webworker:
7485
needs: check
7586
runs-on: ubuntu-latest
7687
steps:
77-
- uses: actions/checkout@v2
78-
- uses: actions/setup-node@v2
88+
- uses: actions/checkout@v3
89+
- uses: actions/setup-node@v3
7990
with:
8091
node-version: lts/*
8192
- uses: ipfs/aegir/actions/cache-node-modules@master
8293
- run: npm run --if-present test:firefox-webworker
94+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
95+
with:
96+
flags: firefox-webworker
8397

8498
test-electron-main:
8599
needs: check
86100
runs-on: ubuntu-latest
87101
steps:
88-
- uses: actions/checkout@v2
89-
- uses: actions/setup-node@v2
102+
- uses: actions/checkout@v3
103+
- uses: actions/setup-node@v3
90104
with:
91105
node-version: lts/*
92106
- uses: ipfs/aegir/actions/cache-node-modules@master
93107
- run: npx xvfb-maybe npm run --if-present test:electron-main
108+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
109+
with:
110+
flags: electron-main
94111

95112
test-electron-renderer:
96113
needs: check
97114
runs-on: ubuntu-latest
98115
steps:
99-
- uses: actions/checkout@v2
100-
- uses: actions/setup-node@v2
116+
- uses: actions/checkout@v3
117+
- uses: actions/setup-node@v3
101118
with:
102119
node-version: lts/*
103120
- uses: ipfs/aegir/actions/cache-node-modules@master
104121
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
122+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
123+
with:
124+
flags: electron-renderer
105125

106126
release:
107127
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
108128
runs-on: ubuntu-latest
109-
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
129+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
110130
steps:
111-
- uses: actions/checkout@v2.4.0
131+
- uses: actions/checkout@v3
112132
with:
113133
fetch-depth: 0
114-
- uses: actions/setup-node@v2
134+
- uses: actions/setup-node@v3
115135
with:
116136
node-version: lts/*
117137
- uses: ipfs/aegir/actions/cache-node-modules@master
118138
- uses: ipfs/aegir/actions/docker-login@master
119139
with:
120-
docker-token: ${{ secrets.DOCKER_USERNAME }}
140+
docker-token: ${{ secrets.DOCKER_TOKEN }}
121141
docker-username: ${{ secrets.DOCKER_USERNAME }}
122142
- run: npm run --if-present release
123143
env:

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
This project is dual licensed under MIT and Apache-2.0.
2+
13
MIT: https://www.opensource.org/licenses/mit
2-
Apache-2.0: https://www.apache.org/licenses/license-2.0
4+
Apache-2.0: https://www.apache.org/licenses/license-2.0

LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
19+
THE SOFTWARE.

README.md

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
1-
# multiaddr-to-uri <!-- omit in toc -->
1+
# @multiformats/multiaddr-to-uri <!-- omit in toc -->
22

3-
[![Build Status](https://travis-ci.org/multiformats/js-multiaddr-to-uri.svg?branch=master)](https://travis-ci.org/multiformats/js-multiaddr-to-uri) [![dependencies Status](https://david-dm.org/multiformats/js-multiaddr-to-uri/status.svg)](https://david-dm.org/multiformats/js-multiaddr-to-uri) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
3+
[![multiformats.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://multiformats.io)
4+
[![codecov](https://img.shields.io/codecov/c/github/multiformats/js-multiaddr-to-uri.svg?style=flat-square)](https://codecov.io/gh/multiformats/js-multiaddr-to-uri)
5+
[![CI](https://img.shields.io/github/workflow/status/multiformats/js-multiaddr-to-uri/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/multiformats/js-multiaddr-to-uri/actions/workflows/js-test-and-release.yml)
46

7+
> Convert a Multiaddr to a URI /dnsaddr/ipfs.io/http -> <http://ipfs.io>
58
6-
> Convert a Multiaddr to a URI /dnsaddr/ipfs.io/http -> http://ipfs.io
7-
8-
## Table of contents <!-- omit in toc -->
9+
## Table of contents <!-- omit in toc -->
910

1011
- [Install](#install)
1112
- [Usage](#usage)
1213
- [Contribute](#contribute)
1314
- [License](#license)
15+
- [Contribute](#contribute-1)
16+
1417
## Install
1518

16-
```sh
17-
npm install @multiformats/multiaddr-to-uri
19+
```console
20+
$ npm i @multiformats/multiaddr-to-uri
1821
```
1922

2023
## Usage
@@ -34,18 +37,25 @@ console.log(multiaddrToUri('/ip4/127.0.0.1/tcp/8080', { assumeHttp: false }))
3437

3538
Note:
3639

37-
* When `/tcp` is the last (terminating) protocol HTTP is assumed by default (implicit `assumeHttp: true`)
38-
* this means produced URIs will start with `http://` instead of `tcp://`
39-
* passing `{ assumeHttp: false }` disables this behavior
40-
* Might be lossy - e.g. a DNSv6 multiaddr
41-
* Can throw if the passed multiaddr:
42-
* is not a valid multiaddr
43-
* is not supported as a URI e.g. circuit
40+
- When `/tcp` is the last (terminating) protocol HTTP is assumed by default (implicit `assumeHttp: true`)
41+
- this means produced URIs will start with `http://` instead of `tcp://`
42+
- passing `{ assumeHttp: false }` disables this behavior
43+
- Might be lossy - e.g. a DNSv6 multiaddr
44+
- Can throw if the passed multiaddr:
45+
- is not a valid multiaddr
46+
- is not supported as a URI e.g. circuit
4447

4548
## Contribute
4649

4750
Feel free to dive in! [Open an issue](https://github.com/multiformats/js-multiaddr-to-uri/issues/new) or submit PRs.
4851

4952
## License
5053

51-
[Apache-2.0](LICENSE-APACHE) or [MIT](LICENSE-MIT)
54+
Licensed under either of
55+
56+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
57+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
58+
59+
## Contribute
60+
61+
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

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22
"name": "@multiformats/multiaddr-to-uri",
33
"version": "9.0.1",
44
"description": "Convert a Multiaddr to a URI /dnsaddr/ipfs.io/http -> http://ipfs.io",
5+
"author": "Alan Shaw",
6+
"license": "Apache-2.0 OR MIT",
7+
"homepage": "https://github.com/multiformats/js-multiaddr-to-uri#readme",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/multiformats/js-multiaddr-to-uri.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/multiformats/js-multiaddr-to-uri/issues"
14+
},
15+
"keywords": [
16+
"URL",
17+
"multiaddr",
18+
"toString"
19+
],
20+
"engines": {
21+
"node": ">=16.0.0",
22+
"npm": ">=7.0.0"
23+
},
524
"type": "module",
625
"types": "./dist/src/index.d.ts",
726
"files": [
@@ -12,6 +31,7 @@
1231
],
1332
"exports": {
1433
".": {
34+
"types": "./dist/src/index.d.ts",
1535
"import": "./dist/src/index.js"
1636
}
1737
},
@@ -21,41 +41,6 @@
2141
"sourceType": "module"
2242
}
2343
},
24-
"scripts": {
25-
"lint": "aegir lint",
26-
"dep-check": "aegir dep-check dist/src/**/*.js dist/test/**/*.js",
27-
"build": "tsc",
28-
"pretest": "npm run build",
29-
"test": "aegir test -f ./dist/test/**/*.js",
30-
"test:chrome": "npm run test -- -t browser",
31-
"test:chrome-webworker": "npm run test -- -t webworker",
32-
"test:firefox": "npm run test -- -t browser -- --browser firefox",
33-
"test:firefox-webworker": "npm run test -- -t webworker -- --browser firefox",
34-
"test:node": "npm run test -- -t node --cov",
35-
"test:electron-main": "npm run test -- -t electron-main",
36-
"release": "semantic-release"
37-
},
38-
"keywords": [
39-
"multiaddr",
40-
"toString",
41-
"URL"
42-
],
43-
"author": "Alan Shaw",
44-
"license": "Apache-2.0 or MIT",
45-
"devDependencies": {
46-
"aegir": "^36.1.3"
47-
},
48-
"dependencies": {
49-
"@multiformats/multiaddr": "^10.1.1"
50-
},
51-
"repository": {
52-
"type": "git",
53-
"url": "git+https://github.com/multiformats/js-multiaddr-to-uri.git"
54-
},
55-
"bugs": {
56-
"url": "https://github.com/multiformats/js-multiaddr-to-uri/issues"
57-
},
58-
"homepage": "https://github.com/multiformats/js-multiaddr-to-uri#readme",
5944
"release": {
6045
"branches": [
6146
"master"
@@ -83,15 +68,15 @@
8368
"release": "patch"
8469
},
8570
{
86-
"type": "chore",
71+
"type": "docs",
8772
"release": "patch"
8873
},
8974
{
90-
"type": "docs",
75+
"type": "test",
9176
"release": "patch"
9277
},
9378
{
94-
"type": "test",
79+
"type": "deps",
9580
"release": "patch"
9681
},
9782
{
@@ -121,7 +106,11 @@
121106
},
122107
{
123108
"type": "docs",
124-
"section": "Trivial Changes"
109+
"section": "Documentation"
110+
},
111+
{
112+
"type": "deps",
113+
"section": "Dependencies"
125114
},
126115
{
127116
"type": "test",
@@ -136,5 +125,26 @@
136125
"@semantic-release/github",
137126
"@semantic-release/git"
138127
]
128+
},
129+
"scripts": {
130+
"clean": "aegir clean",
131+
"lint": "aegir lint",
132+
"dep-check": "aegir dep-check",
133+
"generate": "protons src/pb/peer.proto src/pb/tags.proto",
134+
"build": "aegir build",
135+
"test": "aegir test",
136+
"test:chrome": "aegir test -t browser --cov",
137+
"test:chrome-webworker": "aegir test -t webworker",
138+
"test:firefox": "aegir test -t browser -- --browser firefox",
139+
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
140+
"test:node": "aegir test -t node --cov",
141+
"test:electron-main": "aegir test -t electron-main",
142+
"release": "aegir release"
143+
},
144+
"dependencies": {
145+
"@multiformats/multiaddr": "^10.1.1"
146+
},
147+
"devDependencies": {
148+
"aegir": "^37.5.3"
139149
}
140150
}

test/test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-env mocha */
2-
import { expect } from 'aegir/utils/chai.js'
2+
import { expect } from 'aegir/chai'
33
import { multiaddrToUri as toUri } from '../src/index.js'
44

55
describe('multiaddr-to-uri', () => {

0 commit comments

Comments
 (0)