Skip to content
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

fix(es/minifier): Do not add vars if eval exists #8888

Merged
merged 18 commits into from Apr 27, 2024
Merged

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Apr 24, 2024

@kdy1 kdy1 added this to the Planned milestone Apr 24, 2024
@kdy1 kdy1 self-assigned this Apr 24, 2024
Copy link

changeset-bot bot commented Apr 24, 2024

⚠️ No Changeset found

Latest commit: 885d299

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

@kdy1 kdy1 changed the title fix(es/minifier): Do not create duplicate vars fix(es/minifier): Do not add vars if eval exists Apr 24, 2024
@kdy1 kdy1 marked this pull request as ready for review April 24, 2024 08:18
@kdy1 kdy1 requested a review from a team as a code owner April 24, 2024 08:18
kodiakhq[bot]
kodiakhq bot previously approved these changes Apr 24, 2024
Copy link
Member

@Austaras Austaras left a comment

Choose a reason for hiding this comment

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

Seems like this PR introduced lots of unresolved vars. Maybe we should make name mangler working properly in presence of eval?

@kdy1 kdy1 marked this pull request as draft April 24, 2024 13:44
@kdy1
Copy link
Member Author

kdy1 commented Apr 25, 2024

Actually name mangler cannot work properly in presence of eval, because it cannot modify/add/remove a name even theoretically

@kdy1 kdy1 requested a review from Austaras April 25, 2024 00:53
@kdy1 kdy1 marked this pull request as ready for review April 25, 2024 00:53
kodiakhq[bot]
kodiakhq bot previously approved these changes Apr 25, 2024
Copy link
Member Author

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

swc-bump:

  • swc_ecma_minifier
  • swc_core

@Austaras
Copy link
Member

I see. But there's still lots of changes in absence of eval, why?

@kdy1
Copy link
Member Author

kdy1 commented Apr 25, 2024

@Austaras Nice catch! Thank you. I was confused about the changes.

Austaras
Austaras previously approved these changes Apr 25, 2024
@kdy1 kdy1 enabled auto-merge (squash) April 25, 2024 14:18
@Austaras Austaras self-requested a review April 25, 2024 14:19
@Austaras Austaras disabled auto-merge April 25, 2024 14:19
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@Austaras
Copy link
Member

Wait, I see the problem now.

@Austaras Austaras dismissed stale reviews from kodiakhq and themself via af3382a April 25, 2024 14:39
kodiakhq[bot]
kodiakhq bot previously approved these changes Apr 25, 2024
@Austaras
Copy link
Member

This code maybe not of best quality, but I hope you get what I mean.

@kdy1
Copy link
Member Author

kdy1 commented Apr 27, 2024

Thank you so much 👍

@kdy1 kdy1 enabled auto-merge (squash) April 27, 2024 04:19
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 disabled auto-merge April 27, 2024 04:44
@kdy1 kdy1 merged commit be359fa into swc-project:main Apr 27, 2024
147 checks passed
@kdy1 kdy1 deleted the issue-8886 branch April 27, 2024 04:44
@kdy1 kdy1 modified the milestones: Planned, v1.5.1 Apr 27, 2024
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.

Minify: multiple same temp symbols declarations
3 participants