@featurevisor/react 0.14.0 → 0.14.1
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 +11 -0
- package/dist/index.js.gz +0 -0
- package/package.json +4 -4
- package/src/activateFeature.spec.tsx +4 -7
- package/src/useSdk.spec.tsx +1 -4
- package/src/useStatus.spec.tsx +1 -4
- package/src/useVariable.spec.tsx +1 -8
- package/src/useVariation.spec.tsx +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.14.1](https://github.com/fahad19/featurevisor/compare/v0.14.0...v0.14.1) (2023-04-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* do not require variation type in Feature's YAML ([#57](https://github.com/fahad19/featurevisor/issues/57)) ([2e7c0cf](https://github.com/fahad19/featurevisor/commit/2e7c0cfb441a60beffa14dae17152257d97862b0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.14.0](https://github.com/fahad19/featurevisor/compare/v0.13.1...v0.14.0) (2023-04-21)
|
|
7
18
|
|
|
8
19
|
|
package/dist/index.js.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/react",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "React package for Featurevisor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
"url": "https://github.com/fahad19/featurevisor/issues"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@featurevisor/sdk": "^0.14.
|
|
46
|
-
"@featurevisor/types": "^0.14.
|
|
45
|
+
"@featurevisor/sdk": "^0.14.1",
|
|
46
|
+
"@featurevisor/types": "^0.14.1"
|
|
47
47
|
},
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"devDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"@testing-library/react": "^14.0.0",
|
|
52
52
|
"jest-environment-jsdom": "^29.5.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "3ddcffdba992a36b564cf4471f0e4982cfd9fc83"
|
|
55
55
|
}
|
|
@@ -16,10 +16,7 @@ function getNewInstance() {
|
|
|
16
16
|
key: "test",
|
|
17
17
|
defaultVariation: false,
|
|
18
18
|
bucketBy: "userId",
|
|
19
|
-
variations: [
|
|
20
|
-
{ type: "boolean", value: true },
|
|
21
|
-
{ type: "boolean", value: false },
|
|
22
|
-
],
|
|
19
|
+
variations: [{ value: true }, { value: false }],
|
|
23
20
|
traffic: [
|
|
24
21
|
{
|
|
25
22
|
key: "1",
|
|
@@ -41,12 +38,12 @@ function getNewInstance() {
|
|
|
41
38
|
return sdk;
|
|
42
39
|
}
|
|
43
40
|
|
|
44
|
-
describe("react: activateFeature", function() {
|
|
45
|
-
test("should be a function", function() {
|
|
41
|
+
describe("react: activateFeature", function () {
|
|
42
|
+
test("should be a function", function () {
|
|
46
43
|
expect(activateFeature).toBeInstanceOf(Function);
|
|
47
44
|
});
|
|
48
45
|
|
|
49
|
-
test("should return the variation", function() {
|
|
46
|
+
test("should return the variation", function () {
|
|
50
47
|
function TestComponent() {
|
|
51
48
|
const variation = activateFeature("test", { userId: "1" });
|
|
52
49
|
|
package/src/useSdk.spec.tsx
CHANGED
|
@@ -16,10 +16,7 @@ function getNewInstance() {
|
|
|
16
16
|
key: "test",
|
|
17
17
|
defaultVariation: false,
|
|
18
18
|
bucketBy: "userId",
|
|
19
|
-
variations: [
|
|
20
|
-
{ type: "boolean", value: true },
|
|
21
|
-
{ type: "boolean", value: false },
|
|
22
|
-
],
|
|
19
|
+
variations: [{ value: true }, { value: false }],
|
|
23
20
|
traffic: [
|
|
24
21
|
{
|
|
25
22
|
key: "1",
|
package/src/useStatus.spec.tsx
CHANGED
|
@@ -16,10 +16,7 @@ function getNewInstance() {
|
|
|
16
16
|
key: "test",
|
|
17
17
|
defaultVariation: false,
|
|
18
18
|
bucketBy: "userId",
|
|
19
|
-
variations: [
|
|
20
|
-
{ type: "boolean", value: true },
|
|
21
|
-
{ type: "boolean", value: false },
|
|
22
|
-
],
|
|
19
|
+
variations: [{ value: true }, { value: false }],
|
|
23
20
|
traffic: [
|
|
24
21
|
{
|
|
25
22
|
key: "1",
|
package/src/useVariable.spec.tsx
CHANGED
|
@@ -16,14 +16,7 @@ function getNewInstance() {
|
|
|
16
16
|
key: "test",
|
|
17
17
|
defaultVariation: "control",
|
|
18
18
|
bucketBy: "userId",
|
|
19
|
-
variations: [
|
|
20
|
-
{ type: "string", value: "control" },
|
|
21
|
-
{
|
|
22
|
-
type: "string",
|
|
23
|
-
value: "b",
|
|
24
|
-
},
|
|
25
|
-
{ type: "string", value: "c" },
|
|
26
|
-
],
|
|
19
|
+
variations: [{ value: "control" }, { value: "b" }, { value: "c" }],
|
|
27
20
|
traffic: [
|
|
28
21
|
{
|
|
29
22
|
key: "1",
|
|
@@ -16,10 +16,7 @@ function getNewInstance() {
|
|
|
16
16
|
key: "test",
|
|
17
17
|
defaultVariation: false,
|
|
18
18
|
bucketBy: "userId",
|
|
19
|
-
variations: [
|
|
20
|
-
{ type: "boolean", value: true },
|
|
21
|
-
{ type: "boolean", value: false },
|
|
22
|
-
],
|
|
19
|
+
variations: [{ value: true }, { value: false }],
|
|
23
20
|
traffic: [
|
|
24
21
|
{
|
|
25
22
|
key: "1",
|