@featurevisor/react 0.14.0 → 0.15.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 CHANGED
@@ -3,6 +3,25 @@
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.15.0](https://github.com/fahad19/featurevisor/compare/v0.14.1...v0.15.0) (2023-04-23)
7
+
8
+ **Note:** Version bump only for package @featurevisor/react
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.14.1](https://github.com/fahad19/featurevisor/compare/v0.14.0...v0.14.1) (2023-04-22)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * 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))
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.14.0](https://github.com/fahad19/featurevisor/compare/v0.13.1...v0.14.0) (2023-04-21)
7
26
 
8
27
 
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.0",
3
+ "version": "0.15.0",
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.0",
46
- "@featurevisor/types": "^0.14.0"
45
+ "@featurevisor/sdk": "^0.15.0",
46
+ "@featurevisor/types": "^0.15.0"
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": "eb0599df92747f40e6ece174e4de37ac4c098c4c"
54
+ "gitHead": "254d79ee3bcbd5d9c2f771f66e653ffe5512176e"
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
 
@@ -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",
@@ -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",
@@ -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",