Skip to content

Commit a8866fb

Browse files
committed
refactor: re-run prettier
1 parent 896ffb8 commit a8866fb

File tree

7 files changed

+42
-26
lines changed

7 files changed

+42
-26
lines changed

src/cache/tlru-cache.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ import { LRUCache } from './lru-cache';
88
**/
99
export class TLRUCache extends LRUCache {
1010
private readonly cacheEntriesTTLRegistry = new Map<string, Date>();
11-
constructor(readonly maxSize: number, readonly ttl: number) {
11+
constructor(
12+
readonly maxSize: number,
13+
readonly ttl: number,
14+
) {
1215
super(maxSize);
1316
}
1417

src/client/eppo-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ export default class EppoClient {
383383
activationStrategy === 'always'
384384
? { type: 'always' }
385385
: activationStrategy === 'stale'
386-
? { type: 'stale', maxAgeSeconds }
387-
: activationStrategy === 'empty'
388-
? { type: 'empty' }
389-
: { type: 'never' },
386+
? { type: 'stale', maxAgeSeconds }
387+
: activationStrategy === 'empty'
388+
? { type: 'empty' }
389+
: { type: 'never' },
390390
);
391391

392392
if (persistentStorage) {

src/events/batch-event-processor.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const MAX_BATCH_SIZE = 10_000;
77
export default class BatchEventProcessor {
88
private readonly batchSize: number;
99

10-
constructor(private readonly eventQueue: NamedEventQueue<Event>, batchSize: number) {
10+
constructor(
11+
private readonly eventQueue: NamedEventQueue<Event>,
12+
batchSize: number,
13+
) {
1114
// clamp batch size between min and max
1215
this.batchSize = Math.max(MIN_BATCH_SIZE, Math.min(MAX_BATCH_SIZE, batchSize));
1316
}

src/events/event-delivery.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ export type EventDeliveryResult = {
99
};
1010

1111
export default class EventDelivery implements IEventDelivery {
12-
constructor(private readonly sdkKey: string, private readonly ingestionUrl: string) {}
12+
constructor(
13+
private readonly sdkKey: string,
14+
private readonly ingestionUrl: string,
15+
) {}
1316

1417
/**
1518
* Delivers a batch of events to the ingestion URL endpoint. Returns the UUIDs of any events from

src/flag-evaluation-details-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export class FlagEvaluationDetailsBuilder {
141141
key: allocation.key,
142142
allocationEvaluationCode: AllocationEvaluationCode.UNEVALUATED,
143143
orderPosition: unevaluatedStartOrderPosition + i,
144-
} as AllocationEvaluation),
144+
}) as AllocationEvaluation,
145145
);
146146
};
147147
}

src/http-client.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ export interface IQueryParamsWithSubject extends IQueryParams {
2424

2525
/** @internal */
2626
export class HttpRequestError extends Error {
27-
constructor(public message: string, public status?: number, public cause?: Error) {
27+
constructor(
28+
public message: string,
29+
public status?: number,
30+
public cause?: Error,
31+
) {
2832
super(message);
2933
if (cause) {
3034
this.cause = cause;
@@ -56,7 +60,10 @@ export interface IHttpClient {
5660

5761
/** @internal */
5862
export default class FetchHttpClient implements IHttpClient {
59-
constructor(private readonly apiEndpoints: ApiEndpoints, private readonly timeout: number) {}
63+
constructor(
64+
private readonly apiEndpoints: ApiEndpoints,
65+
private readonly timeout: number,
66+
) {}
6067

6168
async getUniversalFlagConfiguration(): Promise<FlagsConfig> {
6269
const url = this.apiEndpoints.ufcEndpoint();

src/rules.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,21 +173,21 @@ function evaluateCondition(subjectAttributes: Record<string, any>, condition: Co
173173
condition.operator === OperatorType.GTE
174174
? semverGte
175175
: condition.operator === OperatorType.GT
176-
? semverGt
177-
: condition.operator === OperatorType.LTE
178-
? semverLte
179-
: semverLt;
176+
? semverGt
177+
: condition.operator === OperatorType.LTE
178+
? semverLte
179+
: semverLt;
180180
return compareSemVer(value, condition.value, comparator);
181181
}
182182

183183
const comparator = (a: number, b: number) =>
184184
condition.operator === OperatorType.GTE
185185
? a >= b
186186
: condition.operator === OperatorType.GT
187-
? a > b
188-
: condition.operator === OperatorType.LTE
189-
? a <= b
190-
: a < b;
187+
? a > b
188+
: condition.operator === OperatorType.LTE
189+
? a <= b
190+
: a < b;
191191
return compareNumber(value, condition.value, comparator);
192192
}
193193
case OperatorType.MATCHES:
@@ -229,21 +229,21 @@ function evaluateObfuscatedCondition(
229229
condition.operator === ObfuscatedOperatorType.GTE
230230
? semverGte
231231
: condition.operator === ObfuscatedOperatorType.GT
232-
? semverGt
233-
: condition.operator === ObfuscatedOperatorType.LTE
234-
? semverLte
235-
: semverLt;
232+
? semverGt
233+
: condition.operator === ObfuscatedOperatorType.LTE
234+
? semverLte
235+
: semverLt;
236236
return compareSemVer(value, conditionValue, comparator);
237237
}
238238

239239
const comparator = (a: number, b: number) =>
240240
condition.operator === ObfuscatedOperatorType.GTE
241241
? a >= b
242242
: condition.operator === ObfuscatedOperatorType.GT
243-
? a > b
244-
: condition.operator === ObfuscatedOperatorType.LTE
245-
? a <= b
246-
: a < b;
243+
? a > b
244+
: condition.operator === ObfuscatedOperatorType.LTE
245+
? a <= b
246+
: a < b;
247247
return compareNumber(value, Number(conditionValue), comparator);
248248
}
249249
case ObfuscatedOperatorType.MATCHES:

0 commit comments

Comments
 (0)