-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(es/transforms): Fix SuppressedError for resource management #10915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…esource management - Fixed argument order in SuppressedError constructor to match TypeScript spec - Changed from new SuppressedError(oldError, newError) to new SuppressedError(newError, oldError) - Added comprehensive tests for multiple disposables throwing errors Fixes #8853 Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
|
|
Claude finished @kdy1's task —— View job Code Review for PR #10915: Fix SuppressedError for Resource ManagementTodo List
Review Findings✅ Code Quality - ExcellentThe Fix is Correct: The argument order change in // Fixed: new error first, then suppressed error
new _disposeSuppressedError(e, error) This matches the ECMAScript specification for ✅ Test Coverage - OutstandingThe new test files demonstrate excellent coverage:
The tests verify the correct behavior where disposal happens in reverse order ( ✅ No Security Concerns
✅ Performance - No Impact
✅ Potential Issues - None IdentifiedEdge Cases Well-Handled:
🎯 Specification ComplianceThis fix brings SWC's implementation in line with:
Recommendation: ✅ APPROVEThis is a high-quality fix that:
The implementation is clean, well-tested, and follows established patterns in the codebase. |
CodSpeed Performance ReportMerging #10915 will not alter performanceComparing Summary
Footnotes |
Description:
Related issue:
swc
explicitResourceManagement
SuppressedError
implement does not obey spec #8853