Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint: fix await-thenable warnings
Remove unnecessary await on serializeEnvelope (returns sync value).
Suppress remaining await-thenable in cron callbacks and server action
instrumentation where callbacks may be async at runtime despite types.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
logaretm and claude committed Mar 10, 2026
commit e9534787faa8983642af4e5654c7045edf93bcec
4 changes: 2 additions & 2 deletions packages/browser/src/transports/offline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ function createIndexedDbStore(options: BrowserOfflineTransportOptions): OfflineS
return {
push: async (env: Envelope) => {
try {
const serialized = await serializeEnvelope(env);
const serialized = serializeEnvelope(env);
await push(getStore(), serialized, options.maxQueueSize || 30);
} catch {
//
}
},
unshift: async (env: Envelope) => {
try {
const serialized = await serializeEnvelope(env);
const serialized = serializeEnvelope(env);
await unshift(getStore(), serialized, options.maxQueueSize || 30);
} catch {
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ async function withServerActionInstrumentationImplementation<A extends (...args:
},
},
async span => {
// oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime
const result = await handleCallbackErrors(callback, error => {
if (isNotFoundNavigationError(error)) {
// We don't want to report "not-found"s
Expand Down
1 change: 1 addition & 0 deletions packages/node-core/src/cron/node-cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function instrumentNodeCron<T>(
// We have to manually catch here and capture the exception because node-cron swallows errors
// https://github.com/node-cron/node-cron/issues/399
try {
// oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime
return await callback(...args);
} catch (e) {
captureException(e, {
Expand Down
1 change: 1 addition & 0 deletions packages/node-core/src/cron/node-schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export function instrumentNodeSchedule<T>(lib: T & NodeSchedule): T {
return withMonitor(
monitorSlug,
async () => {
// oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime
await callback?.();
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export async function withServerActionInstrumentation<A extends (...args: unknow
},
},
async span => {
// oxlint-disable-next-line typescript/await-thenable -- callback may be async at runtime
const result = await handleCallbackErrors(callback, error => {
if (!isRedirect(error)) {
span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });
Expand Down
1 change: 1 addition & 0 deletions packages/sveltekit/src/vite/sourceMaps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export async function makeCustomSentryVitePlugins(

const { debug } = mergedOptions;

// oxlint-disable-next-line typescript/await-thenable -- sentryVitePlugin may return a Promise in some versions
const sentryPlugins: Plugin[] = await sentryVitePlugin(mergedOptions);

// In @sentry/vite-plugin v5, all functionality is consolidated into a single 'sentry-vite-plugin'.
Expand Down