Skip to content

✨ chore: update express types and clean up unused type dependencies#14

Open
iamkabelomoobi wants to merge 2 commits intotestfrom
chore/fix-server-typescript-type-resolution
Open

✨ chore: update express types and clean up unused type dependencies#14
iamkabelomoobi wants to merge 2 commits intotestfrom
chore/fix-server-typescript-type-resolution

Conversation

@iamkabelomoobi
Copy link
Copy Markdown
Owner

@iamkabelomoobi iamkabelomoobi commented Feb 25, 2026

Summary by Sourcery

Update server dependencies and Node.js engine requirements across the workspace.

Build:

  • Upgrade @types/express to v5 in the server app and remove unused type dependencies.
  • Update the workspace Node.js engine requirement to 20.x in the root package configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 25, 2026

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

Project Deployment Actions Updated (UTC)
talentry-server Error Error Feb 25, 2026 11:16am
talentry-web Error Error Feb 25, 2026 11:16am

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Feb 25, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates 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

Change Details Files
Update Express type definitions for the server app to the latest major version.
  • Add @types/express as a runtime dependency aligned with Express usage in the server app
  • Remove the older @types/express entry from devDependencies to avoid duplicate and conflicting type versions
apps/server/package.json
yarn.lock
Remove unused type-only dependencies from the server app to simplify the dependency graph.
  • Delete @types/ip, @types/node, @types/nodemailer, and @types/pg from devDependencies where they are no longer needed
  • Rely on other existing workspace or transitive type definitions where applicable
apps/server/package.json
yarn.lock
Tighten the Node.js engine requirement for the monorepo to Node 20.x.
  • Change engines.node from a generic '>=18' range to '20.x' to standardize on a specific major runtime version
package.json

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread apps/server/package.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant