-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(browser): Add IndexedDb offline transport store #6983
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
Conversation
Note: I changed the target to |
Just noticed that this offline wrapper is currently getting included in the default browser bundles and adds around 2-3KB. Options:
|
The CDN bundle? I think we're fine with that sacrifice. For npm they can just tree-shake it away. |
We went with a 4th option. Exclude |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM and good that we're excluding it from the bundles.
@@ -187,8 +187,12 @@ export function makeTSPlugin(jsVersion) { | |||
* from the browser and browser+tracing bundles. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Let's just update the JSDoc here that this factory function can be used to exclude basically any exported member from the bundles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As part of the offline integration deprecation, we also need to revamp all of our docs for this!
Closes #3046
This PR:
insert
/pop
wrappers for IndexedDbidb-keyval
as reference since it's well used and testedcreateIndexedDbStore
that creates anOfflineStore
implementationmakeIndexedDbOfflineTransport
) that supplements transport options withIndexedDbOptions
makeBrowserOfflineTransport
for use in creating browser offline transportfake-indexeddb
to test the code in node.jsHow it's used:
Browser support:
getAllKeys
TextEncoder
/TextDecoder
Since IE is not supported we could make the fetch transport the default so it does not need to be passed to
makeFetchTransport
?Tests