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

feat: Finish the change import statement feature #19

Merged
merged 13 commits into from
Jan 18, 2024

Conversation

libin-code
Copy link
Collaborator

This PR implements this issue.

@libin-code libin-code added the enhancement New feature or request label Dec 1, 2023
@libin-code libin-code self-assigned this Dec 1, 2023
crates/plugin_change_package_import/Cargo.toml Outdated Show resolved Hide resolved
Cargo.lock Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
crates/plugin_change_package_import/.cargo/config Outdated Show resolved Hide resolved
@ClarkXia
Copy link
Collaborator

合并下冲突

@libin-code libin-code force-pushed the feat/plugin-update-package-import branch from 542a472 to ded58f1 Compare December 26, 2023 02:24
@libin-code libin-code force-pushed the feat/plugin-update-package-import branch from ded58f1 to 96228be Compare December 26, 2023 02:24
crates/plugin_change_package_import/Cargo.toml Outdated Show resolved Hide resolved
fn visit_mut_module_items(&mut self, stmts: &mut Vec<ModuleItem>) {
stmts.visit_mut_children_with(self);

*stmts = self.new_stmts.clone();
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里是要做什么?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

new_stmts 是更新后的语句集合,保障了语句顺序,此处用新集合替换旧集合。

.gitignore Show resolved Hide resolved
@ClarkXia ClarkXia merged commit fbac0d4 into master Jan 18, 2024
3 checks passed
@delete-merged-branch delete-merged-branch bot deleted the feat/plugin-update-package-import branch January 18, 2024 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants