Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
feat: add ts types with aegir
Browse files Browse the repository at this point in the history
this is a best effort approach since multiformats/multiformats will probably superseed this repo soon.
  • Loading branch information
hugomrdias committed Nov 24, 2020
1 parent c9afd37 commit 57b727e
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 248 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
67 changes: 67 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn lint
- run: yarn build
- uses: gozala/typescript-error-reporter-action@v1.0.4
- run: yarn aegir dep-check -- -i aegir
- uses: ipfs/aegir/actions/bundle-size@master
name: size
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
test-node:
needs: check
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
node: [12, 14]
fail-fast: true
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: yarn
- run: npx nyc --reporter=lcov npm run test:node -- --bail
- uses: codecov/codecov-action@v1
test-chrome:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn aegir test -t browser -t webworker
test-firefox:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn aegir test -t browser -t webworker -- --browsers FirefoxHeadless
test-electron-main:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: npx xvfb-maybe yarn aegir test -t electron-main --bail
test-electron-renderer:
needs: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: npx xvfb-maybe yarn aegir test -t electron-renderer --bail
35 changes: 0 additions & 35 deletions .npmignore

This file was deleted.

40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"coverage": "aegir coverage",
"docs": "aegir docs"
},
"files": [
"src",
"dist"
],
"pre-push": [
"lint",
"test"
Expand All @@ -35,20 +39,22 @@
"url": "https://github.com/multiformats/js-cid/issues"
},
"dependencies": {
"class-is": "^1.1.0",
"multibase": "^3.0.1",
"multicodec": "^2.0.1",
"multihashes": "^3.0.1",
"uint8arrays": "^1.1.0"
},
"devDependencies": {
"aegir": "^26.0.0",
"aegir": "^29.0.1",
"multihashing-async": "^2.0.1"
},
"engines": {
"node": ">=4.0.0",
"npm": ">=3.0.0"
},
"eslintConfig": {
"extends": "ipfs"
},
"contributors": [
"David Dias <daviddias.p@gmail.com>",
"Volker Mische <volker.mische@gmail.com>",
Expand Down
2 changes: 1 addition & 1 deletion src/cid-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const CIDUtil = {
* Returns undefined if it is a valid CID.
*
* @param {any} other
* @returns {string}
* @returns {string|undefined}
*/
checkCIDComponents: function (other) {
if (other == null) {
Expand Down
126 changes: 0 additions & 126 deletions src/index.d.ts

This file was deleted.

Loading

0 comments on commit 57b727e

Please sign in to comment.