@mastra/pg 1.22.1 → 1.22.2

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,23 @@
1
1
  # @mastra/pg
2
2
 
3
+ ## 1.22.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed the store package failing to load when installed with `@mastra/core` older than 1.63.1, and corrected the minimum supported core version. ([#22548](https://github.com/mastra-ai/mastra/pull/22548))
8
+
9
+ - Updated dependencies [[`0a9d29c`](https://github.com/mastra-ai/mastra/commit/0a9d29c0c4dbbaa6afc1c8146cdd41759cbd4002)]:
10
+ - @mastra/core@1.63.2
11
+
12
+ ## 1.22.2-alpha.0
13
+
14
+ ### Patch Changes
15
+
16
+ - Fixed the store package failing to load when installed with `@mastra/core` older than 1.63.1, and corrected the minimum supported core version. ([#22548](https://github.com/mastra-ai/mastra/pull/22548))
17
+
18
+ - Updated dependencies [[`0a9d29c`](https://github.com/mastra-ai/mastra/commit/0a9d29c0c4dbbaa6afc1c8146cdd41759cbd4002)]:
19
+ - @mastra/core@1.63.2-alpha.0
20
+
3
21
  ## 1.22.1
4
22
 
5
23
  ### 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.22.1"
6
+ version: "1.22.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.22.1",
2
+ "version": "1.22.2",
3
3
  "package": "@mastra/pg",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -7839,6 +7839,18 @@ var FavoritesPG = class FavoritesPG extends _mastra_core_storage.FavoritesStorag
7839
7839
  };
7840
7840
  //#endregion
7841
7841
  //#region src/storage/domains/knowledge/index.ts
7842
+ let assertDescriptionWithinBound;
7843
+ async function assertKnowledgeDescriptionWithinBoundCompat(description) {
7844
+ let assertWithinBound = assertDescriptionWithinBound;
7845
+ if (!assertWithinBound) {
7846
+ const resolvedAssert = (await import("@mastra/core/storage")).assertKnowledgeDescriptionWithinBound ?? ((value) => {
7847
+ if (value !== void 0 && value.length > 400) throw new Error("Knowledge node description exceeds the 400 UTF-16 code unit limit");
7848
+ });
7849
+ assertDescriptionWithinBound = resolvedAssert;
7850
+ assertWithinBound = resolvedAssert;
7851
+ }
7852
+ assertWithinBound(description);
7853
+ }
7842
7854
  const camelCaseColumns = [
7843
7855
  "canonicalName",
7844
7856
  "scopeKey",
@@ -8150,7 +8162,7 @@ var KnowledgePG = class extends _mastra_core_storage.KnowledgeStorage {
8150
8162
  });
8151
8163
  }
8152
8164
  async createNode(input) {
8153
- (0, _mastra_core_storage.assertKnowledgeDescriptionWithinBound)(input.description);
8165
+ await assertKnowledgeDescriptionWithinBoundCompat(input.description);
8154
8166
  const scope = (0, _mastra_core_storage.canonicalizeKnowledgeScope)(input.scope);
8155
8167
  return this.#transaction(async (tx) => {
8156
8168
  const existing = await this.#getNodeByName(tx, input.name, scope);
@@ -8238,7 +8250,7 @@ var KnowledgePG = class extends _mastra_core_storage.KnowledgeStorage {
8238
8250
  })).rows.map(parseNode);
8239
8251
  }
8240
8252
  async updateNode(input) {
8241
- (0, _mastra_core_storage.assertKnowledgeDescriptionWithinBound)(input.description);
8253
+ await assertKnowledgeDescriptionWithinBoundCompat(input.description);
8242
8254
  return this.#transaction(async (tx) => {
8243
8255
  const existing = await this.#getNode(tx, input.id);
8244
8256
  if (!existing) throw new _mastra_core_storage.KnowledgeNotFoundError("node", input.id);