@mastra/libsql 0.0.3-alpha.0 → 0.0.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.0.3-alpha.0 build /home/runner/work/mastra/mastra/stores/libsql
2
+ > @mastra/libsql@0.0.3-alpha.1 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.4.0
8
8
  TSC Build start
9
- TSC ⚡️ Build success in 7110ms
9
+ TSC ⚡️ Build success in 11231ms
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 7493ms
16
+ DTS ⚡️ Build success in 13246ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
20
  ESM dist/index.js 41.56 KB
21
- ESM ⚡️ Build success in 627ms
21
+ ESM ⚡️ Build success in 1100ms
22
22
  CJS dist/index.cjs 41.69 KB
23
- CJS ⚡️ Build success in 628ms
23
+ CJS ⚡️ Build success in 1103ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @mastra/libsql
2
2
 
3
+ ## 0.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e450778]
8
+ - Updated dependencies [8902157]
9
+ - Updated dependencies [ca0dc88]
10
+ - Updated dependencies [526c570]
11
+ - Updated dependencies [d7a6a33]
12
+ - Updated dependencies [9cd1a46]
13
+ - Updated dependencies [b5d2de0]
14
+ - Updated dependencies [644f8ad]
15
+ - Updated dependencies [70dbf51]
16
+ - @mastra/core@0.9.3
17
+
18
+ ## 0.0.3-alpha.1
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [e450778]
23
+ - Updated dependencies [8902157]
24
+ - Updated dependencies [ca0dc88]
25
+ - Updated dependencies [9cd1a46]
26
+ - Updated dependencies [70dbf51]
27
+ - @mastra/core@0.9.3-alpha.1
28
+
3
29
  ## 0.0.3-alpha.0
4
30
 
5
31
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/libsql",
3
- "version": "0.0.3-alpha.0",
3
+ "version": "0.0.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",
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@libsql/client": "^0.15.4",
24
- "@mastra/core": "^0.9.3-alpha.0"
24
+ "@mastra/core": "^0.9.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@microsoft/api-extractor": "^7.52.5",
@@ -30,7 +30,7 @@
30
30
  "tsup": "^8.4.0",
31
31
  "typescript": "^5.8.3",
32
32
  "vitest": "^3.1.2",
33
- "@internal/lint": "0.0.3",
33
+ "@internal/lint": "0.0.4",
34
34
  "@internal/storage-test-utils": "0.0.2-alpha.5"
35
35
  },
36
36
  "scripts": {
@@ -1602,6 +1602,49 @@ describe('LibSQLVector', () => {
1602
1602
  // });
1603
1603
  });
1604
1604
 
1605
+ describe('Error Handling', () => {
1606
+ const testIndexName = 'test_index_error';
1607
+ beforeAll(async () => {
1608
+ await vectorDB.createIndex({ indexName: testIndexName, dimension: 3 });
1609
+ });
1610
+
1611
+ afterAll(async () => {
1612
+ await vectorDB.deleteIndex(testIndexName);
1613
+ });
1614
+ it('should handle non-existent index queries', async () => {
1615
+ await expect(vectorDB.query({ indexName: 'non-existent-index', queryVector: [1, 2, 3] })).rejects.toThrow();
1616
+ });
1617
+
1618
+ it('should handle invalid dimension vectors', async () => {
1619
+ const invalidVector = [1, 2, 3, 4]; // 4D vector for 3D index
1620
+ await expect(vectorDB.upsert({ indexName: testIndexName, vectors: [invalidVector] })).rejects.toThrow();
1621
+ });
1622
+
1623
+ it('should handle duplicate index creation gracefully', async () => {
1624
+ const duplicateIndexName = `duplicate_test`;
1625
+ const dimension = 768;
1626
+
1627
+ // Create index first time
1628
+ await vectorDB.createIndex({
1629
+ indexName: duplicateIndexName,
1630
+ dimension,
1631
+ metric: 'cosine',
1632
+ });
1633
+
1634
+ // Try to create with same dimensions - should not throw
1635
+ await expect(
1636
+ vectorDB.createIndex({
1637
+ indexName: duplicateIndexName,
1638
+ dimension,
1639
+ metric: 'cosine',
1640
+ }),
1641
+ ).resolves.not.toThrow();
1642
+
1643
+ // Cleanup
1644
+ await vectorDB.deleteIndex(duplicateIndexName);
1645
+ });
1646
+ });
1647
+
1605
1648
  describe('Deprecation Warnings', () => {
1606
1649
  const indexName = 'testdeprecationwarnings';
1607
1650