Skip to content

refactor: remove extension packages, only keep x6#4715

Merged
hustcc merged 10 commits intomasterfrom
refactor-x6-devtool
Aug 25, 2025
Merged

refactor: remove extension packages, only keep x6#4715
hustcc merged 10 commits intomasterfrom
refactor-x6-devtool

Conversation

@GaoFuhong
Copy link
Copy Markdown
Collaborator

@GaoFuhong GaoFuhong commented Aug 22, 2025

Description

  • 移除所有子包
  • x6 移动到根目录
  • lint 相关改成 biemo
  • rollup 简化
  • 单测

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Enhancement (changes that improvement of current feature or performance)
  • Refactoring (changes that neither fixes a bug nor adds a feature)
  • Test Case (changes that add missing tests or correct existing tests)
  • Code style optimization (changes that do not affect the meaning of the code)
  • Docs (changes that only update documentation)
  • Chore (changes that don't modify src or test files)

Self Check before Merge

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @GaoFuhong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on a significant refactoring of the project's directory structure. It involves relocating the x6-devtool package from its standalone packages/x6-devtool directory into the packages/x6-extensions directory, specifically under packages/x6-extensions/x6-devtool. This change aims to consolidate related packages under a more logical grouping, improving overall project organization and maintainability.

Highlights

  • Project Structure Refactoring: The x6-devtool package has been moved from packages/x6-devtool to packages/x6-extensions/x6-devtool. This consolidates the devtool package within the x6-extensions namespace, aligning with a broader organizational strategy for the project's packages.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

你好,这次 PR 主要将 x6-devtool 包迁移到了 x6-extensions 目录下,这是一次不错的重构。代码本身没有改动,但我对迁移后的文件做了一些检查,并发现了一些可以改进的地方,主要集中在 DevTools 脚本和 React 组件中。

具体来说,我发现了一些问题,包括:

  • 一个函数名中的拼写错误。
  • 在 Chrome 扩展的背景脚本中使用了已弃用的 Manifest V2 API。
  • React 组件中存在可能导致运行时错误的 bug,以及一些反模式的实践。

我已经将具体的修改建议以评论的形式附在相关代码行上。希望这些建议能帮助你提升代码质量。

@hustcc
Copy link
Copy Markdown
Member

hustcc commented Aug 22, 2025

放到 x6-extension 单独的 repo,大概率一年改不了几次,质量要求也可以低一些。

@hustcc hustcc closed this Aug 22, 2025
@hustcc hustcc reopened this Aug 22, 2025
@hustcc hustcc changed the title refactor: migrate x6-devtool into x6-extensions refactor: remove extension packages Aug 22, 2025
@hustcc hustcc changed the title refactor: remove extension packages refactor: remove extension packages, only keep x6 Aug 22, 2025
@hustcc
Copy link
Copy Markdown
Member

hustcc commented Aug 22, 2025

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

这是一次非常出色的重构。将项目从 monorepo 整合为单一包,并升级了构建和测试工具链(Biome, Vitest),这无疑会大大提升项目的可维护性和开发体验。

有两点建议:

  1. PR 描述中的 “单测”一项未勾选。考虑到这是一次大规模的重构,确保所有测试都已迁移并通过是至关重要的。
  2. package.json 中的一些 Rollup 相关依赖版本较旧。建议升级它们以获取最新的性能优化和安全修复。

总的来说,这是一次非常有价值的重构,做得很好!

Comment thread package.json
Comment thread package.json Outdated
@hustcc hustcc merged commit f694b96 into master Aug 25, 2025
2 of 3 checks passed
@hustcc hustcc deleted the refactor-x6-devtool branch August 25, 2025 07:01
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.

3 participants