Skip to content

Comments

feat(deps)!: upgrade chokidar to ^5.0.0#7020

Merged
chenjiahan merged 1 commit intomainfrom
chokidar_v5_01123
Jan 23, 2026
Merged

feat(deps)!: upgrade chokidar to ^5.0.0#7020
chenjiahan merged 1 commit intomainfrom
chokidar_v5_01123

Conversation

@chenjiahan
Copy link
Member

Summary

  • Upgraded chokidar from version 4.0.3 to 5.0.0
  • Updated the import of chokidar to use await import('chokidar') instead of requireCompiledPackage

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings January 23, 2026 05:32
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 chokidar file-watching library, moving to its major version 5.0.0. This upgrade necessitates a shift in how chokidar is integrated into the project, transitioning from a compiled package requirement to a dynamic ES module import. The changes ensure compatibility with the new chokidar version and streamline its loading process, alongside a minor update to the prebundle utility and corresponding lockfile adjustments.

Highlights

  • Dependency Upgrade: chokidar: The chokidar package has been upgraded from version 4.0.3 to 5.0.0, reflecting a major version bump.
  • Dynamic Import for chokidar: The method of importing chokidar has been changed from a synchronous requireCompiledPackage call to an asynchronous await import() statement, allowing for dynamic module loading.
  • Prebundle Configuration Update: The prebundle.config.ts file has been updated to explicitly configure chokidar as a dependency that should only copy its TypeScript declaration files (dtsOnly: true).
  • Dependency Update: prebundle: The prebundle dependency has been updated from version 1.6.0 to 1.6.2 across several package.json files.
  • Type Definition Refinement: The chokidar entry has been removed from the CompiledPackages type in vendors.ts, aligning with its new dynamic import mechanism.
  • Lockfile Synchronization: The pnpm-lock.yaml file has been updated to reflect all dependency changes, including chokidar, prebundle, and related sub-dependencies like readdirp and prettier.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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
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

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.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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: 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".

Copy link
Contributor

Copilot AI left a 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 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 requireCompiledPackage to dynamic import('chokidar')
  • Updated prebundle configuration to use dtsOnly: true for 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.

@chenjiahan chenjiahan merged commit 91c4c53 into main Jan 23, 2026
13 checks passed
@chenjiahan chenjiahan deleted the chokidar_v5_01123 branch January 23, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant