@mastra/pg 1.9.3 → 1.9.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 1.9.4-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed workflow snapshot sanitization in `@mastra/pg` for strings containing escaped surrogate patterns like `[^\ud800-\udfff]`. This prevents invalid JSON escape sequences that caused PostgreSQL `jsonb` writes to fail with error `22P02`. ([#15923](https://github.com/mastra-ai/mastra/pull/15923))
8
+
9
+ Fixes #15920
10
+
11
+ - Updated dependencies [[`e109607`](https://github.com/mastra-ai/mastra/commit/e10960749251e34d46b480a20648c490fd30381b)]:
12
+ - @mastra/core@1.31.0-alpha.1
13
+
3
14
  ## 1.9.3
4
15
 
5
16
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-pg
3
3
  description: Documentation for @mastra/pg. Use when working with @mastra/pg APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/pg"
6
- version: "1.9.3"
6
+ version: "1.9.4-alpha.0"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.9.3",
2
+ "version": "1.9.4-alpha.0",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -12930,7 +12930,7 @@ function getTableName6({ indexName, schemaName }) {
12930
12930
  return schemaName ? `${schemaName}.${quotedIndexName}` : quotedIndexName;
12931
12931
  }
12932
12932
  function sanitizeJsonForPg(jsonString) {
12933
- return jsonString.replace(/(^|[^\\])(\\(?!["\\/bfnrtu]))/g, "$1\\\\").replace(/\\u(0000|[Dd][89A-Fa-f][0-9A-Fa-f]{2})/g, "");
12933
+ return jsonString.replace(/\\\\?u(0000|[Dd][89A-Fa-f][0-9A-Fa-f]{2})/g, "").replace(/(^|[^\\])(\\(?!["\\/bfnrtu]))/g, "$1\\\\");
12934
12934
  }
12935
12935
  var WorkflowsPG = class _WorkflowsPG extends storage.WorkflowsStorage {
12936
12936
  #db;