fix(csv-loader): escape quotes in schema rows

Implement loader-side escaping for the schema row to prevent
`csv-parse` from misinterpreting double-quoted string literals (e.g.,
`"active" | "inactive"`) as field delimiters.
This commit is contained in:
2026-08-06 10:25:24 +08:00
parent cdff31c126
commit 37e3514c0c
4 changed files with 82 additions and 8 deletions
+1
View File
@@ -156,6 +156,7 @@ The following TypeScript types are exported:
- In a union, **reference members are tried before non-reference members** (e.g. `@users | string` resolves `1` to the user object, falling back to a plain string when the reference doesn't match)
- Special characters can be escaped with backslash: `\;`, `\[`, `\]`, `\\`
- Empty arrays/tuples are not allowed
- In CSV schema rows, double-quoted string literals like `"active" | "inactive"` are handled automatically by the loader; avoid commas inside string literals (use single-quoted literals like `'a,b'` for those)
- For CSV loading with reference resolution, see [csv-loader.md](./csv-loader.md)
```javascript