✨ chore: update express types and clean up unused type dependencies#14
Open
iamkabelomoobi wants to merge 2 commits intotestfrom
Open
✨ chore: update express types and clean up unused type dependencies#14iamkabelomoobi wants to merge 2 commits intotestfrom
iamkabelomoobi wants to merge 2 commits intotestfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's guide (collapsed on small PRs)Reviewer's GuideUpdates Express type definitions to v5 for the server app, removes several unused type-only dependencies, and tightens the required Node.js engine to v20 for the monorepo. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The upgrade to
@types/express@5while keepingexpress@4.18.2is likely to cause type mismatches, since the v5 types target the unreleased Express 5 API; consider staying on the latest v4 types or upgrading the runtime to match. - Changing the Node engine from
>=18to20.xsignificantly narrows the supported runtime; if the intent is to require Node 20, consider using a range like>=20(or documenting the constraint elsewhere) rather than pinning to a single major.minor line.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The upgrade to `@types/express@5` while keeping `express@4.18.2` is likely to cause type mismatches, since the v5 types target the unreleased Express 5 API; consider staying on the latest v4 types or upgrading the runtime to match.
- Changing the Node engine from `>=18` to `20.x` significantly narrows the supported runtime; if the intent is to require Node 20, consider using a range like `>=20` (or documenting the constraint elsewhere) rather than pinning to a single major.minor line.
## Individual Comments
### Comment 1
<location path="apps/server/package.json" line_range="27-30" />
<code_context>
"@logtail/winston": "^0.5.6",
"@prisma/adapter-pg": "^7.4.1",
"@prisma/client": "^7.4.1",
+ "@types/express": "^5.0.6",
"better-auth": "^1.4.18",
"dotenv": "^17.3.1",
</code_context>
<issue_to_address>
**suggestion:** Using different major versions of `@types/express` between dependencies and devDependencies can cause type resolution conflicts.
Previously, `devDependencies` referenced `@types/express@^4` while `dependencies` now add `@types/express@^5`. If any v4 references or lockfile entries remain, you can get confusing TS errors from both versions being hoisted. Please ensure the repo and lockfile consistently use a single major version of `@types/express` (preferably v5).
Suggested implementation:
```
"@repo/typescript-config": "*",
"@types/express": "^5.0.6",
"eslint": "^8.57.0",
```
1. Run your package manager’s install command (e.g. `pnpm install`, `yarn install`, or `npm install`) to update the lockfile so that only `@types/express@^5` is resolved.
2. If `@types/express` appears multiple times within the same `dependencies` or `devDependencies` object in the full `package.json`, remove any duplicate entries so there is only a single `@types/express` key.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Update server dependencies and Node.js engine requirements across the workspace.
Build: