Skip to content

Commit 2c2480d

Browse files
authored
fix: Export PersistentDataStoreWrapper. (#144)
1 parent 4992abe commit 2c2480d

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"private": true,
1818
"scripts": {
1919
"clean": "yarn workspaces foreach -pt run clean",
20-
"build": "yarn workspaces foreach -pt run build",
20+
"build": "yarn workspaces foreach -p --topological-dev run build",
2121
"//": "When using build:doc you need to specify the workspace. 'yarn run build:doc packages/shared/common' for example.",
2222
"build:doc": "./scripts/build-doc.sh $1",
2323
"lint": "npx eslint . --ext .ts",
Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import ItemDescriptor from './ItemDescriptor';
2-
import PersistentDataStore from './PersistentDataStore';
2+
import KeyedItem from './KeyedItem';
3+
import PersistentDataStore, { KindKeyedStore } from './PersistentDataStore';
4+
35
import PersistentStoreDataKind from './PersistentStoreDataKind';
46
import SerializedItemDescriptor from './SerializedItemDescriptor';
57

6-
export { ItemDescriptor, PersistentDataStore, PersistentStoreDataKind, SerializedItemDescriptor };
8+
export {
9+
ItemDescriptor,
10+
PersistentDataStore,
11+
PersistentStoreDataKind,
12+
SerializedItemDescriptor,
13+
KeyedItem,
14+
KindKeyedStore,
15+
};

packages/shared/sdk-server/src/options/Configuration.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,8 @@ export default class Configuration {
199199

200200
public readonly diagnosticRecordingInterval: number;
201201

202-
// public readonly featureStore: LDFeatureStore;
203-
204202
public readonly featureStoreFactory: (clientContext: LDClientContext) => LDFeatureStore;
205203

206-
// public readonly updateProcessor?: LDStreamProcessor;
207-
208204
public readonly updateProcessorFactory?: (
209205
clientContext: LDClientContext,
210206
dataSourceUpdates: LDDataSourceUpdates

packages/shared/sdk-server/src/store/PersistentDataStoreWrapper.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ function deserialize(
8686
* instance of {@link PersistentDataStore}. It provides optional caching behavior and other logic
8787
* that would otherwise be repeated in every data store implementation. This makes it easier to
8888
* create new database integrations by implementing only the database-specific logic.
89-
*
90-
* @internal
9189
*/
9290
export default class PersistentDataStoreWrapper implements LDFeatureStore {
9391
private isInitialized = false;

packages/shared/sdk-server/src/store/UpdateQueue.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ export default class UpdateQueue {
2222
// count could hit 0, and overlapping execution chains could be started.
2323
this.queue.shift();
2424
// There is more work to do, so schedule an update.
25-
if (this.enqueue.length > 0) {
25+
if (this.queue.length > 0) {
2626
setTimeout(() => this.executePendingUpdates(), 0);
2727
}
2828
// Call the original callback.
2929
cb?.();
3030
};
31+
3132
fn(newCb);
3233
}
3334
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import AsyncStoreFacade from './AsyncStoreFacade';
2+
import PersistentDataStoreWrapper from './PersistentDataStoreWrapper';
23
import { deserializePoll } from './serialization';
34

4-
export { AsyncStoreFacade, deserializePoll };
5+
export { AsyncStoreFacade, PersistentDataStoreWrapper, deserializePoll };

0 commit comments

Comments
 (0)