Commit c2c0db2
committed
fix: address PR review comments
- parseBlockMap duplicate check now uses Object.hasOwn() so prototype-
chain property names like `toString` and `constructor` aren't falsely
rejected as duplicates.
- Drop ':' from TAG_KEY_PATTERN. The block-map parser splits on the
first ':', so a tag key containing ':' (e.g. `foo:bar`) couldn't be
expressed in YAML form anyway. Aligning the JSON form keeps validation
consistent across both input styles. Also rewords the validation
error message to match the trimmed character set.
- Rename the misleading "rejects JSON arrays" test to make clear it
rejects non-string JSON values; add a separate case for a root-level
JSON array (which falls through to the YAML parser); add a regression
test for the prototype-chain dupe-check fix.1 parent 7663c38 commit c2c0db2
4 files changed
Lines changed: 27 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
58 | 67 | | |
59 | 68 | | |
60 | 69 | | |
| |||
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
76 | | - | |
77 | | - | |
78 | | - | |
| 85 | + | |
79 | 86 | | |
80 | 87 | | |
81 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
87 | 101 | | |
88 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
89 | 107 | | |
90 | 108 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments