Skip to content

Commit

Permalink
Merge pull request #372 from sectore/feat/provide-flushsync-by-default
Browse files Browse the repository at this point in the history
Provide `FlushSyncDefaultLive` by default in Evolu
  • Loading branch information
steida authored Mar 29, 2024
2 parents 992f3c5 + 1e31713 commit ceb06c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions packages/evolu-common-web/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
Bip39,
EvoluCommonLive,
FlushSyncDefaultLive,
InvalidMnemonicError,
makeCreateEvolu,
Mnemonic,
Expand Down Expand Up @@ -56,6 +55,4 @@ export const parseMnemonic: (
*
* const evolu = createEvolu(Database);
*/
export const createEvolu = makeCreateEvolu(
EvoluWebLive.pipe(Layer.provide(FlushSyncDefaultLive)),
);
export const createEvolu = makeCreateEvolu(EvoluWebLive);
3 changes: 2 additions & 1 deletion packages/evolu-common/src/Evolu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { EvoluError, makeErrorStore } from "./ErrorStore.js";
import { SqliteBoolean, SqliteDate } from "./Model.js";
import { OnCompletes, OnCompletesLive } from "./OnCompletes.js";
import { Owner } from "./Owner.js";
import { AppState, FlushSync } from "./Platform.js";
import { AppState, FlushSync, FlushSyncDefaultLive } from "./Platform.js";
import {
Index,
SqliteQuery,
Expand Down Expand Up @@ -800,6 +800,7 @@ const EvoluCommon = Layer.effect(
}),
).pipe(
Layer.provide(Layer.mergeAll(LoadQueryLive, OnQueryLive, MutateLive)),
Layer.provide(FlushSyncDefaultLive),
Layer.provide(LoadingPromiseLive),
Layer.provide(SubscribedQueriesLive),
Layer.provide(Layer.merge(RowsStoreLive, OnCompletesLive)),
Expand Down
5 changes: 1 addition & 4 deletions packages/evolu-react-native/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
DbWorkerCommonLive,
EvoluCommonLive,
FetchLive,
FlushSyncDefaultLive,
InvalidMnemonicError,
Mnemonic,
NanoIdGeneratorLive,
Expand Down Expand Up @@ -64,9 +63,7 @@ export const parseMnemonic: (
*/
export const createEvolu = makeCreateEvolu(
EvoluCommonLive.pipe(
Layer.provide(
Layer.mergeAll(FlushSyncDefaultLive, AppStateLive, DbWorkerCommonLive),
),
Layer.provide(Layer.mergeAll(AppStateLive, DbWorkerCommonLive)),
Layer.provide(
Layer.mergeAll(
Bip39Live,
Expand Down

0 comments on commit ceb06c0

Please sign in to comment.