@featurevisor/react 0.29.0 → 0.30.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.
@@ -0,0 +1,121 @@
1
+
2
+ <!doctype html>
3
+ <html lang="en">
4
+
5
+ <head>
6
+ <title>Code coverage report for useVariation.ts</title>
7
+ <meta charset="utf-8" />
8
+ <link rel="stylesheet" href="prettify.css" />
9
+ <link rel="stylesheet" href="base.css" />
10
+ <link rel="shortcut icon" type="image/x-icon" href="favicon.png" />
11
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
12
+ <style type='text/css'>
13
+ .coverage-summary .sorter {
14
+ background-image: url(sort-arrow-sprite.png);
15
+ }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <div class='wrapper'>
21
+ <div class='pad1'>
22
+ <h1><a href="index.html">All files</a> useVariation.ts</h1>
23
+ <div class='clearfix'>
24
+
25
+ <div class='fl pad1y space-right2'>
26
+ <span class="strong">100% </span>
27
+ <span class="quiet">Statements</span>
28
+ <span class='fraction'>5/5</span>
29
+ </div>
30
+
31
+
32
+ <div class='fl pad1y space-right2'>
33
+ <span class="strong">0% </span>
34
+ <span class="quiet">Branches</span>
35
+ <span class='fraction'>0/1</span>
36
+ </div>
37
+
38
+
39
+ <div class='fl pad1y space-right2'>
40
+ <span class="strong">100% </span>
41
+ <span class="quiet">Functions</span>
42
+ <span class='fraction'>1/1</span>
43
+ </div>
44
+
45
+
46
+ <div class='fl pad1y space-right2'>
47
+ <span class="strong">100% </span>
48
+ <span class="quiet">Lines</span>
49
+ <span class='fraction'>5/5</span>
50
+ </div>
51
+
52
+
53
+ </div>
54
+ <p class="quiet">
55
+ Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
56
+ </p>
57
+ <template id="filterTemplate">
58
+ <div class="quiet">
59
+ Filter:
60
+ <input oninput="onInput()" type="search" id="fileSearch">
61
+ </div>
62
+ </template>
63
+ </div>
64
+ <div class='status-line high'></div>
65
+ <pre><table class="coverage">
66
+ <tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
67
+ <a name='L2'></a><a href='#L2'>2</a>
68
+ <a name='L3'></a><a href='#L3'>3</a>
69
+ <a name='L4'></a><a href='#L4'>4</a>
70
+ <a name='L5'></a><a href='#L5'>5</a>
71
+ <a name='L6'></a><a href='#L6'>6</a>
72
+ <a name='L7'></a><a href='#L7'>7</a>
73
+ <a name='L8'></a><a href='#L8'>8</a>
74
+ <a name='L9'></a><a href='#L9'>9</a>
75
+ <a name='L10'></a><a href='#L10'>10</a>
76
+ <a name='L11'></a><a href='#L11'>11</a>
77
+ <a name='L12'></a><a href='#L12'>12</a>
78
+ <a name='L13'></a><a href='#L13'>13</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral">&nbsp;</span>
79
+ <span class="cline-any cline-neutral">&nbsp;</span>
80
+ <span class="cline-any cline-yes">1x</span>
81
+ <span class="cline-any cline-neutral">&nbsp;</span>
82
+ <span class="cline-any cline-yes">1x</span>
83
+ <span class="cline-any cline-neutral">&nbsp;</span>
84
+ <span class="cline-any cline-yes">1x</span>
85
+ <span class="cline-any cline-neutral">&nbsp;</span>
86
+ <span class="cline-any cline-yes">1x</span>
87
+ <span class="cline-any cline-neutral">&nbsp;</span>
88
+ <span class="cline-any cline-yes">1x</span>
89
+ <span class="cline-any cline-neutral">&nbsp;</span>
90
+ <span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import { Attributes, FeatureKey, VariationValue } from "@featurevisor/types";
91
+ &nbsp;
92
+ import { useSdk } from "./useSdk";
93
+ &nbsp;
94
+ export function useVariation(
95
+ featureKey: FeatureKey,
96
+ <span class="missing-if-branch" title="if path not taken" >I</span>attributes: Attributes = {},
97
+ ): VariationValue | undefined {
98
+ const sdk = useSdk();
99
+ &nbsp;
100
+ return sdk.getVariation(featureKey, attributes);
101
+ }
102
+ &nbsp;</pre></td></tr></table></pre>
103
+
104
+ <div class='push'></div><!-- for sticky footer -->
105
+ </div><!-- /wrapper -->
106
+ <div class='footer quiet pad2 space-top1 center small'>
107
+ Code coverage generated by
108
+ <a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
109
+ at 2023-06-14T18:32:50.770Z
110
+ </div>
111
+ <script src="prettify.js"></script>
112
+ <script>
113
+ window.onload = function () {
114
+ prettyPrint();
115
+ };
116
+ </script>
117
+ <script src="sorter.js"></script>
118
+ <script src="block-navigation.js"></script>
119
+ </body>
120
+ </html>
121
+
@@ -0,0 +1,125 @@
1
+ TN:
2
+ SF:src/FeaturevisorContext.ts
3
+ FNF:0
4
+ FNH:0
5
+ DA:1,5
6
+ DA:4,5
7
+ LF:2
8
+ LH:2
9
+ BRF:0
10
+ BRH:0
11
+ end_of_record
12
+ TN:
13
+ SF:src/FeaturevisorProvider.tsx
14
+ FN:11,FeaturevisorProvider
15
+ FNF:1
16
+ FNH:1
17
+ FNDA:5,FeaturevisorProvider
18
+ DA:1,5
19
+ DA:4,5
20
+ DA:11,5
21
+ DA:12,5
22
+ LF:4
23
+ LH:4
24
+ BRF:0
25
+ BRH:0
26
+ end_of_record
27
+ TN:
28
+ SF:src/activateFeature.ts
29
+ FN:5,activateFeature
30
+ FNF:1
31
+ FNH:1
32
+ FNDA:1,activateFeature
33
+ DA:3,1
34
+ DA:5,1
35
+ DA:7,1
36
+ DA:9,1
37
+ DA:11,1
38
+ LF:5
39
+ LH:5
40
+ BRDA:7,0,0,0
41
+ BRF:1
42
+ BRH:0
43
+ end_of_record
44
+ TN:
45
+ SF:src/useSdk.ts
46
+ FN:6,useSdk
47
+ FNF:1
48
+ FNH:1
49
+ FNDA:5,useSdk
50
+ DA:1,5
51
+ DA:4,5
52
+ DA:6,5
53
+ DA:7,5
54
+ DA:9,5
55
+ LF:5
56
+ LH:5
57
+ BRF:0
58
+ BRH:0
59
+ end_of_record
60
+ TN:
61
+ SF:src/useStatus.ts
62
+ FN:9,useStatus
63
+ FN:19,(anonymous_1)
64
+ FN:20,handleReady
65
+ FN:26,(anonymous_3)
66
+ FNF:4
67
+ FNH:1
68
+ FNDA:1,useStatus
69
+ FNDA:0,(anonymous_1)
70
+ FNDA:0,handleReady
71
+ FNDA:0,(anonymous_3)
72
+ DA:1,1
73
+ DA:3,1
74
+ DA:9,1
75
+ DA:10,1
76
+ DA:11,1
77
+ DA:13,1
78
+ DA:15,1
79
+ DA:16,1
80
+ DA:19,0
81
+ DA:21,0
82
+ DA:24,0
83
+ DA:26,0
84
+ DA:27,0
85
+ DA:31,0
86
+ LF:14
87
+ LH:8
88
+ BRDA:15,0,0,1
89
+ BRF:1
90
+ BRH:1
91
+ end_of_record
92
+ TN:
93
+ SF:src/useVariable.ts
94
+ FN:5,useVariable
95
+ FNF:1
96
+ FNH:1
97
+ FNDA:1,useVariable
98
+ DA:3,1
99
+ DA:5,1
100
+ DA:8,1
101
+ DA:10,1
102
+ DA:12,1
103
+ LF:5
104
+ LH:5
105
+ BRDA:8,0,0,0
106
+ BRF:1
107
+ BRH:0
108
+ end_of_record
109
+ TN:
110
+ SF:src/useVariation.ts
111
+ FN:5,useVariation
112
+ FNF:1
113
+ FNH:1
114
+ FNDA:1,useVariation
115
+ DA:3,1
116
+ DA:5,1
117
+ DA:7,1
118
+ DA:9,1
119
+ DA:11,1
120
+ LF:5
121
+ LH:5
122
+ BRDA:7,0,0,0
123
+ BRF:1
124
+ BRH:0
125
+ end_of_record
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.29.0",
3
+ "version": "0.30.1",
4
4
  "description": "React package for Featurevisor",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -10,7 +10,7 @@
10
10
  "transpile": "rimraf lib && tsc --project tsconfig.esm.json",
11
11
  "dist": "webpack --config ./webpack.config.js",
12
12
  "build": "npm run transpile && npm run dist",
13
- "test": "jest --config jest.config.js --verbose"
13
+ "test": "jest --config jest.config.js --verbose --coverage"
14
14
  },
15
15
  "author": {
16
16
  "name": "Fahad Heylaal",
@@ -42,8 +42,8 @@
42
42
  "url": "https://github.com/fahad19/featurevisor/issues"
43
43
  },
44
44
  "dependencies": {
45
- "@featurevisor/sdk": "^0.29.0",
46
- "@featurevisor/types": "^0.29.0"
45
+ "@featurevisor/sdk": "^0.30.1",
46
+ "@featurevisor/types": "^0.30.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": "a58d59a7de4df79575589520415b261cae519b1c"
54
+ "gitHead": "415d852f3be82af19d1fdd7e9b6831ef0b8e4fe1"
55
55
  }