forked from swc-project/swc
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Sync main from swc-project #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Related issue:** - Closes #9494 - babel/babel#16194
**Related issue:** Closes #9453
**Related issue:** - Closes #9531
…#9530) Closes #9500 Caused by https://github.com/swc-project/swc/blob/c7fdd6b69b129a11465125d4e11a898326b7e884/crates/swc_ecma_minifier/src/compress/pure/misc.rs#L1547. When the object with getters pass to `self.ignore_return_value`, https://github.com/swc-project/swc/blob/c7fdd6b69b129a11465125d4e11a898326b7e884/crates/swc_ecma_minifier/src/compress/pure/misc.rs#L966 converts the object to `0` because the object is side-effect-free according to https://github.com/swc-project/swc/blob/c7fdd6b69b129a11465125d4e11a898326b7e884/crates/swc_ecma_utils/src/lib.rs#L1496 We should skip this process to fix the issue. As is known only accessing getters and setters may cause side effect, we can safely do the transformation when none of them appears in the object. More precision is possible if comparing the lit prop names. I also collect computed keys of getters and setters in the object, is there any bad case? The reason why only numeric (string) key removes the statement is that string key (`Computed`) is converted to `Ident` in other phases, e.g. `{}['a']` => `{}.a`, which does not matching the pattern.
**Related issue:** - Closes #9527
**Related issue:** - Closes #9719
**Related issue:** - Closes #7602
**Related issue:** - Closes #9716 --------- Co-authored-by: OJ Kwon <[email protected]>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [allocator-api2](https://redirect.github.com/zakarumych/allocator-api2) | workspace.dependencies | patch | `0.2.18` -> `0.2.19` | | [libfuzzer-sys](https://redirect.github.com/rust-fuzz/libfuzzer) | dependencies | patch | `0.4.7` -> `0.4.8` | --- ### Release Notes <details> <summary>rust-fuzz/libfuzzer (libfuzzer-sys)</summary> ### [`v0.4.8`](https://redirect.github.com/rust-fuzz/libfuzzer/blob/HEAD/CHANGELOG.md#048) [Compare Source](https://redirect.github.com/rust-fuzz/libfuzzer/compare/0.4.7...0.4.8) Released 2024-11-07. ##### Added - Bindings to `LLVMFuzzerCustomCrossOver` through the `fuzz_crossover` macro. See the `example_crossover` directory in this crate's repo for a complete example. ##### Changed - Updated to `libFuzzer` commit `ab51eccf88f5321e7c60591c5546b254b6afab99` (`release/19.x`). *** </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/swc-project/swc). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43LjEiLCJ1cGRhdGVkSW5WZXIiOiIzOS43LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
**Description:** `declare const MY_MAGIC_VARIABLE: string` is not a variable declaration. **Related issue:** - vercel/next.js#72576
Gonna close in favor of merging in to content-tag (probably) |
Realizing that this would be helpful for seeing the total diff of the content-tag implementation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.