@mastra/mongodb 0.0.3 → 0.0.4-alpha.0

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/mongodb@0.0.3-alpha.6 build /home/runner/work/mastra/mastra/stores/mongodb
2
+ > @mastra/mongodb@0.0.4-alpha.0 build /home/runner/work/mastra/mastra/stores/mongodb
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 7785ms
9
+ TSC ⚡️ Build success in 7045ms
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/mongodb/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/mongodb/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 10122ms
16
+ DTS ⚡️ Build success in 9268ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
20
  ESM dist/index.js 16.22 KB
21
- ESM ⚡️ Build success in 788ms
21
+ ESM ⚡️ Build success in 520ms
22
22
  CJS dist/index.cjs 16.28 KB
23
- CJS ⚡️ Build success in 792ms
23
+ CJS ⚡️ Build success in 663ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @mastra/mongodb
2
2
 
3
+ ## 0.0.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [526c570]
8
+ - Updated dependencies [b5d2de0]
9
+ - Updated dependencies [644f8ad]
10
+ - @mastra/core@0.9.3-alpha.0
11
+
3
12
  ## 0.0.3
4
13
 
5
14
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/mongodb",
3
- "version": "0.0.3",
3
+ "version": "0.0.4-alpha.0",
4
4
  "description": "MongoDB provider for Mastra - includes vector store capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "cloudflare": "^4.1.0",
24
24
  "mongodb": "^6.15.0",
25
25
  "uuid": "^11.1.0",
26
- "@mastra/core": "^0.9.2"
26
+ "@mastra/core": "^0.9.3-alpha.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@microsoft/api-extractor": "^7.52.5",
@@ -44,7 +44,7 @@ describe('MongoDBFilterTranslator', () => {
44
44
  const filter = {
45
45
  active: true,
46
46
  deleted: false,
47
- status: { $eq: true }
47
+ status: { $eq: true },
48
48
  };
49
49
  expect(translator.translate(filter)).toEqual(filter);
50
50
  });
@@ -57,7 +57,7 @@ describe('MongoDBFilterTranslator', () => {
57
57
  tags: { $all: ['tag1', 'tag2'] },
58
58
  categories: { $in: ['A', 'B'] },
59
59
  items: { $nin: ['item1', 'item2'] },
60
- scores: { $elemMatch: { $gt: 90 } }
60
+ scores: { $elemMatch: { $gt: 90 } },
61
61
  };
62
62
  expect(translator.translate(filter)).toEqual(filter);
63
63
  });
@@ -79,7 +79,7 @@ describe('MongoDBFilterTranslator', () => {
79
79
 
80
80
  it('handles $size operator', () => {
81
81
  const filter = {
82
- tags: { $size: 3 }
82
+ tags: { $size: 3 },
83
83
  };
84
84
  expect(translator.translate(filter)).toEqual(filter);
85
85
  });
@@ -97,14 +97,14 @@ describe('MongoDBFilterTranslator', () => {
97
97
  it('handles $not operator', () => {
98
98
  const filter = {
99
99
  field: { $not: { $eq: 'value' } },
100
- $not: { field: 'value' }
100
+ $not: { field: 'value' },
101
101
  };
102
102
  expect(translator.translate(filter)).toEqual(filter);
103
103
  });
104
104
 
105
105
  it('handles $nor operator', () => {
106
106
  const filter = {
107
- $nor: [{ status: 'deleted' }, { active: false }]
107
+ $nor: [{ status: 'deleted' }, { active: false }],
108
108
  };
109
109
  expect(translator.translate(filter)).toEqual(filter);
110
110
  });
@@ -322,14 +322,14 @@ describe('MongoDBFilterTranslator', () => {
322
322
  describe('regex support', () => {
323
323
  it('handles $regex operator', () => {
324
324
  const filter = {
325
- name: { $regex: '^test' }
325
+ name: { $regex: '^test' },
326
326
  };
327
327
  expect(translator.translate(filter)).toEqual(filter);
328
328
  });
329
329
 
330
330
  it('handles RegExp objects', () => {
331
331
  const filter = {
332
- name: /^test/i
332
+ name: /^test/i,
333
333
  };
334
334
  // RegExp objects should be preserved
335
335
  expect(translator.translate(filter)).toEqual(filter);
@@ -387,12 +387,7 @@ describe('MongoDBFilterTranslator', () => {
387
387
  });
388
388
 
389
389
  it('throws error for non-logical operators at top level', () => {
390
- const invalidFilters = [
391
- { $gt: 100 },
392
- { $in: ['value1', 'value2'] },
393
- { $exists: true },
394
- { $regex: 'pattern' }
395
- ];
390
+ const invalidFilters = [{ $gt: 100 }, { $in: ['value1', 'value2'] }, { $exists: true }, { $regex: 'pattern' }];
396
391
 
397
392
  invalidFilters.forEach(filter => {
398
393
  expect(() => translator.translate(filter)).toThrow(/Invalid top-level operator/);