-
Notifications
You must be signed in to change notification settings - Fork 7
Moving to TS #3
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
base: main
Are you sure you want to change the base?
Moving to TS #3
Conversation
"@langchain/openai": "^0.3.16", | ||
"@radix-ui/react-slot": "^1.1.2", | ||
"@tanstack/react-router": "^1.97.0", | ||
"@tanstack/react-router": "^1.102.1", |
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.
IMO updating random dependencies that are not part of the scope of the PR is not good.
If Shurti is fine with this that's fine
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.
+1
"dotenv": "^16.4.7", | ||
"express": "^4.21.2", | ||
"langchain": "^0.3.8", | ||
"convex": "^1.19.0", |
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.
same here
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"react-error-boundary": "^5.0.0", | ||
"react": "^19.0.0", |
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.
tanstack router is not compatible with v19 AFAIK
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.
lets not upgrade React as of now.
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.
okay downgrading it back. I did not notice, it happened to upgrade automatically
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.
Thank you so much for the effort to convert this to TS. I appreciate you helping out.
This PR is a few different things, and as such it makes it difficult to test and review. I would recommend splitting this out to keep the changes to only converting to TS.
You can break this PR down into multiple PRs to make it easy to review, test and separate concerns.
"css": "src/App.css", | ||
"baseColor": "zinc", | ||
"css": "src/index.css", | ||
"baseColor": "slate", |
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.
why this change?
"@langchain/openai": "^0.3.16", | ||
"@radix-ui/react-slot": "^1.1.2", | ||
"@tanstack/react-router": "^1.97.0", | ||
"@tanstack/react-router": "^1.102.1", |
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.
+1
"react": "18.3.1", | ||
"react-dom": "18.3.1", | ||
"react-error-boundary": "^5.0.0", | ||
"react": "^19.0.0", |
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.
lets not upgrade React as of now.
@@ -0,0 +1,7 @@ | |||
{ | |||
"singleQuote": false, | |||
"trailingComma": "es5", |
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.
lets remove prettier config in this PR. Lets limit the scope to TS. .
}, | ||
handler: async (ctx, args) => { | ||
const embeddings = await generateEmbeddings(args.property); | ||
// @ts-expect-error - by_embedding is the vector index name |
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.
what was the error here?
<Link to="/details/$propertyId" params={{ propertyId: zpid }}> | ||
<img | ||
src={imgSrc} | ||
alt="Property Image" |
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.
Its a good idea to keep components in its own folder. You can undo this change.
|
||
const root = createRoot(document.getElementById("root")!); | ||
root.render( | ||
<StrictMode> |
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.
strict mode is not needed yet.
darkMode: ["class"], | ||
content: ["./index.html", "./src/**/*.{html,js,jsx}"], | ||
darkMode: ["class"], | ||
content: ["./index.html", "./src/**/*.{js,ts,jsx,tsx}"], |
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.
why remove html?
proxy: { | ||
"/api": { | ||
target: "http://localhost:3001", | ||
target: "http://localhost:8000/", |
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.
why change port?
// https://vite.dev/config/ | ||
export default defineConfig({ | ||
plugins: [react(), TanStackRouterVite()], | ||
plugins: [TanStackRouterVite({ autoCodeSplitting: true }), react()], |
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.
I think this sequence break build. Can you test it?
This PR introduces TypeScript to the frontend and backend, and refactors the server for better organization.
Key changes:
Frontend (React/Vite):
.js
/.jsx
components to.tsx
.Backend (Express):
server
folder.These changes improve code maintainability, developer experience, and pave the way for future features.