Skip to content

Commit fa5baab

Browse files
committed
update to latest common, use exported members
1 parent de9f653 commit fa5baab

File tree

4 files changed

+8
-32
lines changed

4 files changed

+8
-32
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@
6060
"webpack-cli": "^6.0.1"
6161
},
6262
"dependencies": {
63-
"@eppo/js-client-sdk-common": "4.8.4",
64-
"spark-md5": "^3.0.2"
63+
"@eppo/js-client-sdk-common": "4.9.0"
6564
},
6665
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
6766
}

src/client-options-converter.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {
22
BanditParameters,
3-
BanditVariation,
3+
BanditVariation, EppoClientParameters,
44
EventDispatcher,
55
Flag,
66
FlagConfigurationRequestParameters,
@@ -11,17 +11,6 @@ import {
1111
import { IClientOptions } from './i-client-config';
1212
import { sdkName, sdkVersion } from './sdk-data';
1313

14-
export type EppoClientParameters = {
15-
// Dispatcher for arbitrary, application-level events (not to be confused with Eppo specific assignment
16-
// or bandit events). These events are application-specific and captures by EppoClient#track API.
17-
eventDispatcher?: EventDispatcher;
18-
flagConfigurationStore: IConfigurationStore<Flag | ObfuscatedFlag>;
19-
banditVariationConfigurationStore?: IConfigurationStore<BanditVariation[]>;
20-
banditModelConfigurationStore?: IConfigurationStore<BanditParameters>;
21-
configurationRequestParameters?: FlagConfigurationRequestParameters;
22-
isObfuscated?: boolean;
23-
};
24-
2514
/**
2615
* Converts IClientOptions to EppoClientParameters
2716
* @internal

src/index.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ import {
2121
IConfigurationWire,
2222
Subject,
2323
IBanditLogger,
24-
IObfuscatedPrecomputedConfigurationResponse,
24+
IObfuscatedPrecomputedConfigurationResponse, buildStorageKeySuffix, EppoClientParameters,
2525
} from '@eppo/js-client-sdk-common';
26-
import SparkMD5 from 'spark-md5';
2726

2827
import { assignmentCacheFactory } from './cache/assignment-cache-factory';
2928
import HybridAssignmentCache from './cache/hybrid-assignment-cache';
30-
import { clientOptionsToParameters, EppoClientParameters } from './client-options-converter';
29+
import { clientOptionsToParameters } from './client-options-converter';
3130
import {
3231
ConfigLoaderStatus,
3332
ConfigLoadResult,
@@ -357,17 +356,6 @@ export class EppoJSClient extends EppoClient {
357356
}
358357
}
359358

360-
/**
361-
* Builds a storage key suffix from an API key.
362-
* @param apiKey - The API key to build the suffix from
363-
* @returns A string suffix for storage keys
364-
* @public
365-
*/
366-
export function buildStorageKeySuffix(apiKey: string): string {
367-
// Note that we use the last 8 characters of hashed API key to create per-API key persistent storages and caches
368-
return new SparkMD5().append(apiKey).end().slice(-8);
369-
}
370-
371359
/**
372360
* Initializes the Eppo client with configuration parameters.
373361
*

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -380,10 +380,10 @@
380380
resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz#f13c7c205915eb91ae54c557f5e92bddd8be0e83"
381381
integrity sha512-4B4OijXeVNOPZlYA2oEwWOTkzyltLao+xbotHQeqN++Rv27Y6s818+n2Qkp8q+Fxhn0t/5lA5X1Mxktud8eayQ==
382382

383-
"@eppo/js-client-sdk-common@4.8.4":
384-
version "4.8.4"
385-
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-4.8.4.tgz#a1919233fa52399b86ce75b9eebed1c6d2bac16e"
386-
integrity sha512-cDxOOHjGU0kJLp2zXWGXaH2xcEd/oxsAT4e78jbbhktb+e5vkU3+SCFTvijFykr1h/hQ2a3O1PPP0M8HFfdrZA==
383+
"@eppo/js-client-sdk-common@4.9.0":
384+
version "4.9.0"
385+
resolved "https://registry.yarnpkg.com/@eppo/js-client-sdk-common/-/js-client-sdk-common-4.9.0.tgz#6af8dfc7ee0ca9d36ec7fd4ca9ac8852e25c355e"
386+
integrity sha512-DW1C7dTmBzKd96lUUZo/00178ZXoIUiEsbPn2E5myB3WMCFO38HBpdHmDtJS6Qv5SvSGm9c9FdGgIq1k+fElrw==
387387
dependencies:
388388
buffer "npm:@eppo/[email protected]"
389389
js-base64 "^3.7.7"

0 commit comments

Comments
 (0)