@mastra/pg 0.10.2-alpha.4 → 0.10.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/pg@0.10.2-alpha.4 build /home/runner/work/mastra/mastra/stores/pg
2
+ > @mastra/pg@0.10.2 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 10446ms
9
+ TSC ⚡️ Build success in 10862ms
10
10
  DTS Build start
11
11
  CLI Target: es2022
12
+ CLI Cleaning output folder
13
+ ESM Build start
14
+ CJS Build start
12
15
  Analysis will use the bundled TypeScript version 5.8.3
13
16
  Writing package typings: /home/runner/work/mastra/mastra/stores/pg/dist/_tsup-dts-rollup.d.ts
14
17
  Analysis will use the bundled TypeScript version 5.8.3
15
18
  Writing package typings: /home/runner/work/mastra/mastra/stores/pg/dist/_tsup-dts-rollup.d.cts
16
- DTS ⚡️ Build success in 12010ms
17
- CLI Cleaning output folder
18
- ESM Build start
19
- CJS Build start
20
- ESM dist/index.js 67.23 KB
21
- ESM ⚡️ Build success in 1644ms
22
- CJS dist/index.cjs 67.79 KB
23
- CJS ⚡️ Build success in 1647ms
19
+ DTS ⚡️ Build success in 11679ms
20
+ ESM dist/index.js 67.19 KB
21
+ ESM ⚡️ Build success in 13260ms
22
+ CJS dist/index.cjs 67.75 KB
23
+ CJS ⚡️ Build success in 13261ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 0.10.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 3c77c0a: fix(pg): allow dotted attribute keys in `getTraces` by using `parseFieldKey` instead of `parseSqlIdentifier`
8
+ - Updated dependencies [13c97f9]
9
+ - @mastra/core@0.10.5
10
+
11
+ ## 0.10.2
12
+
13
+ ### Patch Changes
14
+
15
+ - e95cb69: dependencies updates:
16
+ - Updated dependency [`pg@^8.16.0` ↗︎](https://www.npmjs.com/package/pg/v/8.16.0) (from `^8.13.3`, in `dependencies`)
17
+ - Updated dependency [`pg-promise@^11.13.0` ↗︎](https://www.npmjs.com/package/pg-promise/v/11.13.0) (from `^11.11.0`, in `dependencies`)
18
+ - 0db1e1e: Fix PostgresStore paginated APIs
19
+ - dffb67b: updated stores to add alter table and change tests
20
+ - e0f9201: change how dedupe works for libsql and pg
21
+ - 48eddb9: update filter logic in Memory class to support semantic recall search scope
22
+ - 66f4424: Update peerdeps
23
+ - Updated dependencies [d1ed912]
24
+ - Updated dependencies [f6fd25f]
25
+ - Updated dependencies [dffb67b]
26
+ - Updated dependencies [f1f1f1b]
27
+ - Updated dependencies [925ab94]
28
+ - Updated dependencies [f9816ae]
29
+ - Updated dependencies [82090c1]
30
+ - Updated dependencies [1b443fd]
31
+ - Updated dependencies [ce97900]
32
+ - Updated dependencies [f1309d3]
33
+ - Updated dependencies [14a2566]
34
+ - Updated dependencies [f7f8293]
35
+ - Updated dependencies [48eddb9]
36
+ - @mastra/core@0.10.4
37
+
3
38
  ## 0.10.2-alpha.4
4
39
 
5
40
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1037,14 +1037,14 @@ var PostgresStore = class extends storage.MastraStorage {
1037
1037
  }
1038
1038
  if (attributes) {
1039
1039
  Object.entries(attributes).forEach(([key, value]) => {
1040
- const parsedKey = utils.parseSqlIdentifier(key, "attribute key");
1040
+ const parsedKey = utils.parseFieldKey(key);
1041
1041
  conditions.push(`attributes->>'${parsedKey}' = $${paramIndex++}`);
1042
1042
  queryParams.push(value);
1043
1043
  });
1044
1044
  }
1045
1045
  if (filters) {
1046
1046
  Object.entries(filters).forEach(([key, value]) => {
1047
- const parsedKey = utils.parseSqlIdentifier(key, "filter key");
1047
+ const parsedKey = utils.parseFieldKey(key);
1048
1048
  conditions.push(`"${parsedKey}" = $${paramIndex++}`);
1049
1049
  queryParams.push(value);
1050
1050
  });
package/dist/index.js CHANGED
@@ -1029,14 +1029,14 @@ var PostgresStore = class extends MastraStorage {
1029
1029
  }
1030
1030
  if (attributes) {
1031
1031
  Object.entries(attributes).forEach(([key, value]) => {
1032
- const parsedKey = parseSqlIdentifier(key, "attribute key");
1032
+ const parsedKey = parseFieldKey(key);
1033
1033
  conditions.push(`attributes->>'${parsedKey}' = $${paramIndex++}`);
1034
1034
  queryParams.push(value);
1035
1035
  });
1036
1036
  }
1037
1037
  if (filters) {
1038
1038
  Object.entries(filters).forEach(([key, value]) => {
1039
- const parsedKey = parseSqlIdentifier(key, "filter key");
1039
+ const parsedKey = parseFieldKey(key);
1040
1040
  conditions.push(`"${parsedKey}" = $${paramIndex++}`);
1041
1041
  queryParams.push(value);
1042
1042
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/pg",
3
- "version": "0.10.2-alpha.4",
3
+ "version": "0.10.3",
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.2",
35
35
  "vitest": "^3.2.2",
36
- "@internal/storage-test-utils": "0.0.6",
37
- "@internal/lint": "0.0.10",
38
- "@mastra/core": "0.10.4-alpha.3"
36
+ "@internal/lint": "0.0.12",
37
+ "@mastra/core": "0.10.5",
38
+ "@internal/storage-test-utils": "0.0.8"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@mastra/core": ">=0.10.4-0 <0.11.0"
@@ -408,6 +408,7 @@ describe('PostgresStore', () => {
408
408
  suspendedPaths: {},
409
409
  runId,
410
410
  timestamp: new Date().getTime(),
411
+ serializedStepGraph: [],
411
412
  } as unknown as WorkflowRunState;
412
413
 
413
414
  await store.persistWorkflowSnapshot({
@@ -446,6 +447,7 @@ describe('PostgresStore', () => {
446
447
  suspendedPaths: {},
447
448
  runId,
448
449
  timestamp: new Date().getTime(),
450
+ serializedStepGraph: [],
449
451
  };
450
452
 
451
453
  await store.persistWorkflowSnapshot({
@@ -524,6 +526,8 @@ describe('PostgresStore', () => {
524
526
  suspendedPaths: {},
525
527
  runId: runId,
526
528
  timestamp: Date.now(),
529
+ serializedStepGraph: [],
530
+ status: 'running',
527
531
  };
528
532
 
529
533
  await store.persistWorkflowSnapshot({
@@ -20,7 +20,7 @@ import type {
20
20
  WorkflowRuns,
21
21
  PaginationArgs,
22
22
  } from '@mastra/core/storage';
23
- import { parseSqlIdentifier } from '@mastra/core/utils';
23
+ import { parseSqlIdentifier, parseFieldKey } from '@mastra/core/utils';
24
24
  import type { WorkflowRunState } from '@mastra/core/workflows';
25
25
  import pgPromise from 'pg-promise';
26
26
  import type { ISSLConfig } from 'pg-promise/typescript/pg-subset';
@@ -220,14 +220,14 @@ export class PostgresStore extends MastraStorage {
220
220
  }
221
221
  if (attributes) {
222
222
  Object.entries(attributes).forEach(([key, value]) => {
223
- const parsedKey = parseSqlIdentifier(key, 'attribute key');
223
+ const parsedKey = parseFieldKey(key);
224
224
  conditions.push(`attributes->>'${parsedKey}' = $${paramIndex++}`);
225
225
  queryParams.push(value);
226
226
  });
227
227
  }
228
228
  if (filters) {
229
229
  Object.entries(filters).forEach(([key, value]) => {
230
- const parsedKey = parseSqlIdentifier(key, 'filter key');
230
+ const parsedKey = parseFieldKey(key);
231
231
  conditions.push(`"${parsedKey}" = $${paramIndex++}`); // Ensure filter keys are quoted if they are column names
232
232
  queryParams.push(value);
233
233
  });