-
Notifications
You must be signed in to change notification settings - Fork 400
docs: Update TSS docs and example #1016
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
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
WalkthroughThis pull request introduces a comprehensive guide for setting up a Tanstack/Start project with UploadThing. It covers the installation of necessary packages, configuration of environment variables, and creation of a FileRouter for file uploads. The documentation includes metadata exports, warnings about obtaining an UploadThing token, and detailed examples for implementing UploadThing components and styles, including Tailwind CSS integration. Changes
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
37a2015 to
d30fd00
Compare
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (6)
- examples/minimal-tanstack-start/app/client.tsx (1 hunks)
- examples/minimal-tanstack-start/app/routes/__root.tsx (0 hunks)
- examples/minimal-tanstack-start/app/routes/api/uploadthing.ts (1 hunks)
- examples/minimal-tanstack-start/app/ssr.tsx (1 hunks)
- examples/minimal-tanstack-start/package.json (1 hunks)
- examples/minimal-tanstack-start/tsconfig.json (1 hunks)
💤 Files with no reviewable changes (1)
- examples/minimal-tanstack-start/app/routes/__root.tsx
🧰 Additional context used
🔇 Additional comments (9)
examples/minimal-tanstack-start/tsconfig.json (1)
7-8: Approve the addition of strictNullChecks and verify its impact.The addition of
"strictNullChecks": trueis a positive change that enhances type safety in the project. This aligns with the PR's objective of removing unnecessary@ts-expect-errordirectives, as it may help catch and resolve type issues that previously required suppression.However, enabling this option might uncover existing type issues in the codebase.
To ensure this change doesn't introduce unexpected issues, please run the following verification:
This script will compile the project without emitting files and capture any TypeScript errors. Review the output to ensure no unexpected issues are introduced by this change.
examples/minimal-tanstack-start/app/client.tsx (1)
1-1: Approved: Type reference added for Vinxi client types.The addition of the type reference
/// <reference types="vinxi/types/client" />is a good practice. It ensures that TypeScript can properly recognize and check types from the Vinxi framework in this file.However, I noticed that this change doesn't directly align with the PR description, which mentions removing unnecessary
@ts-expect-errordirectives related to?urlimports. Could you please clarify how this change relates to the PR objectives?To ensure consistency across the project, let's check if similar type references have been added to other relevant files:
✅ Verification successful
Verified: Vinxi type reference is appropriate and consistent.
The addition of
/// <reference types="vinxi/types/client" />inexamples/minimal-tanstack-start/app/client.tsxhas been verified and is consistent with the project's type definitions. No additional files require similar references.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for Vinxi type references in TypeScript and TSX files rg --type-add 'ts:*.{ts,tsx}' --type ts '/// <reference types="vinxi/types/client" />'Length of output: 180
examples/minimal-tanstack-start/app/ssr.tsx (3)
1-1: LGTM: TypeScript reference directive added.The addition of the TypeScript reference directive for "vinxi/types/server" is appropriate. It ensures that the necessary type definitions are available for the server-side code, which is in line with best practices for TypeScript development.
Line range hint
9-13: LGTM: Export statement updated for clarity and type safety.The modification of the export statement to explicitly use
createRouterandgetRouterManifestas parameters forcreateStartHandleris a positive change. It improves code clarity and type safety without altering the module's public API. This update aligns well with the PR's objective of working with the latest version of Tanstack/Start.
Line range hint
1-13: Summary: Positive updates enhancing TypeScript integration.The changes in this file, while minimal, significantly improve the TypeScript integration and code clarity. The addition of the TypeScript reference directive and the explicit use of
createRouterandgetRouterManifestin the export statement align well with the PR's objective of updating the code to work with the latest version of Tanstack/Start. These modifications support the removal of unnecessary@ts-expect-errordirectives by ensuring proper type definitions and usage.examples/minimal-tanstack-start/app/routes/api/uploadthing.ts (1)
9-10: Improved request handling implementation. LGTM!The changes to the
GETandPOSTmethods in theRouteconstant are well-implemented. By wrapping thehandlersin arrow functions that explicitly take arequestparameter, you've enhanced the flexibility and clarity of the request handling process. This approach allows for more granular control over incoming requests and aligns with modern practices in API route handling.While this change doesn't directly address the PR objective of removing
@ts-expect-errordirectives (as there were none in this file), it does improve the overall code structure and maintainability.examples/minimal-tanstack-start/package.json (3)
11-11: LGTM: @tanstack/react-router version updateThe update to @tanstack/react-router from ^1.58.7 to ^1.69.1 is a minor version bump, which should introduce new features or improvements without breaking changes. This update aligns with the PR objectives and should help resolve the TypeScript errors mentioned.
12-12: LGTM: @tanstack/start version updateThe update to @tanstack/start from ^1.58.7 to ^1.69.3 is a minor version bump, which should introduce new features or improvements without breaking changes. This update is in line with the PR objectives and should contribute to resolving the TypeScript errors mentioned.
13-13: LGTM: @uploadthing/react version flexibilityThe change from 7.0.3 to ^7.0.3 for @uploadthing/react introduces version flexibility. This allows for automatic updates to minor versions, which can include bug fixes and non-breaking new features. While not directly related to the PR objectives, this change follows good practices for dependency management.
Docs:
ChangedReverted because behavior was changed in fix: correct args in middleware args when using object syntax #1017api/uploadthing.tsto pass correct object intoreq.// @ts-expect-errorwhen importing CSS from?urlpathOther:
Summary by CodeRabbit
Summary by CodeRabbit
UPLOADTHING_TOKEN.package.jsonfor improved compatibility and features.