main currently does not typecheck: apps/api/src/lib/auth.ts has unresolved merge conflict markers committed into it.
Reproduce
git clone https://github.com/oblien/openship && cd openship
bun install
bun run lint
src/lib/auth.ts(418,1): error TS1185: Merge conflict marker encountered.
src/lib/auth.ts(420,1): error TS1185: Merge conflict marker encountered.
src/lib/auth.ts(428,1): error TS1185: Merge conflict marker encountered.
The markers are in the emailOTP plugin's sendVerificationOTP, on the email-verification branch:
if (type === "email-verification") {
const tmpl = verifyOtpEmailTemplate(otp, { expiresMinutes: 10 });
<<<<<<< HEAD
await sendMail({ to: email, ...tmpl });
=======
if (!(await sendMail({ to: email, ...tmpl }))) {
throw new APIError("SERVICE_UNAVAILABLE", { ... });
}
>>>>>>> a52e2566 (patch v0.6.6)
return;
}
Impact
bun run lint fails (3 errors).
bun run test in @repo/api: 48 test files fail to load. esbuild cannot parse the file, so every test that transitively imports auth.ts — via src/middleware/auth.ts and up — dies at transform time. With the markers removed the same suite is 354/355 files and 4158 tests passing.
- Anything that bundles the API is broken, so this blocks a build from a clean checkout.
packages/core is unaffected.
Where it came from
74ec3f72 ("patch v0.6.6") introduced it — its parent f9a17fc5 is clean, so this is a fresh regression, not long-standing. It reached main through #586, and is also still on mail/562-fixes-and-inbound-foundation. No tag contains it.
Worth flagging separately: #586's checks were red when it merged — Typecheck fail and Test fail, with only Test webmail server green (run 31834622029). CI caught this exactly as designed; the merge went in over it. Whatever the fix here, the branch protection gap is the thing that let a non-compiling main happen, and it will happen again as-is.
The referenced hash a52e2566 does not exist in the repository, which fits a local rebase/merge that was resolved-by-committing-the-markers and pushed.
Fix
Keep the >>>>>>> side — fail loudly. That matches the forget-password branch immediately below it in the same function, which already checks sendMail's result and throws SERVICE_UNAVAILABLE, and the comment there spells out the reasoning: being told to check your inbox for a code that was never sent is worse than an error. The HEAD side (fire-and-forget) is the older behavior that v0.6.6 was in the middle of replacing.
PR follows.
maincurrently does not typecheck:apps/api/src/lib/auth.tshas unresolved merge conflict markers committed into it.Reproduce
The markers are in the
emailOTPplugin'ssendVerificationOTP, on theemail-verificationbranch:Impact
bun run lintfails (3 errors).bun run testin@repo/api: 48 test files fail to load. esbuild cannot parse the file, so every test that transitively importsauth.ts— viasrc/middleware/auth.tsand up — dies at transform time. With the markers removed the same suite is 354/355 files and 4158 tests passing.packages/coreis unaffected.Where it came from
74ec3f72("patch v0.6.6") introduced it — its parentf9a17fc5is clean, so this is a fresh regression, not long-standing. It reachedmainthrough #586, and is also still onmail/562-fixes-and-inbound-foundation. No tag contains it.Worth flagging separately: #586's checks were red when it merged —
Typecheckfail andTestfail, with onlyTest webmail servergreen (run 31834622029). CI caught this exactly as designed; the merge went in over it. Whatever the fix here, the branch protection gap is the thing that let a non-compilingmainhappen, and it will happen again as-is.The referenced hash
a52e2566does not exist in the repository, which fits a local rebase/merge that was resolved-by-committing-the-markers and pushed.Fix
Keep the
>>>>>>>side — fail loudly. That matches theforget-passwordbranch immediately below it in the same function, which already checkssendMail's result and throwsSERVICE_UNAVAILABLE, and the comment there spells out the reasoning: being told to check your inbox for a code that was never sent is worse than an error. TheHEADside (fire-and-forget) is the older behavior thatv0.6.6was in the middle of replacing.PR follows.