Skip to content

Feat/fix partials#13

Merged
sumdahl merged 2 commits into
mainfrom
feat/fix-partials
May 13, 2026
Merged

Feat/fix partials#13
sumdahl merged 2 commits into
mainfrom
feat/fix-partials

Conversation

@sumdahl

@sumdahl sumdahl commented May 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 13, 2026 05:31
@sumdahl
sumdahl merged commit 5bfe80d into main May 13, 2026
2 checks passed
@sumdahl
sumdahl deleted the feat/fix-partials branch May 13, 2026 05:32

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens async behavior across the persistence layer and auth use-cases, and adds a dedicated TypeScript typecheck script/dependency to support static validation in the Bun-based server codebase.

Changes:

  • Make several repository save/delete/update methods explicitly await Drizzle operations inside withDbError callbacks to align return types with Promise<void>.
  • Change forgot-password and resend-verification use-cases to await email sending with try/catch (instead of fire-and-forget .catch).
  • Add a typecheck script and add typescript to devDependencies (and lockfile).

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/server/infrastructure/persistence/verification-token.pg.repository.ts Ensure delete operations resolve to Promise<void> under withDbError.
src/server/infrastructure/persistence/user.pg.repository.ts Ensure update/delete operations resolve to Promise<void> under withDbError.
src/server/infrastructure/persistence/token.pg.repository.ts Ensure insert/delete operations are awaited to match Promise<void> contracts.
src/server/infrastructure/persistence/role.pg.repository.ts Ensure role assignment/removal resolves to Promise<void> under withDbError.
src/server/infrastructure/persistence/password-reset-token.pg.repository.ts Ensure insert/delete operations are awaited to match Promise<void> contracts.
src/server/core/use-cases/auth/resend-verification.ts Await verification email send with try/catch instead of fire-and-forget.
src/server/core/use-cases/auth/forgot-password.ts Await password reset email send with try/catch instead of fire-and-forget.
package.json Add typecheck script and add TypeScript devDependency.
bun.lock Lockfile update for the new TypeScript dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +50 to +58
try {
await this.emailService.sendVerificationEmail(user.email, user.name, token);
} catch (err) {
console.error(
"[ResendVerificationUseCase] Failed to send verification email to:",
user.email,
err,
);
}
Comment on lines +40 to +48
try {
await this.emailService.sendPasswordResetEmail(user.email, user.name, token);
} catch (err) {
console.error(
"[ForgotPasswordUseCase] Failed to send password reset email to:",
user.email,
err,
);
}
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.

2 participants