@scaleway/use-growthbook 2.1.1 → 2.1.3
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
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scaleway/use-growthbook
|
|
2
2
|
|
|
3
|
+
## 2.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2154](https://github.com/scaleway/scaleway-lib/pull/2154) [`abf9b7c`](https://github.com/scaleway/scaleway-lib/commit/abf9b7cb56c27dc0c7bbdb3ed3a3b8c8f1017783) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.2.0`.
|
|
8
|
+
|
|
9
|
+
## 2.1.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#2091](https://github.com/scaleway/scaleway-lib/pull/2091) [`2f04650`](https://github.com/scaleway/scaleway-lib/commit/2f04650ecc92205aa0b06a526675c641e041bcfd) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.1.0`.
|
|
14
|
+
|
|
3
15
|
## 2.1.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -2,13 +2,13 @@ import type { GrowthBook as GBType } from '@growthbook/growthbook-react'
|
|
|
2
2
|
import type { ReactNode } from 'react'
|
|
3
3
|
import { vi } from 'vitest'
|
|
4
4
|
|
|
5
|
-
export const getAttributes = vi.fn<
|
|
6
|
-
export const setAttributes = vi.fn<
|
|
5
|
+
export const getAttributes = vi.fn<() => ReturnType<GBType['getAttributes']>>()
|
|
6
|
+
export const setAttributes = vi.fn<() => ReturnType<GBType['setAttributes']>>(
|
|
7
7
|
() => Promise.resolve(),
|
|
8
8
|
)
|
|
9
9
|
|
|
10
10
|
export const GrowthBook = vi.fn(() => ({
|
|
11
|
-
loadFeatures: vi.fn<
|
|
11
|
+
loadFeatures: vi.fn<() => ReturnType<GBType['loadFeatures']>>(),
|
|
12
12
|
getAttributes,
|
|
13
13
|
setAttributes,
|
|
14
14
|
}))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/use-growthbook",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"description": "Utility package to expose AB test tool",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.x"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"feature flags"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@growthbook/growthbook-react": "1.0
|
|
34
|
+
"@growthbook/growthbook-react": "1.2.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react": "18.3.1"
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" ?>
|
|
2
|
-
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
|
|
3
|
-
<coverage lines-valid="30" lines-covered="30" line-rate="1" branches-valid="6" branches-covered="5" branch-rate="0.8332999999999999" timestamp="1717079733957" complexity="0" version="0.1">
|
|
4
|
-
<sources>
|
|
5
|
-
<source>/Volumes/Dev/scaleway/team-console/scaleway-lib/packages/use-growthbook</source>
|
|
6
|
-
</sources>
|
|
7
|
-
<packages>
|
|
8
|
-
<package name="__mocks__.@growthbook" line-rate="1" branch-rate="1">
|
|
9
|
-
<classes>
|
|
10
|
-
<class name="growthbook-react.tsx" filename="__mocks__/@growthbook/growthbook-react.tsx" line-rate="1" branch-rate="1">
|
|
11
|
-
<methods>
|
|
12
|
-
<method name="(anonymous_0)" hits="3" signature="()V">
|
|
13
|
-
<lines>
|
|
14
|
-
<line number="7" hits="3"/>
|
|
15
|
-
</lines>
|
|
16
|
-
</method>
|
|
17
|
-
<method name="(anonymous_1)" hits="2" signature="()V">
|
|
18
|
-
<lines>
|
|
19
|
-
<line number="10" hits="2"/>
|
|
20
|
-
</lines>
|
|
21
|
-
</method>
|
|
22
|
-
<method name="(anonymous_2)" hits="2" signature="()V">
|
|
23
|
-
<lines>
|
|
24
|
-
<line number="15" hits="2"/>
|
|
25
|
-
</lines>
|
|
26
|
-
</method>
|
|
27
|
-
</methods>
|
|
28
|
-
<lines>
|
|
29
|
-
<line number="5" hits="2" branch="false"/>
|
|
30
|
-
<line number="6" hits="2" branch="false"/>
|
|
31
|
-
<line number="7" hits="3" branch="false"/>
|
|
32
|
-
<line number="10" hits="2" branch="false"/>
|
|
33
|
-
<line number="15" hits="2" branch="false"/>
|
|
34
|
-
<line number="16" hits="2" branch="false"/>
|
|
35
|
-
<line number="18" hits="2" branch="false"/>
|
|
36
|
-
<line number="20" hits="2" branch="false"/>
|
|
37
|
-
</lines>
|
|
38
|
-
</class>
|
|
39
|
-
</classes>
|
|
40
|
-
</package>
|
|
41
|
-
<package name="src" line-rate="1" branch-rate="0.8332999999999999">
|
|
42
|
-
<classes>
|
|
43
|
-
<class name="AbTestProvider.tsx" filename="src/AbTestProvider.tsx" line-rate="1" branch-rate="0.8332999999999999">
|
|
44
|
-
<methods>
|
|
45
|
-
<method name="(anonymous_0)" hits="2" signature="()V">
|
|
46
|
-
<lines>
|
|
47
|
-
<line number="26" hits="2"/>
|
|
48
|
-
</lines>
|
|
49
|
-
</method>
|
|
50
|
-
<method name="(anonymous_1)" hits="2" signature="()V">
|
|
51
|
-
<lines>
|
|
52
|
-
<line number="48" hits="2"/>
|
|
53
|
-
</lines>
|
|
54
|
-
</method>
|
|
55
|
-
<method name="(anonymous_2)" hits="2" signature="()V">
|
|
56
|
-
<lines>
|
|
57
|
-
<line number="57" hits="2"/>
|
|
58
|
-
</lines>
|
|
59
|
-
</method>
|
|
60
|
-
<method name="(anonymous_3)" hits="2" signature="()V">
|
|
61
|
-
<lines>
|
|
62
|
-
<line number="61" hits="2"/>
|
|
63
|
-
</lines>
|
|
64
|
-
</method>
|
|
65
|
-
<method name="(anonymous_4)" hits="2" signature="()V">
|
|
66
|
-
<lines>
|
|
67
|
-
<line number="67" hits="2"/>
|
|
68
|
-
</lines>
|
|
69
|
-
</method>
|
|
70
|
-
<method name="(anonymous_5)" hits="2" signature="()V">
|
|
71
|
-
<lines>
|
|
72
|
-
<line number="72" hits="2"/>
|
|
73
|
-
</lines>
|
|
74
|
-
</method>
|
|
75
|
-
</methods>
|
|
76
|
-
<lines>
|
|
77
|
-
<line number="20" hits="1" branch="false"/>
|
|
78
|
-
<line number="26" hits="1" branch="false"/>
|
|
79
|
-
<line number="39" hits="2" branch="false"/>
|
|
80
|
-
<line number="48" hits="1" branch="false"/>
|
|
81
|
-
<line number="56" hits="2" branch="false"/>
|
|
82
|
-
<line number="57" hits="2" branch="false"/>
|
|
83
|
-
<line number="61" hits="2" branch="false"/>
|
|
84
|
-
<line number="62" hits="2" branch="true" condition-coverage="100% (2/2)"/>
|
|
85
|
-
<line number="63" hits="1" branch="true" condition-coverage="100% (2/2)"/>
|
|
86
|
-
<line number="67" hits="2" branch="false"/>
|
|
87
|
-
<line number="68" hits="2" branch="false"/>
|
|
88
|
-
<line number="72" hits="2" branch="false"/>
|
|
89
|
-
<line number="73" hits="2" branch="false"/>
|
|
90
|
-
<line number="74" hits="2" branch="true" condition-coverage="50% (1/2)"/>
|
|
91
|
-
<line number="75" hits="2" branch="false"/>
|
|
92
|
-
<line number="84" hits="2" branch="false"/>
|
|
93
|
-
</lines>
|
|
94
|
-
</class>
|
|
95
|
-
<class name="useAbTestAttributes.ts" filename="src/useAbTestAttributes.ts" line-rate="1" branch-rate="1">
|
|
96
|
-
<methods>
|
|
97
|
-
<method name="(anonymous_0)" hits="2" signature="()V">
|
|
98
|
-
<lines>
|
|
99
|
-
<line number="4" hits="2"/>
|
|
100
|
-
</lines>
|
|
101
|
-
</method>
|
|
102
|
-
<method name="(anonymous_1)" hits="1" signature="()V">
|
|
103
|
-
<lines>
|
|
104
|
-
<line number="12" hits="1"/>
|
|
105
|
-
</lines>
|
|
106
|
-
</method>
|
|
107
|
-
</methods>
|
|
108
|
-
<lines>
|
|
109
|
-
<line number="4" hits="1" branch="false"/>
|
|
110
|
-
<line number="8" hits="2" branch="false"/>
|
|
111
|
-
<line number="10" hits="2" branch="false"/>
|
|
112
|
-
<line number="12" hits="2" branch="false"/>
|
|
113
|
-
<line number="13" hits="1" branch="false"/>
|
|
114
|
-
<line number="18" hits="2" branch="false"/>
|
|
115
|
-
</lines>
|
|
116
|
-
</class>
|
|
117
|
-
</classes>
|
|
118
|
-
</package>
|
|
119
|
-
</packages>
|
|
120
|
-
</coverage>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
{"total": {"lines":{"total":30,"covered":30,"skipped":0,"pct":100},"statements":{"total":31,"covered":31,"skipped":0,"pct":100},"functions":{"total":11,"covered":11,"skipped":0,"pct":100},"branches":{"total":6,"covered":5,"skipped":0,"pct":83.33},"branchesTrue":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
2
|
-
,"/Volumes/Dev/scaleway/team-console/scaleway-lib/packages/use-growthbook/__mocks__/@growthbook/growthbook-react.tsx": {"lines":{"total":8,"covered":8,"skipped":0,"pct":100},"functions":{"total":3,"covered":3,"skipped":0,"pct":100},"statements":{"total":9,"covered":9,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
3
|
-
,"/Volumes/Dev/scaleway/team-console/scaleway-lib/packages/use-growthbook/src/AbTestProvider.tsx": {"lines":{"total":16,"covered":16,"skipped":0,"pct":100},"functions":{"total":6,"covered":6,"skipped":0,"pct":100},"statements":{"total":16,"covered":16,"skipped":0,"pct":100},"branches":{"total":6,"covered":5,"skipped":0,"pct":83.33}}
|
|
4
|
-
,"/Volumes/Dev/scaleway/team-console/scaleway-lib/packages/use-growthbook/src/useAbTestAttributes.ts": {"lines":{"total":6,"covered":6,"skipped":0,"pct":100},"functions":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":6,"covered":6,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}
|
|
5
|
-
}
|