-
-
Notifications
You must be signed in to change notification settings - Fork 249
refactor: rename id for JS main oneOf rule #7036
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
Conversation
Deploying rsbuild with
|
| Latest commit: |
8e27750
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4e9c5d59.rsbuild-v2.pages.dev |
| Branch Preview URL: | https://js-main-0125.rsbuild-v2.pages.dev |
Summary of ChangesHello @chenjiahan, 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 refactors an internal identifier related to JavaScript transformation rules, renaming Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fd6427ea7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This PR correctly refactors CHAIN_ID.ONE_OF.JS_TRANSFORM to CHAIN_ID.ONE_OF.JS_MAIN. The changes are consistent across the updated files and documentation.
However, there is a critical issue: The file packages/core/src/plugins/swc.ts still references the old CHAIN_ID.ONE_OF.JS_TRANSFORM. Since this ID is removed, this will break the build. Please update this file to use CHAIN_ID.ONE_OF.JS_MAIN.
I've also added one suggestion to improve variable naming for consistency in packages/plugin-svgr/src/index.ts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR renames the chain identifier constant from JS_TRANSFORM to JS_MAIN to better reflect its purpose as the main JavaScript transform rule. This follows up on PR #7032 which introduced the oneOf structure for JavaScript rules.
Changes:
- Renamed the constant
CHAIN_ID.ONE_OF.JS_TRANSFORMtoCHAIN_ID.ONE_OF.JS_MAINin the core configuration - Updated all plugin usages to reference the new constant name (babel, svelte, svgr)
- Updated documentation in both English and Chinese upgrade guides
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/configChain.ts | Renamed the constant definition from JS_TRANSFORM to JS_MAIN |
| packages/plugin-babel/src/plugin.ts | Updated reference to use new constant name and renamed local variable |
| packages/plugin-babel/src/helper.ts | Updated reference to use new constant name |
| packages/plugin-svelte/src/index.ts | Updated reference to use new constant name and renamed local variable |
| packages/plugin-svgr/src/index.ts | Updated reference to use new constant name and simplified code structure |
| website/docs/en/guide/upgrade/v1-to-v2.mdx | Updated documentation examples to use new constant name |
| website/docs/zh/guide/upgrade/v1-to-v2.mdx | Updated documentation examples to use new constant name |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Renamed
CHAIN_ID.ONE_OF.JS_TRANSFORMtoCHAIN_ID.ONE_OF.JS_MAIN, reflecting the new main JavaScript transform rule identifier.Related Links
Checklist