This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from ipld/typegen
feat: add typedef generation
- Loading branch information
Showing
6 changed files
with
155 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "ipfs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
- default | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
name: Typecheck | ||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Typecheck | ||
uses: gozala/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,10 @@ | |
"main": "src/index.js", | ||
"scripts": { | ||
"lint": "aegir lint", | ||
"build": "aegir build", | ||
"check": "tsc --noEmit --noErrorTruncation", | ||
"build": "npm run build:js && npm run build:types", | ||
"build:js": "aegir build", | ||
"build:types": "tsc --emitDeclarationOnly --declarationDir dist", | ||
"test": "aegir test", | ||
"test:node": "aegir test --target node", | ||
"test:browser": "aegir test --target browser", | ||
|
@@ -15,7 +18,8 @@ | |
"release-major": "aegir release --type major --docs", | ||
"coverage": "aegir coverage", | ||
"coverage-publish": "aegir coverage --provider coveralls", | ||
"docs": "aegir docs" | ||
"docs": "aegir docs", | ||
"prepare": "npm run build:types" | ||
}, | ||
"pre-push": [ | ||
"lint", | ||
|
@@ -34,17 +38,24 @@ | |
}, | ||
"homepage": "https://github.com/ipld/js-ipld-block#readme", | ||
"devDependencies": { | ||
"aegir": "^25.0.0", | ||
"uint8arrays": "^1.0.0" | ||
"aegir": "^27.0.0", | ||
"uint8arrays": "^1.0.0", | ||
"typescript": "^4.0.3" | ||
}, | ||
"dependencies": { | ||
"cids": "^1.0.0", | ||
"class-is": "^1.1.0" | ||
"cids": "^1.0.0" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0", | ||
"npm": ">=3.0.0" | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"dist/*" | ||
] | ||
} | ||
}, | ||
"contributors": [ | ||
"David Dias <[email protected]>", | ||
"Volker Mische <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"compilerOptions": { | ||
"allowJs": true, | ||
"checkJs": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": false, | ||
"noImplicitAny": true, | ||
"noImplicitThis": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"strictFunctionTypes": false, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
"strictBindCallApply": true, | ||
"strict": true, | ||
"alwaysStrict": true, | ||
"esModuleInterop": true, | ||
"target": "ES2018", | ||
"moduleResolution": "node", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"outDir": "dist", | ||
"skipLibCheck": true, | ||
"stripInternal": true, | ||
"resolveJsonModule": true, | ||
"paths": { | ||
"multiformats": [ | ||
"src" | ||
] | ||
}, | ||
"baseUrl": "." | ||
}, | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"vendor", | ||
"node_modules" | ||
], | ||
"compileOnSave": false | ||
} |