mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 06:09:08 +03:00
chore(studio): silence ratchet on TanStack-only files
`routes/__root.tsx` and `compat/next/*` exist only on the TanStack side so they're net-new vs master's ratchet baseline. Type the Sentry event-id attachment in the global error boundary (no more `as any`) and mark each compat shim's `export default` with `no-restricted-exports` disable directives — the defaults match Next's module shape, which is the whole point of the shim. Also declare STUDIO_FRAMEWORK in apps/studio/turbo.jsonc so the turbo env lint stops failing on `api/server.js` / `vercel.ts` / `scripts/dispatch.js`.
This commit is contained in:
1 parent
1ff10184c5
commit
251f9edafc
9 files changed
+12
-2
No files matched your search
@@ -25,6 +25,7 @@ function isDefaultExport<P>(
|
||||
}
|
||||
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default function dynamic<P extends object = {}>(
|
||||
loader: Loader<P>,
|
||||
options: DynamicOptions = {}
|
||||
|
||||
@@ -25,6 +25,7 @@ import type { ReactNode } from 'react'
|
||||
// We have no such consumers today; if one shows up, swap to a
|
||||
// portal+SSR-collector setup.
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default function Head({ children }: { children?: ReactNode }) {
|
||||
return <>{children}</>
|
||||
}
|
||||
@@ -144,4 +144,5 @@ const Image = forwardRef(function Image(
|
||||
)
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default Image
|
||||
@@ -140,4 +140,5 @@ const Image = forwardRef(function Image(
|
||||
)
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default Image
|
||||
@@ -246,4 +246,5 @@ const Link = forwardRef(function Link(
|
||||
)
|
||||
})
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default Link
|
||||
@@ -261,4 +261,5 @@ const singletonRouter = {
|
||||
},
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default singletonRouter
|
||||
@@ -20,6 +20,7 @@ interface ScriptProps extends Omit<ComponentPropsWithoutRef<'script'>, 'children
|
||||
onError?: (e: Event | string) => void
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-restricted-exports
|
||||
export default function Script({
|
||||
strategy: _strategy,
|
||||
children,
|
||||
|
||||
@@ -242,7 +242,7 @@ const errorBoundaryHandler = (error: Error, info: ErrorInfo) => {
|
||||
const eventId = Sentry.captureException(error)
|
||||
// Attach the Sentry event ID to the error object so it can be accessed by the error boundary
|
||||
if (eventId && error && typeof error === 'object') {
|
||||
;(error as any).sentryId = eventId
|
||||
;(error as Error & { sentryId?: string }).sentryId = eventId
|
||||
}
|
||||
})
|
||||
|
||||
@@ -263,7 +263,7 @@ function ErrorBoundaryRoute({ error }: { error: Error }) {
|
||||
scope.setTag('routerErrorComponent', true)
|
||||
const eventId = Sentry.captureException(error)
|
||||
if (eventId && error && typeof error === 'object') {
|
||||
;(error as any).sentryId = eventId
|
||||
;(error as Error & { sentryId?: string }).sentryId = eventId
|
||||
}
|
||||
})
|
||||
console.error(error.stack)
|
||||
|
||||
@@ -109,6 +109,9 @@
|
||||
// Declared here so the studio-package turbo env lint rule passes
|
||||
// even though turbo doesn't directly drive `start`.
|
||||
"PORT",
|
||||
// Gates the TanStack vs Next path in api/server.js, vercel.ts,
|
||||
// and scripts/dispatch.js (the dev/build/start dispatcher).
|
||||
"STUDIO_FRAMEWORK",
|
||||
],
|
||||
"passThroughEnv": [
|
||||
"CURRENT_CLI_VERSION",
|
||||
|
||||
Reference in new issue
Block a user