swc-project
swc
BlogDocsChangelog

Branches performance

Pull requests

fix(es/compat): Preserve return value for single-property object destructuring#11334
last run
19 hours ago
fix: ignore_return_value
19 hours ago
1ff5ee9
magic-akari:fix/issue-11051
CodSpeed Performance Gauge
0%
fix(es/parser): Support type-only string literal in import specifiers#11333
last run
2 days ago
Create blue-countries-marry.md
2 days ago
345c9c2
magic-akari:fix/issue-11332
CodSpeed Performance Gauge
0%
Create fast-camels-allow.md
2 days ago
6df00a6
magic-akari:fix/issue-11321
CodSpeed Performance Gauge
0%
fix(es/compat): Preserve SyntaxContext in ES3 reserved word transformation#11330
last run
3 days ago
fix(es/compat): Preserve SyntaxContext in ES3 reserved word transformation This commit improves the ES3 reserved word transformation pass to use the explicit `with_prefix` method when renaming identifiers, ensuring that the SyntaxContext field is preserved properly. ## Background The ES3 reserved word pass renames identifiers that are reserved in ES3 (like `char`, `byte`, `int`, etc.) by prefixing them with underscore to avoid conflicts in ES3 environments. Previously, the code directly modified the `sym` field: `i.sym = format!("_{}", i.sym).into()`. While this did preserve the `ctxt` field implicitly, it was not as explicit and clear as using the dedicated `with_prefix` method. ## Changes - Use `Ident::with_prefix("_")` instead of direct `sym` field modification - Add comprehensive test cases covering: - Multiple reserved words in exports (nextjs_issue_86076 test) - Mixed export syntax with function, const, and class - Multiple reserved words exported together - Variable declarations with reserved words ## Testing All existing tests pass, and new tests verify the transformation works correctly for various scenarios including the Next.js issue #86076 case. Related: vercel/next.js#86076 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
3 days ago
7b5ceeb
devbird/fix-es3-reserved-word-syntaxcontext
CodSpeed Performance Gauge
0%
© 2025 CodSpeed Technology
Home Terms Privacy Docs