Skip to content

Commit 27f6ae1

Browse files
authored
build: enable biome organizeImports feature (#9693)
1 parent 462ea44 commit 27f6ae1

File tree

403 files changed

+580
-580
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

403 files changed

+580
-580
lines changed

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"useIgnoreFile": true
77
},
88
"organizeImports": {
9-
"enabled": false
9+
"enabled": true
1010
},
1111
"linter": {
1212
"enabled": false

packages/angular-ivy/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { VERSION } from '@angular/core';
22
import type { BrowserOptions } from '@sentry/browser';
3-
import { defaultIntegrations, init as browserInit, SDK_VERSION, setContext } from '@sentry/browser';
3+
import { SDK_VERSION, defaultIntegrations, init as browserInit, setContext } from '@sentry/browser';
44
import type { SdkMetadata } from '@sentry/types';
55
import { logger } from '@sentry/utils';
66

packages/angular/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { VERSION } from '@angular/core';
22
import type { BrowserOptions } from '@sentry/browser';
3-
import { defaultIntegrations, init as browserInit, SDK_VERSION, setContext } from '@sentry/browser';
3+
import { SDK_VERSION, defaultIntegrations, init as browserInit, setContext } from '@sentry/browser';
44
import type { SdkMetadata } from '@sentry/types';
55
import { logger } from '@sentry/utils';
66

packages/angular/src/tracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { ActivatedRouteSnapshot, Event, RouterState } from '@angular/router
77
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
88
import { NavigationCancel, NavigationError, Router } from '@angular/router';
99
import { NavigationEnd, NavigationStart, ResolveEnd } from '@angular/router';
10-
import { getCurrentHub, WINDOW } from '@sentry/browser';
10+
import { WINDOW, getCurrentHub } from '@sentry/browser';
1111
import type { Span, Transaction, TransactionContext } from '@sentry/types';
1212
import { logger, stripUrlQueryAndFragment, timestampInSeconds } from '@sentry/utils';
1313
import type { Observable } from 'rxjs';

packages/angular/test/errorhandler.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { HttpErrorResponse } from '@angular/common/http';
22
import * as SentryBrowser from '@sentry/browser';
33
import type { Client, Event } from '@sentry/types';
44

5-
import { createErrorHandler, SentryErrorHandler } from '../src/errorhandler';
5+
import { SentryErrorHandler, createErrorHandler } from '../src/errorhandler';
66

77
const captureExceptionSpy = jest.spyOn(SentryBrowser, 'captureException');
88

packages/angular/test/ivy-synced.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as fs from 'fs';
2-
import * as glob from 'glob';
32
import * as path from 'path';
3+
import * as glob from 'glob';
44

55
describe('@sentry/angular-ivy', () => {
66
/*

packages/angular/test/tracing.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component } from '@angular/core';
22
import type { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot } from '@angular/router';
33
import type { Hub } from '@sentry/types';
44

5-
import { instrumentAngularRouting, TraceClassDecorator, TraceDirective, TraceMethodDecorator } from '../src';
5+
import { TraceClassDecorator, TraceDirective, TraceMethodDecorator, instrumentAngularRouting } from '../src';
66
import { getParameterizedRouteFromSnapshot } from '../src/tracing';
77
import { AppComponent, TestEnv } from './utils/index';
88

packages/angular/test/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Router } from '@angular/router';
77
import { RouterTestingModule } from '@angular/router/testing';
88
import type { Transaction } from '@sentry/types';
99

10-
import { instrumentAngularRouting, TraceService } from '../../src';
10+
import { TraceService, instrumentAngularRouting } from '../../src';
1111

1212
@Component({
1313
template: '<router-outlet></router-outlet>',

packages/astro/scripts/syncIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
import * as fse from 'fs-extra';
43
import * as path from 'path';
4+
import * as fse from 'fs-extra';
55

66
const buildDir = path.resolve('build');
77
const srcIntegrationDir = path.resolve(path.join('src', 'integration'));

packages/astro/src/integration/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import * as fs from 'fs';
2+
import * as path from 'path';
13
/* eslint-disable no-console */
24
import { sentryVitePlugin } from '@sentry/vite-plugin';
35
import type { AstroConfig, AstroIntegration } from 'astro';
4-
import * as fs from 'fs';
5-
import * as path from 'path';
66

77
import { buildClientSnippet, buildSdkInitFileImportSnippet, buildServerSnippet } from './snippets';
88
import type { SentryOptions } from './types';

packages/astro/src/server/meta.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { getDynamicSamplingContextFromClient } from '@sentry/core';
22
import type { Hub, Span } from '@sentry/types';
33
import {
4+
TRACEPARENT_REGEXP,
45
dynamicSamplingContextToSentryBaggageHeader,
56
generateSentryTraceHeader,
67
logger,
7-
TRACEPARENT_REGEXP,
88
} from '@sentry/utils';
99

1010
/**

packages/astro/test/client/sdk.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { BrowserClient } from '@sentry/browser';
22
import * as SentryBrowser from '@sentry/browser';
3-
import { BrowserTracing, getClient, getCurrentHub, SDK_VERSION, WINDOW } from '@sentry/browser';
3+
import { BrowserTracing, SDK_VERSION, WINDOW, getClient, getCurrentHub } from '@sentry/browser';
44
import { vi } from 'vitest';
55

66
import { init } from '../../../astro/src/client/sdk';

packages/browser-integration-tests/loader-suites/loader/noOnLoad/sdkLoadedInMeanwhile/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { expect } from '@playwright/test';
21
import fs from 'fs';
32
import path from 'path';
3+
import { expect } from '@playwright/test';
44

5-
import { sentryTest, TEST_HOST } from '../../../../utils/fixtures';
5+
import { TEST_HOST, sentryTest } from '../../../../utils/fixtures';
66
import { LOADER_CONFIGS } from '../../../../utils/generatePlugin';
77
import { envelopeRequestParser, waitForErrorRequestOnUrl } from '../../../../utils/helpers';
88

packages/browser-integration-tests/scripts/detectFlakyTests.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import * as glob from 'glob';
2-
import * as path from 'path';
31
import * as childProcess from 'child_process';
2+
import * as path from 'path';
3+
import * as glob from 'glob';
44

55
async function run(): Promise<void> {
66
let testPaths: string[] = [];

packages/browser-integration-tests/suites/feedback/captureFeedback/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as Sentry from '@sentry/browser';
21
import { Feedback } from '@sentry-internal/feedback';
2+
import * as Sentry from '@sentry/browser';
33

44
window.Sentry = Sentry;
55

packages/browser-integration-tests/suites/feedback/captureFeedbackAndReplay/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import * as Sentry from '@sentry/browser';
21
import { Feedback } from '@sentry-internal/feedback';
2+
import * as Sentry from '@sentry/browser';
33

44
window.Sentry = Sentry;
55

packages/browser-integration-tests/suites/manual-client/browser-context/init.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import {
2-
BrowserClient,
32
Breadcrumbs,
3+
BrowserClient,
44
Dedupe,
55
FunctionToString,
66
HttpContext,
7+
Hub,
78
InboundFilters,
89
LinkedErrors,
910
defaultStackParser,
1011
makeFetchTransport,
11-
Hub,
1212
} from '@sentry/browser';
1313

1414
const integrations = [

packages/browser-integration-tests/suites/replay/compressionWorkerUrl/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { expect } from '@playwright/test';
21
import fs from 'fs';
32
import path from 'path';
3+
import { expect } from '@playwright/test';
44

5-
import { sentryTest, TEST_HOST } from '../../../utils/fixtures';
5+
import { TEST_HOST, sentryTest } from '../../../utils/fixtures';
66
import { getExpectedReplayEvent } from '../../../utils/replayEventTemplates';
77
import {
88
getFullRecordingSnapshots,

packages/browser-integration-tests/suites/replay/errorResponse/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { expect } from '@playwright/test';
22

33
import { sentryTest } from '../../../utils/fixtures';
44
import {
5-
getReplaySnapshot,
65
REPLAY_DEFAULT_FLUSH_MAX_DELAY,
6+
getReplaySnapshot,
77
shouldSkipReplayTest,
88
waitForReplayRequest,
99
} from '../../../utils/replayHelpers';

packages/browser-integration-tests/suites/replay/eventBufferError/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { expect } from '@playwright/test';
33
import { sentryTest } from '../../../utils/fixtures';
44
import { envelopeRequestParser } from '../../../utils/helpers';
55
import {
6+
REPLAY_DEFAULT_FLUSH_MAX_DELAY,
67
getDecompressedRecordingEvents,
78
getReplaySnapshot,
89
isCustomSnapshot,
910
isReplayEvent,
10-
REPLAY_DEFAULT_FLUSH_MAX_DELAY,
1111
shouldSkipReplayTest,
1212
waitForReplayRequest,
1313
} from '../../../utils/replayHelpers';

packages/browser-integration-tests/suites/wasm/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { expect } from '@playwright/test';
21
import fs from 'fs';
32
import path from 'path';
3+
import { expect } from '@playwright/test';
44

55
import { sentryTest } from '../../utils/fixtures';
66
import { shouldSkipWASMTests } from '../../utils/wasmHelpers';

packages/browser-integration-tests/utils/fixtures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/* eslint-disable no-empty-pattern */
2-
import { test as base } from '@playwright/test';
31
import fs from 'fs';
42
import path from 'path';
3+
/* eslint-disable no-empty-pattern */
4+
import { test as base } from '@playwright/test';
55

66
import { generatePage } from './generatePage';
77

packages/browser-integration-tests/utils/generatePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import type { Package } from '@sentry/types';
21
import fs from 'fs';
3-
import HtmlWebpackPlugin, { createHtmlTagObject } from 'html-webpack-plugin';
42
import path from 'path';
3+
import type { Package } from '@sentry/types';
4+
import HtmlWebpackPlugin, { createHtmlTagObject } from 'html-webpack-plugin';
55
import type { Compiler } from 'webpack';
66

77
import { addStaticAsset, addStaticAssetSymlink } from './staticAssets';

packages/browser/src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { captureException, withScope } from '@sentry/core';
22
import type { DsnLike, Mechanism, WrappedFunction } from '@sentry/types';
33
import {
4+
GLOBAL_OBJ,
45
addExceptionMechanism,
56
addExceptionTypeValue,
67
addNonEnumerableProperty,
78
getOriginalFunction,
8-
GLOBAL_OBJ,
99
markFunctionWrapped,
1010
} from '@sentry/utils';
1111

packages/browser/src/index.bundle.replay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This is exported so the loader does not fail when switching off Replay/Tracing
2-
import { addTracingExtensions, BrowserTracing } from '@sentry-internal/integration-shims';
2+
import { BrowserTracing, addTracingExtensions } from '@sentry-internal/integration-shims';
33
import { Replay } from '@sentry/replay';
44

55
import * as Sentry from './index.bundle.base';

packages/browser/src/index.bundle.tracing.replay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addExtensionMethods, BrowserTracing, Span } from '@sentry-internal/tracing';
1+
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing';
22
import { Replay } from '@sentry/replay';
33

44
import * as Sentry from './index.bundle.base';

packages/browser/src/index.bundle.tracing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is exported so the loader does not fail when switching off Replay
22
import { Replay } from '@sentry-internal/integration-shims';
3-
import { addExtensionMethods, BrowserTracing, Span } from '@sentry-internal/tracing';
3+
import { BrowserTracing, Span, addExtensionMethods } from '@sentry-internal/tracing';
44

55
import * as Sentry from './index.bundle.base';
66

packages/browser/src/index.bundle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// This is exported so the loader does not fail when switching off Replay/Tracing
2-
import { addTracingExtensions, BrowserTracing, Replay } from '@sentry-internal/integration-shims';
2+
import { BrowserTracing, Replay, addTracingExtensions } from '@sentry-internal/integration-shims';
33

44
import * as Sentry from './index.bundle.base';
55

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import type {
1616
XhrBreadcrumbHint,
1717
} from '@sentry/types/build/types/breadcrumb';
1818
import {
19+
SENTRY_XHR_DATA_KEY,
1920
addClickKeypressInstrumentationHandler,
2021
addConsoleInstrumentationHandler,
2122
addFetchInstrumentationHandler,
@@ -26,7 +27,6 @@ import {
2627
logger,
2728
parseUrl,
2829
safeJoin,
29-
SENTRY_XHR_DATA_KEY,
3030
severityLevelFromString,
3131
} from '@sentry/utils';
3232

packages/browser/src/profiling/hubextensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { DEBUG_BUILD } from '../debug-build';
66
import { WINDOW } from '../helpers';
77
import type { JSSelfProfile } from './jsSelfProfiling';
88
import {
9+
MAX_PROFILE_DURATION_MS,
910
addProfileToGlobalCache,
1011
isAutomatedPageLoadTransaction,
11-
MAX_PROFILE_DURATION_MS,
1212
shouldProfileTransaction,
1313
startJSSelfProfile,
1414
} from './utils';

packages/browser/src/profiling/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import { DEFAULT_ENVIRONMENT, getCurrentHub } from '@sentry/core';
44
import type { DebugImage, Envelope, Event, StackFrame, StackParser, Transaction } from '@sentry/types';
55
import type { Profile, ThreadCpuProfile } from '@sentry/types/src/profiling';
6-
import { browserPerformanceTimeOrigin, forEachEnvelopeItem, GLOBAL_OBJ, logger, uuid4 } from '@sentry/utils';
6+
import { GLOBAL_OBJ, browserPerformanceTimeOrigin, forEachEnvelopeItem, logger, uuid4 } from '@sentry/utils';
77

88
import { DEBUG_BUILD } from '../debug-build';
99
import { getClient } from '../exports';
1010
import { WINDOW } from '../helpers';
11-
import type { JSSelfProfile, JSSelfProfiler, JSSelfProfilerConstructor, JSSelfProfileStack } from './jsSelfProfiling';
11+
import type { JSSelfProfile, JSSelfProfileStack, JSSelfProfiler, JSSelfProfilerConstructor } from './jsSelfProfiling';
1212

1313
const MS_TO_NS = 1e6;
1414
// Use 0 as main thread id which is identical to threadId in node:worker_threads

packages/browser/src/sdk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { Hub } from '@sentry/core';
22
import {
3+
Integrations as CoreIntegrations,
34
getClient,
45
getCurrentHub,
56
getIntegrationsToSetup,
67
getReportDialogEndpoint,
78
initAndBind,
8-
Integrations as CoreIntegrations,
99
} from '@sentry/core';
1010
import type { UserFeedback } from '@sentry/types';
1111
import {

packages/browser/test/unit/index.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { getReportDialogEndpoint, SDK_VERSION } from '@sentry/core';
1+
import { SDK_VERSION, getReportDialogEndpoint } from '@sentry/core';
22
import type { WrappedFunction } from '@sentry/types';
33
import * as utils from '@sentry/utils';
44

55
import type { Event } from '../../src';
66
import {
7-
addBreadcrumb,
87
BrowserClient,
8+
Integrations,
9+
Scope,
10+
WINDOW,
11+
addBreadcrumb,
912
captureEvent,
1013
captureException,
1114
captureMessage,
@@ -14,10 +17,7 @@ import {
1417
getClient,
1518
getCurrentHub,
1619
init,
17-
Integrations,
18-
Scope,
1920
showReportDialog,
20-
WINDOW,
2121
wrap,
2222
} from '../../src';
2323
import { getDefaultBrowserClientOptions } from './helper/browser-client-options';

packages/browser/test/unit/integrations/breadcrumbs.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { getCurrentHub } from '@sentry/core';
22
import type { Client } from '@sentry/types';
33

4-
import { Breadcrumbs, BrowserClient, flush, Hub } from '../../../src';
4+
import { Breadcrumbs, BrowserClient, Hub, flush } from '../../../src';
55
import { getDefaultBrowserClientOptions } from '../helper/browser-client-options';
66

77
const hub = new Hub();

packages/browser/test/unit/sdk.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/unbound-method */
2-
import { createTransport, Scope } from '@sentry/core';
2+
import { Scope, createTransport } from '@sentry/core';
33
import type { Client, Integration } from '@sentry/types';
44
import { resolvedSyncPromise } from '@sentry/utils';
55

packages/browser/test/unit/transports/fetch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { TextEncoder } from 'util';
12
import type { EventEnvelope, EventItem } from '@sentry/types';
23
import { createEnvelope, serializeEnvelope } from '@sentry/utils';
3-
import { TextEncoder } from 'util';
44

55
import { makeFetchTransport } from '../../../src/transports/fetch';
66
import type { BrowserTransportOptions } from '../../../src/transports/types';

packages/browser/test/unit/transports/offline.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'fake-indexeddb/auto';
22

3+
import { TextDecoder, TextEncoder } from 'util';
34
import { createTransport } from '@sentry/core';
45
import type {
56
EventEnvelope,
@@ -8,7 +9,6 @@ import type {
89
TransportMakeRequestResponse,
910
} from '@sentry/types';
1011
import { createEnvelope } from '@sentry/utils';
11-
import { TextDecoder, TextEncoder } from 'util';
1212

1313
import { MIN_DELAY } from '../../../../core/src/transports/offline';
1414
import { createStore, insert, makeBrowserOfflineTransport, pop } from '../../../src/transports/offline';

packages/browser/test/unit/transports/xhr.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { TextEncoder } from 'util';
12
import type { EventEnvelope, EventItem } from '@sentry/types';
23
import { createEnvelope, serializeEnvelope } from '@sentry/utils';
3-
import { TextEncoder } from 'util';
44

55
import type { BrowserTransportOptions } from '../../../src/transports/types';
66
import { makeXHRTransport } from '../../../src/transports/xhr';

0 commit comments

Comments
 (0)