Skip to content

Commit dbf512e

Browse files
authored
update most dependencies (#749)
With the exception of react-email (resend/react-email#1486)
1 parent 7923be9 commit dbf512e

File tree

13 files changed

+6063
-3517
lines changed

13 files changed

+6063
-3517
lines changed

app/components/ui/input-otp.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ const InputOTPSlot = React.forwardRef<
3232
React.ComponentPropsWithoutRef<'div'> & { index: number }
3333
>(({ index, className, ...props }, ref) => {
3434
const inputOTPContext = React.useContext(OTPInputContext)
35-
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]
35+
const slot = inputOTPContext.slots[index]
36+
if (!slot) throw new Error('Invalid slot index')
37+
const { char, hasFakeCaret, isActive } = slot
3638

3739
return (
3840
<div

app/utils/cache.server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export const cache: CachifiedCache = {
100100
return { metadata, value }
101101
},
102102
async set(key, entry) {
103-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
104103
const { currentIsPrimary, primaryInstance } = await getInstanceInfo()
105104
if (currentIsPrimary) {
106105
cacheDb

app/utils/monitoring.client.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import { useLocation, useMatches } from '@remix-run/react'
2-
import * as Sentry from '@sentry/remix'
2+
import {
3+
init as sentryInit,
4+
browserTracingIntegration,
5+
replayIntegration,
6+
browserProfilingIntegration,
7+
} from '@sentry/remix'
38
import { useEffect } from 'react'
49

510
export function init() {
6-
Sentry.init({
11+
sentryInit({
712
dsn: ENV.SENTRY_DSN,
813
environment: ENV.MODE,
914
beforeSend(event) {
@@ -20,16 +25,13 @@ export function init() {
2025
return event
2126
},
2227
integrations: [
23-
new Sentry.BrowserTracing({
24-
routingInstrumentation: Sentry.remixRouterInstrumentation(
25-
useEffect,
26-
useLocation,
27-
useMatches,
28-
),
28+
browserTracingIntegration({
29+
useEffect,
30+
useLocation,
31+
useMatches,
2932
}),
30-
// Replay is only available in the client
31-
new Sentry.Replay(),
32-
new Sentry.BrowserProfilingIntegration(),
33+
replayIntegration(),
34+
browserProfilingIntegration(),
3335
],
3436

3537
// Set tracesSampleRate to 1.0 to capture 100%

app/utils/monitoring.server.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { ProfilingIntegration } from '@sentry/profiling-node'
2-
import * as Sentry from '@sentry/remix'
3-
import { prisma } from './db.server.ts'
1+
import { nodeProfilingIntegration } from '@sentry/profiling-node'
2+
import Sentry from '@sentry/remix'
43

54
export function init() {
65
Sentry.init({
@@ -18,9 +17,9 @@ export function init() {
1817
/\/site\.webmanifest/,
1918
],
2019
integrations: [
21-
new Sentry.Integrations.Http({ tracing: true }),
22-
new Sentry.Integrations.Prisma({ client: prisma }),
23-
new ProfilingIntegration(),
20+
Sentry.httpIntegration(),
21+
Sentry.prismaIntegration(),
22+
nodeProfilingIntegration(),
2423
],
2524
tracesSampler(samplingContext) {
2625
// ignore healthcheck transactions by other services (consul, etc.)

app/utils/providers/github.server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export class GitHubProvider implements AuthProvider {
3030
callbackURL: '/auth/github/callback',
3131
},
3232
async ({ profile }) => {
33-
const email = profile.emails[0].value.trim().toLowerCase()
33+
const email = profile.emails[0]?.value.trim().toLowerCase()
34+
if (!email) {
35+
throw new Error('Email not found')
36+
}
3437
const username = profile.displayName
3538
const imageUrl = profile.photos[0].value
3639
return {

app/utils/timing.server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function createTimer(type: string, desc?: string) {
3030
let timingType = timings[type]
3131

3232
if (!timingType) {
33-
// eslint-disable-next-line no-multi-assign
3433
timingType = timings[type] = []
3534
}
3635
timingType.push({ desc, time: performance.now() - start })

0 commit comments

Comments
 (0)