You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2026. It is now read-only.
No additional changelog is maintained in this file.
8
+
Migration guides for breaking changes are maintained below.
9
+
10
+
---
11
+
12
+
## [Unreleased]
13
+
14
+
> **Breaking changes** — In the 0.x series, minor version bumps are treated as effectively major releases.
15
+
16
+
### `ParseIssue.path` removed
17
+
18
+
The `path` field has been removed from `ParseIssue`.
19
+
20
+
```ts
21
+
// v0.1.x
22
+
interfaceParseIssue {
23
+
code:IssueCode;
24
+
path:readonly []; // removed
25
+
}
26
+
27
+
// v0.2.0
28
+
interfaceParseIssue {
29
+
code:IssueCode;
30
+
key:string; // added (see below)
31
+
}
32
+
```
33
+
34
+
**Migration**: Remove all references to `issue.path`. Because `path` was always an empty array, any reference to it was effectively a no-op and can be deleted outright.
35
+
36
+
### `ParseIssue.key` added (required, `string`)
37
+
38
+
A required `key: string` field has been added to identify which FormData key caused the issue.
39
+
40
+
```ts
41
+
// v0.1.x — no key field
42
+
issue.code; // "forbidden_key"
43
+
44
+
// v0.2.0 — key identifies the offending field
45
+
issue.code; // "forbidden_key"
46
+
issue.key; // "__proto__"
47
+
```
48
+
49
+
**Migration**: Use `issue.key` wherever you need to identify the offending field. This is an additive change with no runtime impact, but type definitions that reference `ParseIssue` must be updated.
50
+
51
+
### `issues` on failure narrowed to a non-empty tuple
52
+
53
+
```ts
54
+
// v0.1.x
55
+
issues: ParseIssue[]
56
+
57
+
// v0.2.0
58
+
issues: [ParseIssue, ...ParseIssue[]]
59
+
```
60
+
61
+
When parsing fails (`data === null`), the type now guarantees at least one issue is present.
62
+
63
+
**Migration**: Accessing `result.issues[0]` remains safe. No changes to narrowing logic are required. However, if you reference the `ParseResult` type explicitly, you may need to update type annotations.
0 commit comments