@mastra/schema-compat 1.3.3-alpha.0 → 1.3.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 +26 -0
- package/dist/{chunk-PRX3QIA2.cjs → chunk-77T2HV4Q.cjs} +308 -221
- package/dist/chunk-77T2HV4Q.cjs.map +1 -0
- package/dist/{chunk-32GCIDQI.js → chunk-RMMKMUYK.js} +308 -221
- package/dist/chunk-RMMKMUYK.js.map +1 -0
- package/dist/{chunk-JRKBFHQT.js → chunk-UZUKSPJ6.js} +3 -3
- package/dist/{chunk-JRKBFHQT.js.map → chunk-UZUKSPJ6.js.map} +1 -1
- package/dist/{chunk-7IQVBFIT.cjs → chunk-XVGNFEQ2.cjs} +4 -4
- package/dist/{chunk-7IQVBFIT.cjs.map → chunk-XVGNFEQ2.cjs.map} +1 -1
- package/dist/index.cjs +31 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/provider-compats/deepseek.d.ts.map +1 -1
- package/dist/provider-compats/meta.d.ts.map +1 -1
- package/dist/schema.cjs +7 -7
- package/dist/schema.js +1 -1
- package/dist/standard-schema/adapters/json-schema.cjs +3 -3
- package/dist/standard-schema/adapters/json-schema.js +1 -1
- package/package.json +11 -11
- package/dist/chunk-32GCIDQI.js.map +0 -1
- package/dist/chunk-PRX3QIA2.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @mastra/schema-compat
|
|
2
2
|
|
|
3
|
+
## 1.3.4-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed Meta (Llama) and DeepSeek schemas leaking raw number bounds to the model. A field like `z.number().int()` was sent to the model with bogus `minimum: -9007199254740991` / `maximum: 9007199254740991` values, and `z.number().min(1).max(50)` leaked `minimum`/`maximum` keywords, even though OpenAI, Google, and Anthropic already strip these. Numeric constraints are now moved into the field description for Meta and DeepSeek too, matching the other providers. ([#19073](https://github.com/mastra-ai/mastra/pull/19073))
|
|
8
|
+
|
|
9
|
+
**Before** (Meta/DeepSeek, `z.object({ age: z.number().min(0).max(120) })`):
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{ "age": { "type": "number", "minimum": 0, "maximum": 120 } }
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
**After**:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{ "age": { "type": "number", "description": "constraints: greater than or equal to 0, lower than or equal to 120" } }
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Closes #19072.
|
|
22
|
+
|
|
23
|
+
## 1.3.3
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Fix the Zod v4 nullable and optional handlers gating on the wrapper type instead of the wrapped inner type. They checked `value.constructor.name` (always `"ZodNullable"`/`"ZodOptional"`), so the inner type was always processed. A nullable/optional wrapping an unsupported inner type (such as a tuple) is now passed through unchanged, matching the v3 handler, instead of being processed and rejected. Closes #18687. ([#18688](https://github.com/mastra-ai/mastra/pull/18688))
|
|
28
|
+
|
|
3
29
|
## 1.3.3-alpha.0
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|