@mastra/mongodb 1.9.2 → 1.9.5-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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @mastra/mongodb
2
2
 
3
+ ## 1.9.5-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Security remediation for the 2026-06-17 "easy-day-js" supply-chain incident. Patch bump to publish clean versions and move the `latest` dist-tag forward, superseding the compromised versions that declared the malicious `easy-day-js` dependency. ([#18056](https://github.com/mastra-ai/mastra/pull/18056))
8
+
9
+ - Updated dependencies [[`77a2351`](https://github.com/mastra-ai/mastra/commit/77a2351ee79296e360bce822cb3391f7cfd6489d)]:
10
+ - @mastra/core@1.43.1-alpha.0
11
+
12
+ ## 1.9.3
13
+
14
+ ### Patch Changes
15
+
16
+ - Fixed updateThread not refreshing a thread's updatedAt timestamp. Editing a thread's title or metadata now bumps updatedAt, so edited threads correctly resurface when listing threads sorted by most recently updated. ([#17934](https://github.com/mastra-ai/mastra/pull/17934))
17
+
18
+ - Fixed skill updates creating duplicate versions when a snapshot had not meaningfully changed. Comparison previously relied on `JSON.stringify`, so reordered object keys (common with PostgreSQL JSONB) or optional fields round-tripping between `undefined` and `null` looked like changes. Skill snapshots are now compared by value, so repeated no-op publish/update cycles no longer increment the version number. ([#16811](https://github.com/mastra-ai/mastra/pull/16811))
19
+
20
+ - Updated dependencies [[`de66bb0`](https://github.com/mastra-ai/mastra/commit/de66bb040570444c702ce4d8e1e228a5de2949cb), [`67bf8e2`](https://github.com/mastra-ai/mastra/commit/67bf8e206dfe583954d96015cf0d09f7ac50e45f), [`8216d05`](https://github.com/mastra-ai/mastra/commit/8216d0528d866eb9a07f5d4c87ea3bb1e1139b45), [`d18b23c`](https://github.com/mastra-ai/mastra/commit/d18b23c5e29dfc381e73e3c51fcf6c779afd1823), [`5eb94eb`](https://github.com/mastra-ai/mastra/commit/5eb94ebcf66d4e28c9e26d5821ac93379bab20a0), [`1fa3e12`](https://github.com/mastra-ai/mastra/commit/1fa3e123582b63cfe49de4ee52dc6a065e8d956a), [`f9ee2ac`](https://github.com/mastra-ai/mastra/commit/f9ee2ac661af584e61bc063ac208c9035cd752ef), [`c853d53`](https://github.com/mastra-ai/mastra/commit/c853d535d2df84ab89db1adb4c28900c54c9a2d2), [`d8df1f8`](https://github.com/mastra-ai/mastra/commit/d8df1f8e947e1966c9d4e54713df56d0d0d65226), [`9192ddb`](https://github.com/mastra-ai/mastra/commit/9192ddbced8949113b30de444cbe763f075b59f5), [`ae96523`](https://github.com/mastra-ai/mastra/commit/ae965231f562d9766b0c90c49a69fc68acaa031c), [`17d5a92`](https://github.com/mastra-ai/mastra/commit/17d5a9211aa293b4d4418de3de70dc0394d58101), [`5573693`](https://github.com/mastra-ai/mastra/commit/5573693b589822250e20dfe6cf66e9ff3bc96da8), [`ec4da8a`](https://github.com/mastra-ai/mastra/commit/ec4da8a09e0d2ab452c6ee2c786042ea826b77e5), [`adc44e1`](https://github.com/mastra-ai/mastra/commit/adc44e13c7e570b91e86b20ea7556e61d819db31), [`ed346c0`](https://github.com/mastra-ai/mastra/commit/ed346c0bee2d8496690a4e538bfba1e46894660f), [`c9ce1b2`](https://github.com/mastra-ai/mastra/commit/c9ce1b28d10871110648f9d7b6d76e880b9fa999), [`3ef01fd`](https://github.com/mastra-ai/mastra/commit/3ef01fd130b53d5bd4f828beb174e516a2eb1158), [`245a9a3`](https://github.com/mastra-ai/mastra/commit/245a9a315705fce17ddd980f78a92504b6615c4a), [`dc0b611`](https://github.com/mastra-ai/mastra/commit/dc0b6119b769bd00ee2c5df9259fb376fe63077a), [`38b5de8`](https://github.com/mastra-ai/mastra/commit/38b5de8e5d1d41a69522addf53d96f4b3a1d5bf0), [`dc0b611`](https://github.com/mastra-ai/mastra/commit/dc0b6119b769bd00ee2c5df9259fb376fe63077a), [`dd6a66e`](https://github.com/mastra-ai/mastra/commit/dd6a66ea0b32e0dea8059aec6b35d151e2c87dc4), [`d785c59`](https://github.com/mastra-ai/mastra/commit/d785c593b67fcb4cdc4fab9fdbde5f3b7665efc0), [`1fa3e12`](https://github.com/mastra-ai/mastra/commit/1fa3e123582b63cfe49de4ee52dc6a065e8d956a), [`8b984f4`](https://github.com/mastra-ai/mastra/commit/8b984f4361c202270ceb69257185c4756c9a7c56), [`bf08402`](https://github.com/mastra-ai/mastra/commit/bf084022374fa5d06ca70ed67a86dd64e379071b), [`81fe587`](https://github.com/mastra-ai/mastra/commit/81fe587275035715c1720ddf3fee0505cf053036), [`1fa3e12`](https://github.com/mastra-ai/mastra/commit/1fa3e123582b63cfe49de4ee52dc6a065e8d956a), [`403c438`](https://github.com/mastra-ai/mastra/commit/403c438e417278989ce247233d2c465b8d902cdd), [`f8ba195`](https://github.com/mastra-ai/mastra/commit/f8ba1954e27ee2b20586cc6cd9cf13c002c232f2)]:
21
+ - @mastra/core@1.43.0
22
+
3
23
  ## 1.9.2
4
24
 
5
25
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-mongodb
3
3
  description: Documentation for @mastra/mongodb. Use when working with @mastra/mongodb APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/mongodb"
6
- version: "1.9.2"
6
+ version: "1.9.5-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.2",
2
+ "version": "1.9.5-alpha.0",
3
3
  "package": "@mastra/mongodb",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -9,12 +9,13 @@ var filter = require('@mastra/core/vector/filter');
9
9
  var crypto$1 = require('crypto');
10
10
  var agent = require('@mastra/core/agent');
11
11
  var evals = require('@mastra/core/evals');
12
+ var skills = require('@mastra/core/storage/domains/skills');
12
13
 
13
14
  // src/vector/index.ts
14
15
 
15
16
  // package.json
16
17
  var package_default = {
17
- version: "1.9.2"};
18
+ version: "1.9.5-alpha.0"};
18
19
  var MongoDBFilterTranslator = class extends filter.BaseFilterTranslator {
19
20
  getSupportedOperators() {
20
21
  return {
@@ -5224,13 +5225,15 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
5224
5225
  text: `Thread ${id} not found`
5225
5226
  });
5226
5227
  }
5228
+ const now = /* @__PURE__ */ new Date();
5227
5229
  const updatedThread = {
5228
5230
  ...thread,
5229
5231
  title,
5230
5232
  metadata: {
5231
5233
  ...thread.metadata,
5232
5234
  ...metadata
5233
- }
5235
+ },
5236
+ updatedAt: now
5234
5237
  };
5235
5238
  try {
5236
5239
  const collection = await this.getCollection(storage.TABLE_THREADS);
@@ -5239,7 +5242,8 @@ var MemoryStorageMongoDB = class _MemoryStorageMongoDB extends storage.MemorySto
5239
5242
  {
5240
5243
  $set: {
5241
5244
  title,
5242
- metadata: updatedThread.metadata
5245
+ metadata: updatedThread.metadata,
5246
+ updatedAt: now
5243
5247
  }
5244
5248
  }
5245
5249
  );
@@ -9252,15 +9256,23 @@ var MongoDBSkillsStorage = class _MongoDBSkillsStorage extends storage.SkillsSto
9252
9256
  });
9253
9257
  }
9254
9258
  const existingSnapshot = this.extractSnapshotFields(latestVersion);
9255
- await this.createVersion({
9256
- id: crypto$1.randomUUID(),
9257
- skillId: id,
9258
- versionNumber: latestVersion.versionNumber + 1,
9259
- ...existingSnapshot,
9260
- ...configFields,
9261
- changedFields: Object.keys(configFields),
9262
- changeMessage: `Updated: ${Object.keys(configFields).join(", ")}`
9263
- });
9259
+ const changedFields = Object.keys(configFields).filter(
9260
+ (field) => !skills.skillSnapshotFieldValuesEqual(
9261
+ configFields[field],
9262
+ existingSnapshot[field]
9263
+ )
9264
+ );
9265
+ if (changedFields.length > 0) {
9266
+ await this.createVersion({
9267
+ id: crypto$1.randomUUID(),
9268
+ skillId: id,
9269
+ versionNumber: latestVersion.versionNumber + 1,
9270
+ ...existingSnapshot,
9271
+ ...configFields,
9272
+ changedFields,
9273
+ changeMessage: `Updated: ${changedFields.join(", ")}`
9274
+ });
9275
+ }
9264
9276
  }
9265
9277
  if (metadataFields.authorId !== void 0) updateDoc.authorId = metadataFields.authorId;
9266
9278
  if (metadataFields.visibility !== void 0) updateDoc.visibility = metadataFields.visibility;