-
Notifications
You must be signed in to change notification settings - Fork 47
feat: typedef generation & type checking #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
72cf949
feat: typedef generation & type checking
Gozala 0ca4e3d
fix: fill type holes
Gozala c028b3c
chore: address review comments
Gozala 80b8bed
chore: merge master
Gozala 1c84c82
fix: regression in typings
Gozala 1afa39d
chore: retrigger ci with changed deps
Gozala 49d0998
fix: add ts to dev-deps
Gozala 815bcbd
chore: update deps, type tests as well as source
achingbrain bd9d4db
chore: update typecheck version
achingbrain e51719e
chore: update to new aegir
Gozala aa49791
chore: merge master
Gozala 9a0708c
chore: remove gh urls
achingbrain 76036fa
chore: update node version
achingbrain 71c3d15
chore: update bundle size config param
achingbrain bdcc596
chore: add temporary exit
achingbrain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,25 +1,33 @@ | ||
'use strict' | ||
const path = require('path') | ||
|
||
module.exports = { | ||
bundlesize: { maxSize: '68kB' }, | ||
karma: { | ||
files: [{ | ||
pattern: 'test/test-data/**/*', | ||
watched: false, | ||
served: true, | ||
included: false | ||
}] | ||
}, | ||
webpack: { | ||
node: { | ||
// needed by ipfs-repo-migrations | ||
path: true, | ||
|
||
// needed by dependencies of peer-id | ||
stream: true, | ||
/** @type {import('aegir').Options["build"]["config"]} */ | ||
const esbuild = { | ||
// this will inject all the named exports from 'node-globals.js' as globals | ||
inject: [require.resolve('./scripts/node-globals.js')], | ||
plugins: [ | ||
{ | ||
name: 'node built ins', // this will make the bundler resolve node builtins to the respective browser polyfill | ||
setup (build) { | ||
build.onResolve({ filter: /^stream$/ }, () => { | ||
return { path: require.resolve('readable-stream') } | ||
}) | ||
} | ||
} | ||
] | ||
} | ||
|
||
// needed by core-util-is | ||
Buffer: true | ||
/** @type {import('aegir').PartialOptions} */ | ||
module.exports = { | ||
test: { | ||
browser :{ | ||
config: { | ||
buildConfig: esbuild | ||
} | ||
} | ||
}, | ||
build: { | ||
bundlesize: { maxSize: '68kB' }, | ||
config: esbuild | ||
} | ||
} |
This file contains hidden or 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,78 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'release/**' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'release/**' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir lint | ||
- run: npx aegir build | ||
- run: npx aegir dep-check | ||
- uses: ipfs/aegir/actions/bundle-size@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
test-node: | ||
needs: check | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, ubuntu-latest, macos-latest] | ||
node: [14, 15] | ||
fail-fast: true | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: npm install | ||
- run: npx aegir test -t node --bail --cov | ||
- uses: codecov/codecov-action@v1 | ||
test-chrome: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: microsoft/playwright-github-action@v1 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail # add --cov later when its fixed | ||
- uses: codecov/codecov-action@v1 | ||
test-firefox: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: microsoft/playwright-github-action@v1 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail -- --browser firefox | ||
test-webkit: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: microsoft/playwright-github-action@v1 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail --timeout 10000 -- --browser webkit | ||
test-electron-main: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-main --bail | ||
test-electron-renderer: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx xvfb-maybe aegir test -t electron-renderer --bail |
This file contains hidden or 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/typescript-error-reporter-action@v1.0.8 |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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,4 @@ | ||
import { Buffer } from 'buffer' | ||
import process from "process/browser" | ||
|
||
export { Buffer, process } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.