Commit bf518df
committed
chore: apply AI code review suggestions
Apply suggestions from cubic, gemini, and copilot review threads on
PR #364:
- Use `Object.hasOwn(vercelJson, key)` instead of `key in vercelJson`
so prototype-chain properties cannot leak into projectSettings even if
upstream code mutates Object.prototype (cubic, copilot).
- Type-guard whitelisted vercel.json values: only string and null pass
through to projectSettings. Other types surface a local warning
instead of producing a 400 from the Vercel API (gemini).
Add tests for both behaviors: explicit null sentinel preservation and
rejection of non-string/non-null values.
Refs #359, PR #3641 parent f7cc7b0 commit bf518df
4 files changed
Lines changed: 67 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102556 | 102556 | | |
102557 | 102557 | | |
102558 | 102558 | | |
102559 | | - | |
102560 | | - | |
102561 | | - | |
102562 | | - | |
102563 | | - | |
102564 | | - | |
| 102559 | + | |
| 102560 | + | |
| 102561 | + | |
| 102562 | + | |
| 102563 | + | |
| 102564 | + | |
| 102565 | + | |
| 102566 | + | |
| 102567 | + | |
| 102568 | + | |
| 102569 | + | |
| 102570 | + | |
| 102571 | + | |
102565 | 102572 | | |
102566 | 102573 | | |
102567 | 102574 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
272 | 310 | | |
273 | 311 | | |
274 | 312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
0 commit comments