Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit 51cd55e

Browse files
authored
feat: types (#53)
Adds types support
1 parent b950f3d commit 51cd55e

File tree

10 files changed

+205
-133
lines changed

10 files changed

+205
-133
lines changed

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- run: npm install
16+
- run: npx aegir lint
17+
- uses: gozala/[email protected]
18+
- run: npx aegir build
19+
- run: npx aegir dep-check
20+
- uses: ipfs/aegir/actions/bundle-size@master
21+
name: size
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
test-node:
25+
needs: check
26+
runs-on: ${{ matrix.os }}
27+
strategy:
28+
matrix:
29+
os: [windows-latest, ubuntu-latest, macos-latest]
30+
node: [12, 14]
31+
fail-fast: true
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: actions/setup-node@v1
35+
with:
36+
node-version: ${{ matrix.node }}
37+
- run: npm install
38+
- run: npx nyc --reporter=lcov aegir test -t node -- --bail
39+
- uses: codecov/codecov-action@v1
40+
test-chrome:
41+
needs: check
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- run: npm install
46+
- run: npx aegir test -t browser -t webworker --bail
47+
test-firefox:
48+
needs: check
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v2
52+
- run: npm install
53+
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless
54+
test-electron-main:
55+
needs: check
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v2
59+
- run: npm install
60+
- run: npx xvfb-maybe aegir test -t electron-main --bail
61+
test-electron-renderer:
62+
needs: check
63+
runs-on: ubuntu-latest
64+
steps:
65+
- uses: actions/checkout@v2
66+
- run: npm install
67+
- run: npx xvfb-maybe aegir test -t electron-renderer --bail

.npmignore

Lines changed: 0 additions & 47 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,17 @@
44
"description": "Datastore implementation with level(up|down) backend",
55
"leadMaintainer": "Pedro Teixeira <[email protected]>",
66
"main": "src/index.js",
7+
"types": "dist/src/index.d.ts",
8+
"files": [
9+
"src",
10+
"dist"
11+
],
712
"scripts": {
813
"test": "aegir test",
914
"test:node": "aegir test -t node",
1015
"test:browser": "aegir test -t browser",
1116
"test:webworker": "aegir test -t webworker",
12-
"build": "aegir build",
17+
"prepare": "aegir build --no-bundle",
1318
"lint": "aegir lint",
1419
"release": "aegir release",
1520
"release-minor": "aegir release --type minor",
@@ -37,18 +42,21 @@
3742
},
3843
"homepage": "https://github.com/ipfs/js-datastore-level#readme",
3944
"dependencies": {
40-
"datastore-core": "^2.0.0",
41-
"interface-datastore": "^2.0.0",
45+
"datastore-core": "^3.0.0",
46+
"interface-datastore": "^3.0.3",
4247
"level": "^5.0.1"
4348
},
4449
"devDependencies": {
45-
"aegir": "^28.1.0",
50+
"aegir": "^30.3.0",
4651
"chai": "^4.2.0",
47-
"cids": "^1.0.2",
52+
"cids": "^1.1.5",
4853
"dirty-chai": "^2.0.1",
4954
"level-mem": "^5.0.1",
5055
"rimraf": "^3.0.0"
5156
},
57+
"eslintConfig": {
58+
"extends": "ipfs"
59+
},
5260
"contributors": [
5361
"David Dias <[email protected]>",
5462
"achingbrain <[email protected]>",

0 commit comments

Comments
 (0)