voice-router-dev 0.6.2 → 0.6.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.
- package/CHANGELOG.md +25 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.6.3] - 2026-01-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
#### Zod discriminatedUnion Runtime Crash
|
|
13
|
+
|
|
14
|
+
Fixed critical runtime error that crashed Node.js on module load:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Error: Discriminator property type has duplicate value undefined
|
|
18
|
+
Error: A discriminator value for key `type` could not be extracted from all schema options
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Root cause:** Orval-generated OpenAI Zod schemas had two bugs:
|
|
22
|
+
1. Discriminator fields marked `.optional()` - allowing all variants to have `undefined` as the discriminator value
|
|
23
|
+
2. Discriminator fields using `zod.string()` instead of `zod.enum()`/`zod.literal()` - Zod can't extract a literal discriminator from a generic string
|
|
24
|
+
|
|
25
|
+
**Fix:** Added two post-generation fixes in `scripts/fix-generated.js`:
|
|
26
|
+
- `fixDiscriminatedUnionOptionalDiscriminator`: Removes `.optional()` from discriminator fields
|
|
27
|
+
- Enhanced `fixDiscriminatedUnionMissingField`: Converts `discriminatedUnion` to `union` when discriminator uses `zod.string()`
|
|
28
|
+
|
|
29
|
+
**Affected schemas:** OpenAI Realtime API audio format and turn detection configs
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
8
33
|
## [0.6.2] - 2026-01-12
|
|
9
34
|
|
|
10
35
|
### Added
|
package/package.json
CHANGED