Skip to content

Commit a22f21d

Browse files
Todd AndersonTodd Anderson
authored andcommitted
Removing deprecations related to data system options
1 parent fd42ba0 commit a22f21d

File tree

3 files changed

+11
-38
lines changed

3 files changed

+11
-38
lines changed

packages/shared/sdk-server/__tests__/options/Configuration.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function logger(options: LDOptions): TestLogger {
2222
describe.each([undefined, null, 'potat0', 17, [], {}])('constructed without options', (input) => {
2323
it('should have default options', () => {
2424
// JavaScript is not going to stop you from calling this with whatever
25-
// you want. So we need to tell TS to ingore our bad behavior.
25+
// you want. So we need to tell TS to ignore our bad behavior.
2626
// @ts-ignore
2727
const config = new Configuration(input);
2828

@@ -421,7 +421,7 @@ describe('when setting different options', () => {
421421
]);
422422
});
423423

424-
it('drops invalid dataystem data source options and replaces with defaults', () => {
424+
it('drops invalid datasystem data source options and replaces with defaults', () => {
425425
const config = new Configuration(
426426
withLogger({
427427
dataSystem: { dataSource: { bogus: 'myBogusOptions' } as unknown as DataSourceOptions },
@@ -436,7 +436,7 @@ describe('when setting different options', () => {
436436
]);
437437
});
438438

439-
it('validates the datasystem persitent store is a factory or object', () => {
439+
it('validates the datasystem persistent store is a factory or object', () => {
440440
const config1 = new Configuration(
441441
withLogger({
442442
dataSystem: {
@@ -501,7 +501,7 @@ describe('when setting different options', () => {
501501
expect(logger(config).getCount()).toEqual(0);
502502
});
503503

504-
it('ignores top level featureStore in favor of the datasystem persitent store', () => {
504+
it('ignores top level featureStore in favor of the datasystem persistent store', () => {
505505
const shouldNotBeUsed = new InMemoryFeatureStore();
506506
const shouldBeUsed = new InMemoryFeatureStore();
507507
const config = new Configuration(

packages/shared/sdk-server/src/api/options/LDDataSystemOptions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ export interface LDDataSystemOptions {
3737
* type and the optional fields you want to customize.
3838
*
3939
* If not specified, this defaults to using the {@link StandardDataSourceOptions} which
40-
* pefroms a combination of streaming and polling.
40+
* performs a combination of streaming and polling.
4141
*
42-
* See {@link LDDataSystemOptions} decoumentation for exmaples.
42+
* See {@link LDDataSystemOptions} documentation for examples.
4343
*/
4444
dataSource?: DataSourceOptions;
4545

@@ -48,11 +48,11 @@ export interface LDDataSystemOptions {
4848
* data from the persistent store. Once fresh data has arrived from LaunchDarkly, the
4949
* SDK will no longer read from the persistent store, although it will keep it up-to-date
5050
* for future startups.
51-
*
51+
*
5252
* Some implementations provide the store implementation object itself, while others
5353
* provide a factory function that creates the store implementation based on the SDK
5454
* configuration; this property accepts either.
55-
*
55+
*
5656
* @param clientContext whose properties may be used to influence creation of the persistent store.
5757
*/
5858
persistentStore?: LDFeatureStore | ((clientContext: LDClientContext) => LDFeatureStore);
@@ -68,7 +68,7 @@ export interface LDDataSystemOptions {
6868

6969
/**
7070
* A component that obtains feature flag data and puts it in the feature store. Setting
71-
* this supercedes {@link LDDataSystemOptions#dataSource}.
71+
* this supersedes {@link LDDataSystemOptions#dataSource}.
7272
*/
7373
updateProcessor?:
7474
| object

packages/shared/sdk-server/src/api/options/LDOptions.ts

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,14 @@ export interface LDOptions {
7070
* Some implementations provide the store implementation object itself, while others
7171
* provide a factory function that creates the store implementation based on the SDK
7272
* configuration; this property accepts either.
73-
*
74-
* @deprecated This is now superceded by {@link LDOptions#dataSystem} using property
75-
* {@link LDDataSystemOptions#persistentStore}. The scope of the {@link LDFeatureStore}
76-
* that you provide is being reduced in the next major version to only being responsible
77-
* for persistence. See documention on {@link LDDataSystemOptions#persistentStore} for
78-
* more information.
7973
*/
8074
featureStore?: LDFeatureStore | ((clientContext: LDClientContext) => LDFeatureStore);
8175

8276
/**
8377
* Configuration options for the Data System that the SDK uses to get and maintain flags and other
8478
* data from LaunchDarkly and other sources.
8579
*
86-
* Setting this option supercedes
80+
* Setting this option supersedes
8781
*
8882
* Example (Recommended):
8983
* ```typescript
@@ -127,9 +121,6 @@ export interface LDOptions {
127121
* A component that obtains feature flag data and puts it in the feature store.
128122
*
129123
* If you specify the {@link LDOptions#dataSystem}, this setting will be ignored.
130-
*
131-
* @deprecated This has moved to {@link LDOptions#dataSystem}. Use property
132-
* {@link LDDataSystemOptions#updateProcessor} instead.
133124
*/
134125
updateProcessor?:
135126
| object
@@ -149,10 +140,6 @@ export interface LDOptions {
149140
* The time between polling requests, in seconds. Ignored in streaming mode.
150141
*
151142
* If you specify the {@link LDOptions#dataSystem}, this setting will be ignored.
152-
*
153-
* @deprecated This functionality is now controlled by {@link LDOptions#dataSystem} by
154-
* specifying the {@link LDDataSystemOptions#dataSource}. Specifying the polling interval is still
155-
* available when using {@link StandardDataSourceOptions} or {@link PollingDataSourceOptions}.
156143
*/
157144
pollInterval?: number;
158145

@@ -173,11 +160,6 @@ export interface LDOptions {
173160
*
174161
* This is true by default. If you set it to false, the client will use polling.
175162
* Streaming should only be disabled on the advice of LaunchDarkly support.
176-
*
177-
* @deprecated This functionality is now controlled by {@link LDOptions#dataSystem}
178-
* by specifying {@link LDDataSystemOptions#dataSource} options. To opt out of
179-
* streaming, you can use the {@link PollingDataSourceOptions}. Streaming should
180-
* only be disabled on the advice of LaunchDarkly support.
181163
*/
182164
stream?: boolean;
183165

@@ -191,12 +173,6 @@ export interface LDOptions {
191173
* increase exponentially for any subsequent connection failures.
192174
*
193175
* The default value is 1.
194-
*
195-
*
196-
* @deprecated This functionality is now controlled by {@link LDOptions#dataSystem}
197-
* by specifying {@link LDDataSystemOptions#dataSource} options. Specifying the reconnect
198-
* delay is still available when using {@link StandardDataSourceOptions} or
199-
* {@link StreamingDataSourceOptions}.
200176
*/
201177
streamInitialReconnectDelay?: number;
202178

@@ -208,9 +184,6 @@ export interface LDOptions {
208184
* In this configuration, the client will not connect to LaunchDarkly to get feature flags,
209185
* but will instead get feature state from a database (Redis or another supported feature
210186
* store integration) that is populated by the relay. By default, this is false.
211-
*
212-
* @deprecated This functionality is now controlled by {@link LDOptions#dataSystem}
213-
* by specifying {@link LDDataSystemOptions#useLdd}.
214187
*/
215188
useLdd?: boolean;
216189

@@ -220,7 +193,7 @@ export interface LDOptions {
220193
sendEvents?: boolean;
221194

222195
/**
223-
* Whether all context attributes (except the contexy key) should be marked as private, and
196+
* Whether all context attributes (except the context key) should be marked as private, and
224197
* not sent to LaunchDarkly.
225198
*
226199
* By default, this is false.

0 commit comments

Comments
 (0)