swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
feat(es/transformer): Merge `private_properties_in_object` (#11378) Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
main
1 hour ago
feat: Implement private property in object transform for ES2022 Ported the private-in-object transform to the new VisitMutHook system. This transform converts `#private in object` expressions into WeakSet-based brand checks as specified by the TC39 proposal. Key changes: - Implemented PrivatePropertyInObjectPass with VisitMutHook<TraverseCtx> - Added necessary hooks to hook_utils.rs (enter/exit for class_decl, class_expr, assign_pat, private_prop) - Integrated the hook into es2022/mod.rs using HookBuilder pattern - Handles private fields, methods, and static members correctly - Optimizes static methods to use simple === comparison - All tests passing (swc_ecma_compat_es2022, swc_ecma_transforms_compat, projects, tsc) š¤ Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
kdy1/port-private-in-object
2 hours ago
Create shiny-lies-drive.md
kdy1/port-private-in-object
3 hours ago
Create shiny-lies-drive.md
kdy1/port-private-in-object
3 hours ago
lockfiel
kdy1/port-private-in-object
4 hours ago
fix(es/transformer): Fix missing var declaration in nullish coalescing with spreads (#11377) ## Summary Fixes #11375 The nullish coalescing operator (`??`) was missing the `var` declaration for the temporary variable when used in functions with spread parameters. ### Root Cause The bug was in the `exit_stmt` function in the nullish coalescing transformer. When exiting a statement, it was incorrectly restoring the statement pointer: - It popped the current statement from the stack - Then set `stmt_ptr` to the popped value (the statement we just exited) This meant `stmt_ptr` was pointing to the wrong statement when trying to inject variable declarations for nested expressions. ### The Fix Changed the `exit_stmt` function to correctly restore the parent statement pointer by using `last().copied()` on the stack after popping. ### Before ```javascript // Missing var declaration (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : props.label ``` ### After ```javascript var _props_children; (_props_children = props.children) !== null && _props_children !== void 0 ? _props_children : props.label ``` ## Test plan - ā Added test case for issue #11375 - ā All tests pass: `cargo test -p swc --test tsc` (4580 tests) - ā All tests pass: `cargo test -p swc --test projects` (860 tests) š¤ Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
main
4 hours ago
Create eight-chicken-sneeze.md
kdy1/fix-11375
4 hours ago
rename
kdy1/fix-transformer
5 hours ago
Active Branches
perf(es/minifier): optimize data structures of `ProgramData`
last run
18 hours ago
#11374
CodSpeed Performance Gauge
0%
[Meta] Port single-pass compiler from oxc
last run
14 days ago
#11292
CodSpeed Performance Gauge
0%
feat(test): Migrate from test262-parser-tests to full test262 suite
last run
30 days ago
#11290
CodSpeed Performance Gauge
0%
Ā© 2025 CodSpeed Technology
Home
Terms
Privacy
Docs