-
Notifications
You must be signed in to change notification settings - Fork 27
fix: Export PersistentDataStoreWrapper. #144
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
@@ -86,8 +86,6 @@ function deserialize( | |||
* instance of {@link PersistentDataStore}. It provides optional caching behavior and other logic | |||
* that would otherwise be repeated in every data store implementation. This makes it easier to | |||
* create new database integrations by implementing only the database-specific logic. | |||
* | |||
* @internal |
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.
Needs to be used by persistent store packages.
@@ -22,12 +22,13 @@ export default class UpdateQueue { | |||
// count could hit 0, and overlapping execution chains could be started. | |||
this.queue.shift(); | |||
// There is more work to do, so schedule an update. | |||
if (this.enqueue.length > 0) { |
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 was a bug, enqueue
is a function. The function has 2 parameters, so its length is 2. Which caused the queue to always trigger a task update.
This caused multiple execution of tasks, as well as failing to dispatch other tasks.
import { deserializePoll } from './serialization'; | ||
|
||
export { AsyncStoreFacade, deserializePoll }; | ||
export { AsyncStoreFacade, PersistentDataStoreWrapper, deserializePoll }; |
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.
Exporting to be used in persistent store packages.
fix: Fix a bug in the UpdateQueue, used for persistence, which would prevent tasks from executing correctly.
fix: Update package.json to use --topological-dev when building workspaces. This will ensure packages which have devDependencies on each other, are built in correct order. Currently only "dependencies" affect build order. This will affect store packages because they use a peer+dev dependency on the SDK they are associated with.