feat(deps)!: upgrade chokidar to ^5.0.0#7020
Conversation
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 focuses on a significant update to the 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.
Code Review
This pull request upgrades chokidar to version 5.0.0, a major version bump that introduces breaking changes, primarily its transition to an ESM-only package. The changes correctly adapt to this by replacing the synchronous requireCompiledPackage with a dynamic await import('chokidar'). The related configurations in prebundle.config.ts and vendors.ts have been updated accordingly to handle chokidar as a runtime dependency rather than a pre-bundled one. The dependency versions for chokidar and prebundle are updated across multiple packages, and the lockfile is consistent with these changes. The implementation is correct and follows best practices for handling ESM dependencies. Overall, this is a well-executed dependency upgrade.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a36eee3d93
ℹ️ 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.
Pull request overview
This PR upgrades the chokidar dependency from version 4.0.3 to 5.0.0 and transitions from bundling the entire package to a type-only approach. The upgrade aligns with the project's Node.js version requirement (>= 20.19.0) and follows the pattern used by other type-only dependencies like rslog and rspack-chain.
Changes:
- Upgraded chokidar from ^4.0.3 to ^5.0.0 (requires Node >= 20.19.0)
- Changed chokidar import from
requireCompiledPackageto dynamicimport('chokidar') - Updated prebundle configuration to use
dtsOnly: truefor chokidar - Updated prebundle dependency from 1.6.0 to 1.6.2 across multiple packages
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates dependency versions for chokidar (5.0.0), readdirp (5.0.0), and prebundle (1.6.2) |
| packages/core/package.json | Updates chokidar to ^5.0.0 and prebundle to 1.6.2 in devDependencies |
| packages/core/src/server/watchFiles.ts | Replaces requireCompiledPackage with dynamic import for chokidar |
| packages/core/src/helpers/vendors.ts | Removes chokidar from CompiledPackages type definition |
| packages/core/prebundle.config.ts | Changes chokidar from full bundle to dtsOnly with copyDts enabled |
| packages/plugin-babel/package.json | Updates prebundle to 1.6.2 |
| packages/plugin-less/package.json | Updates prebundle to 1.6.2 |
| packages/plugin-sass/package.json | Updates prebundle to 1.6.2 |
| packages/plugin-svgr/package.json | Updates prebundle to 1.6.2 |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
chokidarfrom version 4.0.3 to 5.0.0chokidarto useawait import('chokidar')instead ofrequireCompiledPackageRelated Links
Checklist