Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"typescript/no-redundant-type-constituents": "off",
"typescript/restrict-template-expressions": "off",
"typescript/await-thenable": "warn",
"typescript/no-base-to-string": "warn"
"typescript/no-base-to-string": "off"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ async function getMeasurements(instrumentFile, autocannonCommand = 'yarn test:ge
await killAppProcess();
return result;
} catch (error) {
//oxlint-disable-next-line restrict-template-expressions
log(`Error running autocannon: ${error}`);
await killAppProcess();
throw error;
Expand Down
2 changes: 1 addition & 1 deletion packages/effect/test/layer.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, expect, it } from '@effect/vitest';
import * as sentryCore from '@sentry/core';
import { getClient, getCurrentScope, getIsolationScope, SDK_VERSION, SentrySpan } from '@sentry/core';
import { getClient, getCurrentScope, getIsolationScope, SDK_VERSION } from '@sentry/core';
import { Effect, Layer, Logger, LogLevel } from 'effect';
import { afterEach, beforeEach, vi } from 'vitest';
import * as sentryClient from '../src/index.client';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ describe('dropMiddlewareTunnelRequests', () => {
describe('skipOpenTelemetrySetup', () => {
it('does not process spans when skipOpenTelemetrySetup is true', async () => {
const core = await import('@sentry/core');
const originalGetClient = core.getClient;
vi.spyOn(core, 'getClient').mockReturnValueOnce({
getOptions: () => ({ skipOpenTelemetrySetup: true }),
} as any);
Expand Down
2 changes: 1 addition & 1 deletion packages/node-core/src/integrations/systemError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const systemErrorIntegration = defineIntegration((options: Options = {})
const error = hint.originalException;

const errorContext: SystemErrorContext = {
...error,
...(error as SystemErrorContext),
};

if (!client.getOptions().sendDefaultPii && options.includePaths !== true) {
Expand Down
3 changes: 1 addition & 2 deletions packages/nuxt/src/vite/sentryVitePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import type { Nuxt } from '@nuxt/schema';
import { sentryVitePlugin } from '@sentry/vite-plugin';
import type { ConfigEnv, Plugin, UserConfig } from 'vite';
import type { SentryNuxtModuleOptions } from '../common/types';
import { extractNuxtSourceMapSetting, getPluginOptions, validateDifferentSourceMapSettings } from './sourceMaps';
import { extractNuxtSourceMapSetting, validateDifferentSourceMapSettings } from './sourceMaps';

/**
* Creates a Vite plugin that adds the Sentry Vite plugin and validates source map settings.
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/test/vite/sourceMaps-nuxtHooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('setupSourceMaps hooks', () => {
it.each([
{ label: 'server (SSR) build', buildConfig: { build: { ssr: true }, plugins: [] } },
{ label: 'client build', buildConfig: { build: { ssr: false }, plugins: [] } },
])('adds sentry vite plugin to vite config for $label in production', async ({ buildConfig }) => {
])('adds sentry vite plugin to vite config for $label in production', async () => {
const { setupSourceMaps } = await import('../../src/vite/sourceMaps');
const mockNuxt = createMockNuxt({ _prepare: false, dev: false });
const { mockAddVitePlugin, getCapturedPlugins } = createMockAddVitePlugin();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type { Span } from '@sentry/core';
import { debug, getTraceData, isNodeEnv } from '@sentry/core';
import { DEBUG_BUILD } from '../utils/debug-build';
import { isCloudflareEnv } from '../utils/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { getActiveSpan, getTraceData, isNodeEnv, spanToBaggageHeader, spanToTraceHeader } from '@sentry/core';
import { getActiveSpan, getTraceData, isNodeEnv } from '@sentry/core';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import {
generateSentryServerTimingHeader,
injectServerTimingHeaderValue,
} from '../../src/server/serverTimingTracePropagation';
import type { Span } from '@sentry/core';

const mockSpan = {
spanId: 'test-span-id',
spanContext: () => ({ traceId: '12345678901234567890123456789012' }),
};
} as unknown as Span;
const mockRootSpan = {
spanId: 'root-span-id',
spanContext: () => ({ traceId: '12345678901234567890123456789012' }),
Expand Down
10 changes: 4 additions & 6 deletions packages/replay-internal/src/eventBuffer/EventBufferArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,10 @@ export class EventBufferArray implements EventBuffer {

/** @inheritdoc */
public getEarliestTimestamp(): number | null {
const timestamp = this.events.map(event => event.timestamp).sort()[0];

if (!timestamp) {
return null;
let ts: number | null = null;
for (const { timestamp } of this.events) {
if (ts === null || timestamp < ts) ts = timestamp;
}

return timestampToMs(timestamp);
return ts === null ? ts : timestampToMs(ts);
}
}
Loading