Skip to content

Commit a46a180

Browse files
polishing
1 parent 44c4b90 commit a46a180

11 files changed

Lines changed: 16 additions & 12 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
7878
7979
- name: Store assets
80-
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/flagSets_xor')
80+
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/development')
8181
uses: actions/upload-artifact@v3
8282
with:
8383
name: assets
@@ -88,7 +88,7 @@ jobs:
8888
name: Upload assets
8989
runs-on: ubuntu-latest
9090
needs: build
91-
if: github.event_name == 'push' && github.ref == 'refs/heads/flagSets_xor'
91+
if: github.event_name == 'push' && github.ref == 'refs/heads/development'
9292
strategy:
9393
matrix:
9494
environment:

src/__tests__/SplitTreatments.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('SplitTreatments', () => {
161161
</SplitTreatments>
162162
);
163163

164-
expect(logSpy).toBeCalledWith('[WARN] Both names and flagSets props were provided. flagSets will be ignored.');
164+
expect(logSpy).toBeCalledWith('[WARN] Both names and flagSets properties were provided. flagSets will be ignored.');
165165
});
166166
});
167167

src/__tests__/useSplitTreatments.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ describe('useSplitTreatments', () => {
256256
})
257257
);
258258

259-
expect(logSpy).toHaveBeenLastCalledWith('[WARN] Both names and flagSets props were provided. flagSets will be ignored.');
259+
expect(logSpy).toHaveBeenLastCalledWith('[WARN] Both names and flagSets properties were provided. flagSets will be ignored.');
260260
});
261261

262262
});

src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ export const WARN_ST_NO_CLIENT: string = '[WARN] SplitTreatments does not have
4040

4141
export const EXCEPTION_NO_REACT_OR_CREATECONTEXT: string = 'React library is not available or its version is not supported. Check that it is properly installed or imported. Split SDK requires version 16.3.0+ of React.';
4242

43-
export const WARN_NAMES_AND_FLAGSETS: string = '[WARN] Both names and flagSets props were provided. flagSets will be ignored.';
43+
export const WARN_NAMES_AND_FLAGSETS: string = '[WARN] Both names and flagSets properties were provided. flagSets will be ignored.';

src/useClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSplitClient } from './useSplitClient';
55
* It uses the 'useContext' hook to access the context, which is updated by
66
* SplitFactory and SplitClient components in the hierarchy of components.
77
*
8-
* @return A Split Client instance, or null if used outside the scope of SplitFactory
8+
* @returns A Split Client instance, or null if used outside the scope of SplitFactory
9+
*
910
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#advanced-instantiate-multiple-sdk-clients}
1011
*
1112
* @deprecated Replace with the new `useSplitClient` hook.

src/useManager.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import { useSplitManager } from './useSplitManager';
55
* It uses the 'useContext' hook to access the factory at Split context, which is updated by
66
* the SplitFactory component.
77
*
8-
* @return A Split Manager instance, or null if used outside the scope of SplitFactory
8+
* @returns A Split Manager instance, or null if used outside the scope of SplitFactory
9+
*
910
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#manager}
1011
*
1112
* @deprecated Replace with the new `useSplitManager` hook.

src/useSplitClient.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const DEFAULT_UPDATE_OPTIONS = {
1414
* 'useSplitClient' is a hook that returns an Split Context object with the client and its status corresponding to the provided key and trafficType.
1515
* It uses the 'useContext' hook to access the context, which is updated by SplitFactory and SplitClient components in the hierarchy of components.
1616
*
17-
* @return A Split Context object
17+
* @returns A Split Context object
1818
*
1919
* @example
2020
* ```js

src/useSplitManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ISplitContextValues } from './types';
66
* 'useSplitManager' is a hook that returns an Split Context object with the Manager instance from the Split factory.
77
* It uses the 'useContext' hook to access the factory at Split context, which is updated by the SplitFactory component.
88
*
9-
* @return An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
9+
* @returns An object containing the Split context and the Split Manager instance, which is null if used outside the scope of SplitFactory
1010
*
1111
* @example
1212
* ```js

src/useSplitTreatments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { useSplitClient } from './useSplitClient';
88
* It uses the 'useSplitClient' hook to access the client from the Split context, and invokes the 'client.getTreatmentsWithConfig()' method if the `names` option is provided,
99
* or the 'client.getTreatmentsWithConfigByFlagSets()' method if the `flagSets` option is provided.
1010
*
11-
* @return A Split Context object extended with a TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
11+
* @returns A Split Context object extended with a TreatmentsWithConfig instance, that might contain control treatments if the client is not available or ready, or if feature flag names do not exist.
1212
*
1313
* @example
1414
* ```js

src/useTrack.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ const noOpFalse = () => false;
77
* 'useTrack' is a hook that returns the track method from a Split client.
88
* It uses the 'useContext' hook to access the client from the Split context.
99
*
10-
* @return A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
10+
* @returns A track function bound to a Split client. If the client is not available, the result is a no-op function that returns false.
11+
*
1112
* @see {@link https://help.split.io/hc/en-us/articles/360020448791-JavaScript-SDK#track}
1213
*/
1314
export function useTrack(splitKey?: SplitIO.SplitKey, trafficType?: string): SplitIO.IBrowserClient['track'] {

0 commit comments

Comments
 (0)