-
-
Notifications
You must be signed in to change notification settings - Fork 611
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
Detect when lazy loading has been toggled in client.startClient #746
Merged
+214
−39
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
76175ab
allow storing client options in indexeddb
bwindels 28184b4
check if lazy loading was enabled before in startClient
bwindels 0519c4c
await startClient and use promises also so error gets shown
bwindels b0dbb20
fixup of in memory stores
bwindels 1fd8c43
fix tests
bwindels 19be3dd
fix lint
bwindels 2560ba2
dont clear the store if its a brand new one
bwindels 1d07911
all store methods should return a promise
bwindels 4e0af3e
don't return the IDBEvent from storeClientOptions
bwindels 6dd5c6c
fix existing missing this
bwindels 58e3c72
only store serializable options (string, boolean, number)
bwindels 54bff81
clear sync data on toggling LL,also throw spec. error and delegate clear
bwindels b7b9c67
fix lint
bwindels 78a5a88
fix jsdoc lint and better naming
bwindels 2d5eb92
pass lazy loading flag into error, to format message based on it
bwindels ba39b64
re-enable test
bwindels 5e76345
Merge branch 'develop' into bwindels/resynconlltoggle
bwindels 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 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
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,25 @@ | ||
// can't just do InvalidStoreError extends Error | ||
// because of http://babeljs.io/docs/usage/caveats/#classes | ||
function InvalidStoreError(reason, value) { | ||
const message = `Store is invalid because ${reason}, ` + | ||
`please delete all data and retry`; | ||
const instance = Reflect.construct(Error, [message]); | ||
Reflect.setPrototypeOf(instance, Reflect.getPrototypeOf(this)); | ||
instance.reason = reason; | ||
instance.value = value; | ||
return instance; | ||
} | ||
|
||
InvalidStoreError.TOGGLED_LAZY_LOADING = "TOGGLED_LAZY_LOADING"; | ||
|
||
InvalidStoreError.prototype = Object.create(Error.prototype, { | ||
constructor: { | ||
value: Error, | ||
enumerable: false, | ||
writable: true, | ||
configurable: true, | ||
}, | ||
}); | ||
Reflect.setPrototypeOf(InvalidStoreError, Error); | ||
|
||
module.exports.InvalidStoreError = InvalidStoreError; |
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
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.
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.
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.
what happened to this test?