Skip to content
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

Build exports #20

Merged
merged 4 commits into from
Oct 12, 2023
Merged

Build exports #20

merged 4 commits into from
Oct 12, 2023

Conversation

guanzo
Copy link
Collaborator

@guanzo guanzo commented Oct 12, 2023

This makes it easier for web clients like arc to import stuff besides the client.

node example

import { Saturn, indexedDbStorage } from '@filecoin-saturn/js-client'

web example:

const { Saturn, indexedDbStorage } = window.SaturnModule
const client = new Saturn({
    storage: indexedDbStorage(),
})

@guanzo guanzo merged commit 6f92bbf into main Oct 12, 2023
1 check passed
@guanzo guanzo deleted the build-exports branch October 12, 2023 19:03
AmeanAsad added a commit that referenced this pull request Oct 16, 2023
* Abort on error (#19)

* feat: use controller from options if exists. abort fetch if error occurs.

* test: check if external abort controller is used

* build: move build output to dist/ folder

* fix: newline

* 0.1.1

* Build exports (#20)

* chore: rename file

* feat: add new entrypoint with exports.

Switch Saturn to named export

* build: expose entire module instead of just the default export

* docs: update README

* 0.2.0

* feat: include worker scopes when checking for browser runtime (#21)

* 0.3.0

---------

Co-authored-by: Eric Guan <guanzo91@gmail.com>
AmeanAsad added a commit that referenced this pull request Oct 24, 2023
* feat: implement a nodes list for clients

* feat: implement a storage interface using indexedDb

* feat: implement a test suite for fallback

* fix: remove unused code

* fix: eslint an jsdoc

* fix: formatting and consistency

* fix: indexDbCheck

* chore: change storage implementation

* enhancement: simplify node loading

* naive fallback implementation

* modify fallback

* fix formatting and typos

* typos

* Update .eslintrc

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>

* enhancement: edit storage impl

* enhancement: deal with overlapping byte chunks

* feat: add fallback test suite

* fix: tests running

* cleanup content fetch with fallback

* add initial origin fetch to fallback

* formatting and file re-org

* feat: merge main into fallback branch (#22)

* Abort on error (#19)

* feat: use controller from options if exists. abort fetch if error occurs.

* test: check if external abort controller is used

* build: move build output to dist/ folder

* fix: newline

* 0.1.1

* Build exports (#20)

* chore: rename file

* feat: add new entrypoint with exports.

Switch Saturn to named export

* build: expose entire module instead of just the default export

* docs: update README

* 0.2.0

* feat: include worker scopes when checking for browser runtime (#21)

* 0.3.0

---------

Co-authored-by: Eric Guan <guanzo91@gmail.com>

* load nodes on first success

* add fallback limit

* fix: fallback bug

* put eslint settings in package.json

* add nodesListKey as static

* fix: resolve process in browser

---------

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>
Co-authored-by: Eric Guan <guanzo91@gmail.com>
AmeanAsad added a commit that referenced this pull request Oct 26, 2023
* feat: implement a nodes list for clients

* feat: implement a storage interface using indexedDb

* feat: implement a test suite for fallback

* fix: remove unused code

* fix: eslint an jsdoc

* fix: formatting and consistency

* fix: indexDbCheck

* chore: change storage implementation

* enhancement: simplify node loading

* naive fallback implementation

* modify fallback

* fix formatting and typos

* typos

* Update .eslintrc

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>

* enhancement: edit storage impl

* enhancement: deal with overlapping byte chunks

* feat: add fallback test suite

* fix: tests running

* cleanup content fetch with fallback

* add initial origin fetch to fallback

* formatting and file re-org

* feat: merge main into fallback branch (#22)

* Abort on error (#19)

* feat: use controller from options if exists. abort fetch if error occurs.

* test: check if external abort controller is used

* build: move build output to dist/ folder

* fix: newline

* 0.1.1

* Build exports (#20)

* chore: rename file

* feat: add new entrypoint with exports.

Switch Saturn to named export

* build: expose entire module instead of just the default export

* docs: update README

* 0.2.0

* feat: include worker scopes when checking for browser runtime (#21)

* 0.3.0

---------

Co-authored-by: Eric Guan <guanzo91@gmail.com>

* load nodes on first success

* add fallback limit

* fix: fallback bug

* put eslint settings in package.json

* add nodesListKey as static

* fix: resolve process in browser

* feat: add fetching with a race

* enhancement: add backward compatibility for racing

* tests and cleanup

* fixes and enhancements

* add typings

* add typings

---------

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>
Co-authored-by: Eric Guan <guanzo91@gmail.com>
AmeanAsad added a commit that referenced this pull request Dec 19, 2023
* feat: implement a nodes list for clients

* feat: implement a storage interface using indexedDb

* feat: implement a test suite for fallback

* fix: remove unused code

* fix: eslint an jsdoc

* fix: formatting and consistency

* fix: indexDbCheck

* chore: change storage implementation

* enhancement: simplify node loading

* naive fallback implementation

* modify fallback

* fix formatting and typos

* typos

* Update .eslintrc

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>

* enhancement: edit storage impl

* enhancement: deal with overlapping byte chunks

* feat: add fallback test suite

* fix: tests running

* cleanup content fetch with fallback

* add initial origin fetch to fallback

* formatting and file re-org

* feat: merge main into fallback branch (#22)

* Abort on error (#19)

* feat: use controller from options if exists. abort fetch if error occurs.

* test: check if external abort controller is used

* build: move build output to dist/ folder

* fix: newline

* 0.1.1

* Build exports (#20)

* chore: rename file

* feat: add new entrypoint with exports.

Switch Saturn to named export

* build: expose entire module instead of just the default export

* docs: update README

* 0.2.0

* feat: include worker scopes when checking for browser runtime (#21)

* 0.3.0

---------

Co-authored-by: Eric Guan <guanzo91@gmail.com>

* load nodes on first success

* add fallback limit

* fix: fallback bug

* put eslint settings in package.json

* add nodesListKey as static

* fix: resolve process in browser

* feat: add fetching with a race

* enhancement: add backward compatibility for racing

* tests and cleanup

* feat: basic hashring implementation

* fixes and enhancements

* add typings

* feat: add hashring functionality to the client

* add typings

* fix hashring usage

* add tests for hashring

---------

Co-authored-by: Diego Rodríguez Baquero <diego@protocol.ai>
Co-authored-by: Eric Guan <guanzo91@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants