@mastra/pg 0.11.0-alpha.2 → 0.11.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/pg@0.11.0-alpha.2 build /home/runner/work/mastra/mastra/stores/pg
2
+ > @mastra/pg@0.11.0-alpha.3 build /home/runner/work/mastra/mastra/stores/pg
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 10857ms
9
+ TSC ⚡️ Build success in 10202ms
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/pg/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/pg/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 13576ms
16
+ DTS ⚡️ Build success in 11263ms
17
17
  CLI Cleaning output folder
18
18
  ESM Build start
19
19
  CJS Build start
20
- CJS dist/index.cjs 68.46 KB
21
- CJS ⚡️ Build success in 1747ms
22
- ESM dist/index.js 67.89 KB
23
- ESM ⚡️ Build success in 1749ms
20
+ ESM dist/index.js 67.91 KB
21
+ ESM ⚡️ Build success in 2081ms
22
+ CJS dist/index.cjs 68.48 KB
23
+ CJS ⚡️ Build success in 2081ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 704d1ca: Thread Timestamp Auto-Update Enhancement
8
+ Added automatic thread updatedAt timestamp updates when messages are saved across all storage providers
9
+ Enhanced user experience: Threads now accurately reflect their latest activity with automatic timestamp updates when new messages are added
10
+ Universal implementation: Consistent behavior across all 7 storage backends (ClickHouse, Cloudflare D1, DynamoDB, MongoDB, PostgreSQL, Upstash, LibSQL)
11
+ Performance optimized: Updates execute in parallel with message saving operations for minimal performance impact
12
+ Backwards compatible: No breaking changes - existing code continues to work unchanged
13
+ Improved conversation ordering: Chat interfaces can now properly sort threads by actual last activity
14
+ This enhancement resolves the issue where active conversations appeared stale due to outdated thread timestamps, providing better conversation management and user experience in chat applications.
15
+
16
+ ### Patch Changes
17
+
18
+ - 63f6b7d: dependencies updates:
19
+ - Updated dependency [`pg-promise@^11.14.0` ↗︎](https://www.npmjs.com/package/pg-promise/v/11.14.0) (from `^11.13.0`, in `dependencies`)
20
+ - eed55d7: quotes table and schema names for vector and storage to allow for camelcase
21
+ - 6c23252: [MASTRA-3982] Fix Memory Retrieval for PG when scope is resource
22
+ - Updated dependencies [63f6b7d]
23
+ - Updated dependencies [12a95fc]
24
+ - Updated dependencies [4b0f8a6]
25
+ - Updated dependencies [51264a5]
26
+ - Updated dependencies [8e6f677]
27
+ - Updated dependencies [d70c420]
28
+ - Updated dependencies [ee9af57]
29
+ - Updated dependencies [36f1c36]
30
+ - Updated dependencies [2a16996]
31
+ - Updated dependencies [10d352e]
32
+ - Updated dependencies [9589624]
33
+ - Updated dependencies [53d3c37]
34
+ - Updated dependencies [751c894]
35
+ - Updated dependencies [577ce3a]
36
+ - Updated dependencies [9260b3a]
37
+ - @mastra/core@0.10.6
38
+
39
+ ## 0.11.0-alpha.3
40
+
41
+ ### Patch Changes
42
+
43
+ - 6c23252: [MASTRA-3982] Fix Memory Retrieval for PG when scope is resource
44
+ - Updated dependencies [9589624]
45
+ - @mastra/core@0.10.6-alpha.4
46
+
3
47
  ## 0.11.0-alpha.2
4
48
 
5
49
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1488,7 +1488,7 @@ var PostgresStore = class extends storage.MastraStorage {
1488
1488
  (m.row_num >= target.row_num - $${paramIdx + 3} AND m.row_num < target.row_num)
1489
1489
  )
1490
1490
  )
1491
- )
1491
+ ) AS query_${paramIdx}
1492
1492
  `
1493
1493
  // Keep ASC for final sorting after fetching context
1494
1494
  );
package/dist/index.js CHANGED
@@ -1480,7 +1480,7 @@ var PostgresStore = class extends MastraStorage {
1480
1480
  (m.row_num >= target.row_num - $${paramIdx + 3} AND m.row_num < target.row_num)
1481
1481
  )
1482
1482
  )
1483
- )
1483
+ ) AS query_${paramIdx}
1484
1484
  `
1485
1485
  // Keep ASC for final sorting after fetching context
1486
1486
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/pg",
3
- "version": "0.11.0-alpha.2",
3
+ "version": "0.11.0",
4
4
  "description": "Postgres provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,9 +33,9 @@
33
33
  "tsup": "^8.5.0",
34
34
  "typescript": "^5.8.3",
35
35
  "vitest": "^3.2.3",
36
- "@internal/lint": "0.0.12",
37
- "@internal/storage-test-utils": "0.0.8",
38
- "@mastra/core": "0.10.6-alpha.3"
36
+ "@internal/lint": "0.0.13",
37
+ "@mastra/core": "0.10.6",
38
+ "@internal/storage-test-utils": "0.0.9"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@mastra/core": ">=0.10.4-0 <0.11.0"
@@ -758,7 +758,7 @@ export class PostgresStore extends MastraStorage {
758
758
  (m.row_num >= target.row_num - $${paramIdx + 3} AND m.row_num < target.row_num)
759
759
  )
760
760
  )
761
- )
761
+ ) AS query_${paramIdx}
762
762
  `, // Keep ASC for final sorting after fetching context
763
763
  );
764
764
  params.push(searchId, id, withPreviousMessages, withNextMessages);