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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: extract comments #2970

Merged
merged 6 commits into from
Apr 28, 2023
Merged

refactor: extract comments #2970

merged 6 commits into from
Apr 28, 2023

Conversation

IWANABETHATGUY
Copy link
Contributor

@IWANABETHATGUY IWANABETHATGUY commented Apr 28, 2023

Related issue (if exists)

Summary

馃 Generated by Copilot at 7e8bf06

Improved the comment extraction feature in the rspack_plugin_javascript crate. Refactored and simplified the code in minify.rs and plugin.rs to avoid unnecessary sources and comments.

Walkthrough

馃 Generated by Copilot at 7e8bf06

  • Remove unused import of ConcatSource in minify.rs (link)
  • Add import of CommentKind in minify.rs to handle different types of comments (link)
  • Simplify logic for extracting comments in minify.rs by using a vector of strings instead of a ConcatSource (link, link)
  • Remove unnecessary variable and code for preserving comments in minify.rs (link, link)
  • Rename extract_comments variable to extract_comments_option in plugin.rs to avoid confusion with the function name (link, link)
  • Remove irrelevant comment about tree-shaking in plugin.rs (link)

@changeset-bot
Copy link

changeset-bot bot commented Apr 28, 2023

鈿狅笍 No Changeset found

Latest commit: c497e4a

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@IWANABETHATGUY IWANABETHATGUY changed the title Refactor/extract comments refactor: extract comments Apr 28, 2023
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review April 28, 2023 04:44
hyf0
hyf0 previously approved these changes Apr 28, 2023
@IWANABETHATGUY
Copy link
Contributor Author

@hyf0 fixed latest ci error, would you mind approving again?

@IWANABETHATGUY IWANABETHATGUY added this pull request to the merge queue Apr 28, 2023
Merged via the queue into main with commit ece4e8b Apr 28, 2023
10 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the refactor/extract-comments branch April 28, 2023 05:45
siyou pushed a commit to siyou/rspack that referenced this pull request May 14, 2023
* chore: 馃 init

* chore: 馃 refactor extract comments

* chore: 馃 recover main scripts dir

* refactor: 馃挕 refactor

* chore: 馃 more test case

* chore: 馃 fix ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants