@kameleoon/react-sdk 10.17.1 → 10.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/interfaces/useFeatureFlag.d.ts +9 -3
- package/dist/react-sdk.cjs.min.js +1 -1
- package/dist/react-sdk.cjs.min.js.map +1 -1
- package/dist/react-sdk.es.min.js +1 -1
- package/dist/react-sdk.es.min.js.map +1 -1
- package/dist/useFeatureFlag.d.ts +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 10.18.0 (2025-10-22)
|
|
4
|
+
|
|
5
|
+
> [!WARNING]
|
|
6
|
+
> If you're upgrading from a version earlier than 10.15.0 and run into any unexpected build or SDK-related issues, please reach out to the Kameleoon Support Team. We're here to ensure your transition is smooth and will promptly address any concerns.
|
|
7
|
+
|
|
8
|
+
### Minor Changes
|
|
9
|
+
|
|
10
|
+
- Introduced a new [`getDataFile`](getDataFile) method. This method returns the current SDK configuration (also known as the **data file**) used for evaluation and targeting. It is **not** intended for production use to fetch variations for every feature flag in the returned list, as it is not optimized for performance. For that purpose, use [`getVariations`](getVariations) instead. `getDataFile` is mainly useful for debugging or QA, for example to let internal users manually select a variant for a specific feature flag in production.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Addressed an issue where tracking data was sent for visitors who had not provided [consent](setLegalConsent).
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
- @kameleoon/javascript-sdk@4.16.0
|
|
17
|
+
|
|
18
|
+
[getDataFile]: https://developers.kameleoon.com/feature-management-and-experimentation/web-sdks/react-js-sdk#getdatafile
|
|
19
|
+
[setLegalConsent]: https://developers.kameleoon.com/feature-management-and-experimentation/web-sdks/react-js-sdk#setLegalConsent
|
|
20
|
+
|
|
3
21
|
## 10.17.1 (2025-09-03)
|
|
4
22
|
|
|
5
23
|
> [!WARNING]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FeatureFlagType, KameleoonVariationType, FeatureFlagVariableType, FeatureVariableResultType, GetFeatureFlagVariableParamsType, GetVariationsParamsType,
|
|
1
|
+
import { DataFile, FeatureFlagType, KameleoonVariationType, FeatureFlagVariableType, FeatureVariableResultType, GetFeatureFlagVariableParamsType, GetVariationsParamsType, GetVariationParamsType, IsFeatureFlagActiveParamsType, SetForcedVariationParametersType, Variation } from '@kameleoon/javascript-sdk';
|
|
2
2
|
export default interface IUseFeatureFlag {
|
|
3
3
|
/**
|
|
4
4
|
* Returns a variation for the visitor under `visitorCode` for the specified `featureKye`, this method includes targeting check, finding the according variation exposed to the visitor and saving it to storage
|
|
@@ -17,7 +17,7 @@ export default interface IUseFeatureFlag {
|
|
|
17
17
|
* - `KameleoonException.FeatureFlagConfigurationNotFound` - No feature flag was found for provided `featureKey`
|
|
18
18
|
* - `KameleoonException.FeatureFlagEnvironmentDisabled` - The feature flag is disabled for the current environment
|
|
19
19
|
* */
|
|
20
|
-
getVariation: ({ visitorCode, featureKey, track, }: GetVariationParamsType) =>
|
|
20
|
+
getVariation: ({ visitorCode, featureKey, track, }: GetVariationParamsType) => Variation;
|
|
21
21
|
/**
|
|
22
22
|
* Returns all variations for the visitor under `visitorCode` for all the feature flags, this method includes targeting check, finding the according variations exposed to the visitor and saving them to storage. By default the method obtains all the variations, but if `onlyActive` is set to `true`, only active variations will be returned (those that are not `off`)
|
|
23
23
|
*
|
|
@@ -33,7 +33,7 @@ export default interface IUseFeatureFlag {
|
|
|
33
33
|
* - `KameleoonException.VisitorCodeEmpty` The visitor code is empty
|
|
34
34
|
* - `KameleoonException.Initialization` - Method was executed before the `kameleoonClient` completed it's `initialize` call
|
|
35
35
|
*/
|
|
36
|
-
getVariations: ({ visitorCode, onlyActive, track, }: GetVariationsParamsType) => Map<string,
|
|
36
|
+
getVariations: ({ visitorCode, onlyActive, track, }: GetVariationsParamsType) => Map<string, Variation>;
|
|
37
37
|
/**
|
|
38
38
|
* @deprecated this method overload is deprecated and will be removed in the next major release. Please use `isFeatureFlagActive` overload with an object parameters instead.
|
|
39
39
|
* Indicates whether the visitor with `visitorCode` has `featureKey` active for him, this method includes targeting check, finding the according variation exposed to the visitor and saving it to storage along with sending tracking request
|
|
@@ -226,4 +226,10 @@ export default interface IUseFeatureFlag {
|
|
|
226
226
|
* - `KameleoonException.Initialization` - Method was executed before the `kameleoonClient` completed its `initialize` call
|
|
227
227
|
*/
|
|
228
228
|
evaluateAudiences(visitorCode: string): void;
|
|
229
|
+
/**
|
|
230
|
+
* @method getDataFile - retrieves the current SDK configuration (also known as the data file),
|
|
231
|
+
* containing all feature flags and their variations.
|
|
232
|
+
* @returns {DataFile} - The data file object containing the configuration details.
|
|
233
|
+
*/
|
|
234
|
+
getDataFile(): DataFile;
|
|
229
235
|
}
|