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): Preserve delete of unresolved variables #7072

Merged
merged 10 commits into from Mar 15, 2023

Conversation

kdy1
Copy link
Member

@kdy1 kdy1 commented Mar 13, 2023

Description:

Related issue:

@kdy1 kdy1 added this to the Planned milestone Mar 13, 2023
@kdy1 kdy1 self-assigned this Mar 13, 2023
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_utils
  • swc_ecma_minifier

@kdy1 kdy1 marked this pull request as ready for review March 13, 2023 05:35
@kdy1 kdy1 enabled auto-merge (squash) March 13, 2023 05:35
kodiakhq[bot]
kodiakhq bot previously approved these changes Mar 13, 2023
@kdy1 kdy1 disabled auto-merge March 13, 2023 05:35
@kdy1 kdy1 requested a review from jridgewell March 13, 2023 05:35
kodiakhq[bot]
kodiakhq bot previously approved these changes Mar 13, 2023
kodiakhq[bot]
kodiakhq bot previously approved these changes Mar 13, 2023
@andersk
Copy link
Contributor

andersk commented Mar 14, 2023

Should we mark a delete expression as having side effects? Currently we only mark it as having side effects if its argument does, which is wrong:

Expr::Unary(UnaryExpr { ref arg, .. }) => arg.may_have_side_effects(ctx),

Fixing that might make this change unnecessary (not tested though).

@kdy1 kdy1 enabled auto-merge (squash) March 15, 2023 01:33
@kdy1 kdy1 disabled auto-merge March 15, 2023 01:33
@kdy1 kdy1 enabled auto-merge (squash) March 15, 2023 01:52
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 merged commit 86295ba into swc-project:main Mar 15, 2023
@kdy1 kdy1 deleted the issue-7045 branch March 15, 2023 02:31
@kdy1 kdy1 modified the milestones: Planned, v1.3.41 Mar 17, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

SWC erases delete of global variable
4 participants