chore: upgrade vite-plus to 0.1.19-alpha.3#6
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates several dependencies to specific versions, notably vite-plus and vitest, and removes unused packages such as rolldown and siginfo. Configuration changes include adding a staged check to the Vite configuration and pre-commit hooks, alongside refinements to TypeScript settings. In Sidebar.tsx, the implementation was updated to use mutateAsync within a Promise.all block; however, it is recommended to use Promise.allSettled instead to ensure all requests are attempted and to prevent the entire batch from rejecting if a single request fails.
| @@ -312,7 +312,7 @@ function Sidebar({ className }: { className?: string }) { | |||
| await Promise.all( | |||
There was a problem hiding this comment.
Switching to mutateAsync correctly allows Promise.all to wait for the network requests to complete. However, Promise.all will reject immediately if any single mutation fails, which can lead to unhandled promise rejections if not caught. Consider using Promise.allSettled to ensure all requests are attempted even if some fail, or wrap this block in a try...catch to handle potential errors gracefully.
| await Promise.all( | |
| await Promise.allSettled( |
Upgrade vite-plus and related packages to 0.1.19-alpha.3 alpha version.