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
fix(magic-string): throw TypeError for non-string content args (#8905)
## Summary
- Add JS-side type validation wrappers for all MagicString methods that accept content (append, prepend, appendLeft, appendRight, prependLeft, prependRight, overwrite, update)
- Throws TypeError with messages matching the JS magic-string library instead of napi-rs's generic Error
- Un-skips 3 related "should throw when given non-string content" tests
## Test plan
- [x] just test-node magic-string/MagicString -- all 915 tests pass, 0 failed
- [x] just test-node magic-string/rolldown-magic-string -- all 33 JS tests pass
- [x] Un-skipped non-string content tests for append, overwrite, and update all pass
0 commit comments