-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: client.get: (cid) => Responsish (#4)
- Have client.get return an object with `files` and `filesIterator` methods on it. - Add rollup config to make a single file esm bundle - Add bundlesize so we can see the impact of adding CAR support - Build and test the client in CI. License: (Apache-2.0 AND MIT) Signed-off-by: Oli Evans <oli@tableflip.io>
- Loading branch information
Showing
15 changed files
with
659 additions
and
2,394 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,20 @@ | ||
name: Client | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
- uses: bahmutov/npm-install@v1 | ||
- run: npm run build --workspace packages/client | ||
- run: npm test --workspace packages/client |
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
Large diffs are not rendered by default.
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
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,22 @@ | ||
// @ts-ignore | ||
import { terser } from 'rollup-plugin-terser' | ||
import commonjs from '@rollup/plugin-commonjs' | ||
import resolve from '@rollup/plugin-node-resolve' | ||
|
||
export default { | ||
input: 'src/lib.js', | ||
output: [ | ||
{ | ||
file: 'dist/bundle.esm.min.js', | ||
format: 'esm', | ||
plugins: [terser()], | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
commonjs(), | ||
resolve({ | ||
browser: true, | ||
}), | ||
], | ||
} |
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 |
---|---|---|
@@ -1,10 +1,4 @@ | ||
import fetch, { Request, Response, Headers } from '@web-std/fetch' | ||
import { Blob } from '@web-std/blob' | ||
|
||
export { | ||
fetch, | ||
Request, | ||
Response, | ||
Headers, | ||
Blob | ||
} | ||
export { fetch, Request, Response, Headers, Blob } |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export const fetch = globalThis.fetch | ||
export const Request = globalThis.Request | ||
export const Response = globalThis.Response | ||
export const Blob = globalThis.Blob | ||
export const File = globalThis.File |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.