Skip to content

fix(es/minifier): Don't optimize Number properties when Number is shadowed #10947

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

Merged
merged 2 commits into from
Jul 26, 2025

Conversation

mertcanaltin
Copy link
Contributor

Don't optimize Number properties when Number is shadowed

@mertcanaltin mertcanaltin requested a review from a team as a code owner July 26, 2025 14:09
Copy link

changeset-bot bot commented Jul 26, 2025

⚠️ No Changeset found

Latest commit: 8ffeb76

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mertcanaltin mertcanaltin force-pushed the mert/fix/shadowed-number-inlining branch from 42905a2 to 520c8d3 Compare July 26, 2025 14:12
Copy link

codspeed-hq bot commented Jul 26, 2025

CodSpeed Performance Report

Merging #10947 will not alter performance

Comparing mertcanaltin:mert/fix/shadowed-number-inlining (3baf4c9) with main (63172ef)

Summary

✅ 140 untouched benchmarks

@mertcanaltin mertcanaltin force-pushed the mert/fix/shadowed-number-inlining branch from 3fcb34e to 8ffeb76 Compare July 26, 2025 15:37
return;
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we just compare the ident's ctxt with expr_ctx.unresolved_ctxt

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I edited

@mertcanaltin mertcanaltin requested a review from Austaras July 26, 2025 18:46
@kdy1 kdy1 enabled auto-merge (squash) July 26, 2025 19:03
@kdy1 kdy1 merged commit 40a1e2e into swc-project:main Jul 26, 2025
174 checks passed
lukesandberg pushed a commit to lukesandberg/swc that referenced this pull request Jul 27, 2025
lukesandberg pushed a commit to lukesandberg/swc that referenced this pull request Jul 27, 2025
@kdy1 kdy1 added this to the v1.13.3 milestone Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants