@mastra/libsql 0.10.2-alpha.2 → 0.10.2-alpha.3

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.
@@ -1,23 +1,23 @@
1
1
 
2
- > @mastra/libsql@0.10.2-alpha.2 build /home/runner/work/mastra/mastra/stores/libsql
2
+ > @mastra/libsql@0.10.2-alpha.3 build /home/runner/work/mastra/mastra/stores/libsql
3
3
  > tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
7
  CLI tsup v8.5.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 9592ms
9
+ TSC ⚡️ Build success in 9552ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
12
  Analysis will use the bundled TypeScript version 5.8.3
13
13
  Writing package typings: /home/runner/work/mastra/mastra/stores/libsql/dist/_tsup-dts-rollup.d.ts
14
14
  Analysis will use the bundled TypeScript version 5.8.3
15
15
  Writing package typings: /home/runner/work/mastra/mastra/stores/libsql/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 10548ms
16
+ DTS ⚡️ Build success in 11177ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- ESM dist/index.js 58.54 KB
21
- ESM ⚡️ Build success in 1646ms
22
- CJS dist/index.cjs 58.83 KB
23
- CJS ⚡️ Build success in 1647ms
20
+ ESM dist/index.js 58.55 KB
21
+ ESM ⚡️ Build success in 1246ms
22
+ CJS dist/index.cjs 58.84 KB
23
+ CJS ⚡️ Build success in 1247ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @mastra/libsql
2
2
 
3
+ ## 0.10.2-alpha.3
4
+
5
+ ### Patch Changes
6
+
7
+ - e0f9201: change how dedupe works for libsql and pg
8
+ - Updated dependencies [925ab94]
9
+ - @mastra/core@0.10.4-alpha.3
10
+
3
11
  ## 0.10.2-alpha.2
4
12
 
5
13
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1192,15 +1192,12 @@ var LibSQLStore = class extends storage.MastraStorage {
1192
1192
  const finalQuery = unionQueries.join(" UNION ALL ") + ' ORDER BY "createdAt" ASC';
1193
1193
  const includedResult = await this.client.execute({ sql: finalQuery, args: params });
1194
1194
  const includedRows = includedResult.rows?.map((row) => this.parseRow(row));
1195
- const dedupedRows = Object.values(
1196
- includedRows.reduce(
1197
- (acc, row) => {
1198
- acc[row.id] = row;
1199
- return acc;
1200
- },
1201
- {}
1202
- )
1203
- );
1195
+ const seen = /* @__PURE__ */ new Set();
1196
+ const dedupedRows = includedRows.filter((row) => {
1197
+ if (seen.has(row.id)) return false;
1198
+ seen.add(row.id);
1199
+ return true;
1200
+ });
1204
1201
  return dedupedRows;
1205
1202
  }
1206
1203
  async getMessages({
package/dist/index.js CHANGED
@@ -1190,15 +1190,12 @@ var LibSQLStore = class extends MastraStorage {
1190
1190
  const finalQuery = unionQueries.join(" UNION ALL ") + ' ORDER BY "createdAt" ASC';
1191
1191
  const includedResult = await this.client.execute({ sql: finalQuery, args: params });
1192
1192
  const includedRows = includedResult.rows?.map((row) => this.parseRow(row));
1193
- const dedupedRows = Object.values(
1194
- includedRows.reduce(
1195
- (acc, row) => {
1196
- acc[row.id] = row;
1197
- return acc;
1198
- },
1199
- {}
1200
- )
1201
- );
1193
+ const seen = /* @__PURE__ */ new Set();
1194
+ const dedupedRows = includedRows.filter((row) => {
1195
+ if (seen.has(row.id)) return false;
1196
+ seen.add(row.id);
1197
+ return true;
1198
+ });
1202
1199
  return dedupedRows;
1203
1200
  }
1204
1201
  async getMessages({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/libsql",
3
- "version": "0.10.2-alpha.2",
3
+ "version": "0.10.2-alpha.3",
4
4
  "description": "Libsql provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "typescript": "^5.8.3",
31
31
  "vitest": "^3.2.2",
32
32
  "@internal/lint": "0.0.10",
33
- "@mastra/core": "0.10.4-alpha.2",
34
- "@internal/storage-test-utils": "0.0.6"
33
+ "@internal/storage-test-utils": "0.0.6",
34
+ "@mastra/core": "0.10.4-alpha.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@mastra/core": "^0.10.2-alpha.0"
@@ -554,15 +554,12 @@ export class LibSQLStore extends MastraStorage {
554
554
  const finalQuery = unionQueries.join(' UNION ALL ') + ' ORDER BY "createdAt" ASC';
555
555
  const includedResult = await this.client.execute({ sql: finalQuery, args: params });
556
556
  const includedRows = includedResult.rows?.map(row => this.parseRow(row));
557
- const dedupedRows = Object.values(
558
- includedRows.reduce(
559
- (acc, row) => {
560
- acc[row.id] = row;
561
- return acc;
562
- },
563
- {} as Record<string, MastraMessageV2>,
564
- ),
565
- );
557
+ const seen = new Set<string>();
558
+ const dedupedRows = includedRows.filter(row => {
559
+ if (seen.has(row.id)) return false;
560
+ seen.add(row.id);
561
+ return true;
562
+ });
566
563
  return dedupedRows;
567
564
  }
568
565