Skip to content

Commit bc9cd3e

Browse files
authored
feat!: convert to typescript (#53)
BREAKING CHANGE: this module is now ESM only
1 parent 393859a commit bc9cd3e

17 files changed

+631
-444
lines changed

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "10:00"
8+
open-pull-requests-limit: 10
9+
commit-message:
10+
prefix: "deps"
11+
prefix-development: "deps(dev)"

.github/workflows/automerge.yml

+8
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'
+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
name: test & maybe release
2+
on:
3+
push:
4+
branches:
5+
- master # with #262 - ${{{ github.default_branch }}}
6+
pull_request:
7+
branches:
8+
- master # with #262 - ${{{ github.default_branch }}}
9+
10+
jobs:
11+
12+
check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: lts/*
19+
- uses: ipfs/aegir/actions/cache-node-modules@master
20+
- run: npm run --if-present lint
21+
- run: npm run --if-present dep-check
22+
23+
test-node:
24+
needs: check
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
matrix:
28+
os: [windows-latest, ubuntu-latest, macos-latest]
29+
node: [16]
30+
fail-fast: true
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ matrix.node }}
36+
- uses: ipfs/aegir/actions/cache-node-modules@master
37+
- run: npm run --if-present test:node
38+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
39+
with:
40+
flags: node
41+
42+
test-chrome:
43+
needs: check
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- uses: actions/setup-node@v3
48+
with:
49+
node-version: lts/*
50+
- uses: ipfs/aegir/actions/cache-node-modules@master
51+
- run: npm run --if-present test:chrome
52+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
53+
with:
54+
flags: chrome
55+
56+
test-chrome-webworker:
57+
needs: check
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v3
61+
- uses: actions/setup-node@v3
62+
with:
63+
node-version: lts/*
64+
- uses: ipfs/aegir/actions/cache-node-modules@master
65+
- run: npm run --if-present test:chrome-webworker
66+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
67+
with:
68+
flags: chrome-webworker
69+
70+
test-firefox:
71+
needs: check
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v3
75+
- uses: actions/setup-node@v3
76+
with:
77+
node-version: lts/*
78+
- uses: ipfs/aegir/actions/cache-node-modules@master
79+
- run: npm run --if-present test:firefox
80+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
81+
with:
82+
flags: firefox
83+
84+
test-firefox-webworker:
85+
needs: check
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v3
89+
- uses: actions/setup-node@v3
90+
with:
91+
node-version: lts/*
92+
- uses: ipfs/aegir/actions/cache-node-modules@master
93+
- run: npm run --if-present test:firefox-webworker
94+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
95+
with:
96+
flags: firefox-webworker
97+
98+
test-electron-main:
99+
needs: check
100+
runs-on: ubuntu-latest
101+
steps:
102+
- uses: actions/checkout@v3
103+
- uses: actions/setup-node@v3
104+
with:
105+
node-version: lts/*
106+
- uses: ipfs/aegir/actions/cache-node-modules@master
107+
- 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
111+
112+
test-electron-renderer:
113+
needs: check
114+
runs-on: ubuntu-latest
115+
steps:
116+
- uses: actions/checkout@v3
117+
- uses: actions/setup-node@v3
118+
with:
119+
node-version: lts/*
120+
- uses: ipfs/aegir/actions/cache-node-modules@master
121+
- 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
125+
126+
release:
127+
needs: [test-node, test-chrome, test-chrome-webworker, test-firefox, test-firefox-webworker, test-electron-main, test-electron-renderer]
128+
runs-on: ubuntu-latest
129+
if: github.event_name == 'push' && github.ref == 'refs/heads/master' # with #262 - 'refs/heads/${{{ github.default_branch }}}'
130+
steps:
131+
- uses: actions/checkout@v3
132+
with:
133+
fetch-depth: 0
134+
- uses: actions/setup-node@v3
135+
with:
136+
node-version: lts/*
137+
- uses: ipfs/aegir/actions/cache-node-modules@master
138+
- uses: ipfs/aegir/actions/docker-login@master
139+
with:
140+
docker-token: ${{ secrets.DOCKER_TOKEN }}
141+
docker-username: ${{ secrets.DOCKER_USERNAME }}
142+
- run: npm run --if-present release
143+
env:
144+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.travis.yml

-58
This file was deleted.

LICENSE

+3-20
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
The MIT License (MIT)
1+
This project is dual licensed under MIT and Apache-2.0.
22

3-
Copyright (c) 2018 Protocol Labs, Inc.
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in
13-
all copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21-
THE SOFTWARE.
3+
MIT: https://www.opensource.org/licenses/mit
4+
Apache-2.0: https://www.apache.org/licenses/license-2.0

LICENSE-APACHE

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
2+
3+
http://www.apache.org/licenses/LICENSE-2.0
4+
5+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

LICENSE-MIT

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
The MIT License (MIT)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

0 commit comments

Comments
 (0)