-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add types, gh actions and remove unused methods (#89)
- add http, fetch types - remove globalThis, this is supported everywhere now - add types for env, path, supports and temp-dir - use web-encoding for encoder/decoder - add types for files functions - remove some files functions that are in ipfs-core-utils BREAKING CHANGE: removed globalThis and normalise-input, format-mode and format-mtime
- Loading branch information
1 parent
382f79b
commit 707174c
Showing
38 changed files
with
703 additions
and
949 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,67 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir lint | ||
- uses: gozala/[email protected] | ||
- run: npx aegir build | ||
- run: npx aegir dep-check | ||
- 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: npm install | ||
- run: npx nyc --reporter=lcov aegir test -t node -- --bail | ||
- uses: codecov/codecov-action@v1 | ||
test-chrome: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail | ||
test-firefox: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: npm install | ||
- run: npx aegir test -t browser -t webworker --bail -- --browsers FirefoxHeadless | ||
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -13,15 +13,22 @@ | |
], | ||
"browser": { | ||
"./src/http/fetch.js": "./src/http/fetch.browser.js", | ||
"./src/text-encoder.js": "./src/text-encoder.browser.js", | ||
"./src/text-decoder.js": "./src/text-decoder.browser.js", | ||
"./src/temp-dir.js": "./src/temp-dir.browser.js", | ||
"./src/path-join.js": "./src/path-join.browser.js", | ||
"./test/files/glob-source.spec.js": false, | ||
"electron-fetch": false | ||
}, | ||
"types": "dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"src/*": [ | ||
"dist/src/*" | ||
] | ||
} | ||
}, | ||
"repository": "github:ipfs/js-ipfs-utils", | ||
"scripts": { | ||
"prepare": "aegir build --no-bundle", | ||
"test": "aegir test", | ||
"test:browser": "aegir test -t browser", | ||
"test:node": "aegir test -t node", | ||
|
@@ -35,30 +42,39 @@ | |
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"electron-fetch": "^1.7.2", | ||
"abort-controller": "^3.0.0", | ||
"any-signal": "^2.1.0", | ||
"buffer": "^6.0.1", | ||
"err-code": "^2.0.0", | ||
"electron-fetch": "^1.7.2", | ||
"err-code": "^2.0.3", | ||
"fs-extra": "^9.0.1", | ||
"is-electron": "^2.2.0", | ||
"iso-url": "^1.0.0", | ||
"it-glob": "0.0.10", | ||
"merge-options": "^2.0.0", | ||
"nanoid": "^3.1.3", | ||
"it-to-stream": "^0.1.2", | ||
"merge-options": "^3.0.4", | ||
"nanoid": "^3.1.20", | ||
"native-abort-controller": "0.0.3", | ||
"native-fetch": "^2.0.0", | ||
"node-fetch": "^2.6.0", | ||
"stream-to-it": "^0.2.0", | ||
"it-to-stream": "^0.1.2" | ||
"native-fetch": "2.0.1", | ||
"node-fetch": "^2.6.1", | ||
"stream-to-it": "^0.2.2", | ||
"web-encoding": "^1.0.6" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^28.1.0", | ||
"delay": "^4.3.0", | ||
"it-all": "^1.0.2", | ||
"it-drain": "^1.0.1", | ||
"it-last": "^1.0.2", | ||
"uint8arrays": "^1.1.0" | ||
"@types/err-code": "^2.0.0", | ||
"@types/fs-extra": "^9.0.5", | ||
"aegir": "^30.3.0", | ||
"delay": "^4.4.0", | ||
"it-all": "^1.0.4", | ||
"it-drain": "^1.0.3", | ||
"it-last": "^1.0.4", | ||
"uint8arrays": "^2.0.5" | ||
}, | ||
"eslintConfig": { | ||
"extends": "ipfs", | ||
"env": { | ||
"worker": true | ||
} | ||
}, | ||
"contributors": [ | ||
"Hugo Dias <[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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.