Skip to content

Commit 83ee34b

Browse files
committed
biome formatting
1 parent 8ffafd1 commit 83ee34b

File tree

7 files changed

+15
-22
lines changed

7 files changed

+15
-22
lines changed

dev-packages/browser-integration-tests/suites/integrations/featureFlags/launchdarkly/basic/test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { sentryTest } from '../../../../../utils/fixtures';
44

55
import { envelopeRequestParser, shouldSkipLaunchDarklyTest, waitForErrorRequest } from '../../../../../utils/helpers';
66

7-
const FLAG_BUFFER_SIZE = 100; // Corresponds to constant in featureFlags.ts, in browser utils.
7+
const FLAG_BUFFER_SIZE = 100; // Corresponds to constant in featureFlags.ts, in browser utils.
88

99
sentryTest('Basic test with eviction, update, and no async tasks', async ({ getLocalTestPath, page }) => {
1010
if (shouldSkipLaunchDarklyTest()) {
@@ -22,13 +22,13 @@ sentryTest('Basic test with eviction, update, and no async tasks', async ({ getL
2222
const url = await getLocalTestPath({ testDir: __dirname, skipDsnRouteHandler: true });
2323
await page.goto(url);
2424

25-
await page.waitForFunction((bufferSize) => {
25+
await page.waitForFunction(bufferSize => {
2626
const ldClient = (window as any).initializeLD();
2727
for (let i = 1; i <= bufferSize; i++) {
2828
ldClient.variation(`feat${i}`, false);
2929
}
3030
ldClient.variation(`feat${bufferSize + 1}`, true); // eviction
31-
ldClient.variation('feat3', true); // update
31+
ldClient.variation('feat3', true); // update
3232
return true;
3333
}, FLAG_BUFFER_SIZE);
3434

@@ -37,7 +37,7 @@ sentryTest('Basic test with eviction, update, and no async tasks', async ({ getL
3737
const req = await reqPromise;
3838
const event = envelopeRequestParser(req);
3939

40-
const expectedFlags = [{ flag: 'feat2', result: false }]
40+
const expectedFlags = [{ flag: 'feat2', result: false }];
4141
for (let i = 4; i <= FLAG_BUFFER_SIZE; i++) {
4242
expectedFlags.push({ flag: `feat${i}`, result: false });
4343
}

dev-packages/browser-integration-tests/suites/integrations/featureFlags/launchdarkly/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Sentry.init({
1313
// Also, no SDK has mock utils for FlagUsedHandler's.
1414
const MockLaunchDarkly = {
1515
initialize(_clientId, context, options) {
16-
const flagUsedHandler = (options && options.inspectors) ? options.inspectors[0].method : undefined;
16+
const flagUsedHandler = options && options.inspectors ? options.inspectors[0].method : undefined;
1717

1818
return {
1919
variation(key, defaultValue) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler} from './integration';
1+
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler } from './integration';

packages/browser/src/integrations/featureFlags/launchdarkly/integration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Client, Event, EventHint, IntegrationFn } from '@sentry/types';
22
import type { LDContext, LDEvaluationDetail, LDInspectionFlagUsedHandler } from './types';
33

4-
import { insertToFlagBuffer } from '../../../utils/featureFlags'
54
import { defineIntegration, getCurrentScope } from '@sentry/core';
5+
import { insertToFlagBuffer } from '../../../utils/featureFlags';
66

77
/**
88
* Sentry integration for capturing feature flags from LaunchDarkly.

packages/browser/test/utils/featureFlags.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
2-
import { logger } from '@sentry/utils';
3-
import { insertToFlagBuffer } from '../../src/utils/featureFlags';
41
import type { FeatureFlag } from '@sentry/types';
2+
import { logger } from '@sentry/utils';
53
import { vi } from 'vitest';
4+
import { insertToFlagBuffer } from '../../src/utils/featureFlags';
65

76
describe('flags', () => {
87
describe('insertToFlagBuffer()', () => {
@@ -79,5 +78,5 @@ describe('flags', () => {
7978
{ flag: 'feat2', result: true },
8079
]);
8180
});
82-
})
83-
})
81+
});
82+
});

packages/core/src/scope.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,7 @@ import type {
2121
SeverityLevel,
2222
User,
2323
} from '@sentry/types';
24-
import {
25-
dateTimestampInSeconds,
26-
generatePropagationContext,
27-
isPlainObject,
28-
logger,
29-
uuid4,
30-
} from '@sentry/utils';
24+
import { dateTimestampInSeconds, generatePropagationContext, isPlainObject, logger, uuid4 } from '@sentry/utils';
3125

3226
import { updateSession } from './session';
3327
import { _getSpanForScope, _setSpanForScope } from './utils/spanOnScope';
@@ -132,8 +126,8 @@ class ScopeClass implements ScopeInterface {
132126
// We need to copy the `values` array so insertions on a cloned scope
133127
// won't affect the original array.
134128
newScope._contexts.flags = {
135-
values: [...this._contexts.flags.values]
136-
}
129+
values: [...this._contexts.flags.values],
130+
};
137131
}
138132

139133
newScope._user = this._user;

packages/types/src/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import type { FeatureFlag } from './featureFlags';
12
import type { Primitive } from './misc';
23
import type { SpanOrigin } from './span';
3-
import type { FeatureFlag } from './featureFlags'
44

55
export type Context = Record<string, unknown>;
66

0 commit comments

Comments
 (0)