Skip to content

Conversation

@aXenDeveloper
Copy link
Owner

Improving Documentation

Description

What?

Why?

How?

@vercel
Copy link

vercel bot commented Oct 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vitnode-docs Ready Ready Preview Comment Oct 4, 2025 7:54am

@aXenDeveloper aXenDeveloper merged commit ae1b1f5 into canary Oct 4, 2025
4 checks passed
@aXenDeveloper aXenDeveloper deleted the react_19.2_next_canary_update branch October 4, 2025 07:56
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 updates React to 19.2 and Next.js to a canary version, along with many other dependencies. The changes are mostly in package.json files. There are also some necessary code adjustments, such as enabling PPR in Next.js and fixing new linting errors that arose from dependency updates.

My review focuses on a few points to improve code quality and maintainability:

  • I've suggested removing some commented-out code.
  • I've pointed out a case where a file-level eslint-disable should be more scoped.
  • There's a significant change in a TypeScript type that reduces type safety, which I've flagged and suggested a fix for.

Overall, the dependency updates look good and are a good step forward.

H extends RouteHandler<R> = RouteHandler<R>,
> {
handler: H;
handler: (...args: unknown[]) => Promise<Response> | Response;
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The type for handler has been made very generic ((...args: unknown[]) => Promise<Response> | Response), which leads to a loss of type safety for route handlers. This was likely done to resolve a TypeScript error after dependency upgrades, but it makes it harder to correctly type handlers. It would be better to use a more specific type from @hono/zod-openapi to maintain type safety.

Suggested change
handler: (...args: unknown[]) => Promise<Response> | Response;
handler: RouteHandler<R, EnvVitNode>;

Comment on lines +29 to +30
// export const generateStaticParams = () =>
// vitNodeConfig.i18n.locales.map(locale => ({ locale: locale.code }));
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Commented-out code should be removed to keep the codebase clean. If this function is no longer needed, please delete it instead of commenting it out.

@@ -1,3 +1,4 @@
/* eslint-disable @eslint-react/hooks-extra/no-direct-set-state-in-use-effect */
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

A file-level eslint-disable is too broad and can hide other potential issues. It's better to use more specific // eslint-disable-next-line comments for the lines that are causing the linting error. This approach is used in other files in this PR, such as packages/vitnode/src/hooks/use-captcha.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 Performerce Improves performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants