Commit f55923e
fix(es/minifier): Restrict parameter inlining to only allow 'undefined' as unresolved identifier
Changed the safety check for parameter inlining to only allow the 'undefined'
identifier as an unresolved identifier. Previously, all unresolved identifiers
(like window, document, etc.) were allowed, but this is not safe because:
1. They could have side effects or vary between environments
2. Their values might not be constant across different execution contexts
This change ensures that only 'undefined' (which is a true constant) can be
inlined as an unresolved identifier.
Addresses review feedback from #11156 (review)
All tests passing.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 7c99765 commit f55923e
1 file changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| |||
302 | 309 | | |
303 | 310 | | |
304 | 311 | | |
305 | | - | |
| 312 | + | |
306 | 313 | | |
307 | 314 | | |
308 | 315 | | |
309 | | - | |
| 316 | + | |
| 317 | + | |
310 | 318 | | |
311 | 319 | | |
312 | 320 | | |
| |||
0 commit comments