@evolu/common 2.0.2 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@ value === undefined || (isInsert && value == null)
58
58
  row: id,
59
59
  column: key,
60
60
  value,
61
- })))), ReadonlyArray.flatten, ReadonlyArray.dedupeWith(NewMessageEquivalence));
61
+ })))), (a) => a.flat(), ReadonlyArray.dedupeWith(NewMessageEquivalence));
62
62
  const ensureSchemaByNewMessages = (messages) => Effect.gen(function* (_) {
63
63
  const tablesMap = new Map();
64
64
  messages.forEach((message) => {
package/dist/src/Evolu.js CHANGED
@@ -244,6 +244,6 @@ const EvoluCommon = Layer.effect(Evolu, Effect.gen(function* (_) {
244
244
  tables: schemaToTables(schema),
245
245
  }),
246
246
  });
247
- })).pipe(Layer.use(Layer.mergeAll(LoadQueryLive, OnQueryLive, MutateLive)), Layer.use(LoadingPromiseLive), Layer.use(SubscribedQueriesLive), Layer.use(Layer.merge(RowsStoreLive, OnCompletesLive)));
247
+ })).pipe(Layer.provide(Layer.mergeAll(LoadQueryLive, OnQueryLive, MutateLive)), Layer.provide(LoadingPromiseLive), Layer.provide(SubscribedQueriesLive), Layer.provide(Layer.merge(RowsStoreLive, OnCompletesLive)));
248
248
  /** EvoluCommonLive has only platform independent side-effects. */
249
- export const EvoluCommonLive = EvoluCommon.pipe(Layer.use(Layer.merge(TimeLive, NanoIdLive)));
249
+ export const EvoluCommonLive = EvoluCommon.pipe(Layer.provide(Layer.merge(TimeLive, NanoIdLive)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evolu/common",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "Local-first platform designed for privacy, ease of use, and no vendor lock-in to sync and backup people's lifetime data",
5
5
  "keywords": [
6
6
  "evolu",
@@ -52,21 +52,21 @@
52
52
  "nanoid": "^5.0.3"
53
53
  },
54
54
  "devDependencies": {
55
- "@effect/schema": "0.50.0",
55
+ "@effect/schema": "0.51.1",
56
56
  "@protobuf-ts/plugin": "^2.9.1",
57
57
  "@protobuf-ts/protoc": "^2.9.1",
58
58
  "array-shuffle": "^3.0.0",
59
59
  "better-sqlite3": "^9.1.1",
60
- "effect": "2.0.0-next.56",
60
+ "effect": "2.0.0-next.58",
61
61
  "eslint": "^8.54.0",
62
62
  "typescript": "^5.3.2",
63
63
  "vitest": "^0.34.6",
64
- "@evolu/tsconfig": "0.0.2",
65
- "eslint-config-evolu": "1.0.0"
64
+ "eslint-config-evolu": "1.0.0",
65
+ "@evolu/tsconfig": "0.0.2"
66
66
  },
67
67
  "peerDependencies": {
68
- "@effect/schema": "0.50.0",
69
- "effect": "2.0.0-next.56"
68
+ "@effect/schema": "0.51.1",
69
+ "effect": "2.0.0-next.58"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
package/src/DbWorker.ts CHANGED
@@ -267,7 +267,7 @@ export const mutationsToNewMessages = (
267
267
  ),
268
268
  ),
269
269
  ),
270
- ReadonlyArray.flatten,
270
+ (a) => a.flat(),
271
271
  ReadonlyArray.dedupeWith(NewMessageEquivalence),
272
272
  );
273
273
 
package/src/Evolu.ts CHANGED
@@ -755,13 +755,13 @@ const EvoluCommon = Layer.effect(
755
755
  });
756
756
  }),
757
757
  ).pipe(
758
- Layer.use(Layer.mergeAll(LoadQueryLive, OnQueryLive, MutateLive)),
759
- Layer.use(LoadingPromiseLive),
760
- Layer.use(SubscribedQueriesLive),
761
- Layer.use(Layer.merge(RowsStoreLive, OnCompletesLive)),
758
+ Layer.provide(Layer.mergeAll(LoadQueryLive, OnQueryLive, MutateLive)),
759
+ Layer.provide(LoadingPromiseLive),
760
+ Layer.provide(SubscribedQueriesLive),
761
+ Layer.provide(Layer.merge(RowsStoreLive, OnCompletesLive)),
762
762
  );
763
763
 
764
764
  /** EvoluCommonLive has only platform independent side-effects. */
765
765
  export const EvoluCommonLive = EvoluCommon.pipe(
766
- Layer.use(Layer.merge(TimeLive, NanoIdLive)),
766
+ Layer.provide(Layer.merge(TimeLive, NanoIdLive)),
767
767
  );