@frontegg/entitlements-javascript-commons 1.0.0-alpha.3 → 1.0.0-alpha.4
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/dist/feature-flags/index.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/docs/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/feature-flags/index.ts +1 -0
- package/src/index.ts +4 -1
- package/src/operations/numeric/operations.spec.ts +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export { evaluateFeatureFlag } from './feature-flags';
|
|
1
|
+
export { FeatureFlagEvaluationResult, FeatureFlag, evaluateFeatureFlag } from './feature-flags';
|
|
2
|
+
export { TreatmentEnum, Rule } from './rules';
|
|
3
|
+
export { Condition } from './conditions';
|
|
4
|
+
export { OperationEnum, ConditionValue } from './operations/types';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.evaluateFeatureFlag = void 0;
|
|
3
|
+
exports.OperationEnum = exports.TreatmentEnum = exports.evaluateFeatureFlag = void 0;
|
|
4
4
|
var feature_flags_1 = require("./feature-flags");
|
|
5
5
|
Object.defineProperty(exports, "evaluateFeatureFlag", { enumerable: true, get: function () { return feature_flags_1.evaluateFeatureFlag; } });
|
|
6
|
+
var rules_1 = require("./rules");
|
|
7
|
+
Object.defineProperty(exports, "TreatmentEnum", { enumerable: true, get: function () { return rules_1.TreatmentEnum; } });
|
|
8
|
+
var types_1 = require("./operations/types");
|
|
9
|
+
Object.defineProperty(exports, "OperationEnum", { enumerable: true, get: function () { return types_1.OperationEnum; } });
|
|
6
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAAgG;AAA7C,oHAAA,mBAAmB,OAAA;AACtE,iCAA8C;AAArC,sGAAA,aAAa,OAAA;AAEtB,4CAAmE;AAA1D,sGAAA,aAAa,OAAA"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.0.0-alpha.4](https://github.com/frontegg/entitlements-javascript-commons/compare/v-1.0.0-alpha.3...v-1.0.0-alpha.4) (2023-10-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* additional (handy) exports that SDKs might use to interact with feature flags (FR-13491) ([a7d1fc2](https://github.com/frontegg/entitlements-javascript-commons/commit/a7d1fc2f596cf379d10cb34ae7aa55a7111c1244))
|
|
7
|
+
|
|
1
8
|
# [1.0.0-alpha.3](https://github.com/frontegg/entitlements-javascript-commons/compare/v-1.0.0-alpha.2...v-1.0.0-alpha.3) (2023-10-04)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export { evaluateFeatureFlag } from './feature-flags';
|
|
1
|
+
export { FeatureFlagEvaluationResult, FeatureFlag, evaluateFeatureFlag } from './feature-flags';
|
|
2
|
+
export { TreatmentEnum, Rule } from './rules';
|
|
3
|
+
export { Condition } from './conditions';
|
|
4
|
+
export { OperationEnum, ConditionValue } from './operations/types';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
useBetweenNumericOperation,
|
|
3
|
+
useEqualsOperation,
|
|
4
|
+
useGreaterThanEqualOperation,
|
|
5
|
+
useGreaterThanOperation, useLesserThanEqualOperation,
|
|
6
|
+
useLesserThanOperation,
|
|
7
7
|
} from './index';
|
|
8
8
|
import { fc, test } from '@fast-check/jest';
|
|
9
9
|
|
|
@@ -46,7 +46,7 @@ describe('Numeric operations', () => {
|
|
|
46
46
|
test.prop([fc.integer(), fc.integer()], { verbose: true })(
|
|
47
47
|
'should return correct validity value when attribute is lesser or equals to given number',
|
|
48
48
|
(number, attribute) => {
|
|
49
|
-
const result =
|
|
49
|
+
const result = useLesserThanEqualOperation({ number })(attribute);
|
|
50
50
|
|
|
51
51
|
return attribute <= number === result.isValid;
|
|
52
52
|
},
|