@scaleway/use-growthbook 2.1.5 → 2.1.7
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/package.json +6 -3
- package/.npmignore +0 -5
- package/CHANGELOG.md +0 -117
- package/__mocks__/@growthbook/growthbook-react.tsx +0 -21
- package/tsconfig.build.json +0 -16
- package/tsconfig.json +0 -4
- package/vite.config.ts +0 -14
- package/vitest.setup.ts +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/use-growthbook",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.7",
|
|
4
4
|
"description": "Utility package to expose AB test tool",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.x"
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/*"
|
|
25
|
+
],
|
|
23
26
|
"repository": {
|
|
24
27
|
"type": "git",
|
|
25
28
|
"url": "https://github.com/scaleway/scaleway-lib",
|
|
@@ -34,10 +37,10 @@
|
|
|
34
37
|
"@growthbook/growthbook-react": "1.3.1"
|
|
35
38
|
},
|
|
36
39
|
"devDependencies": {
|
|
37
|
-
"react": "
|
|
40
|
+
"react": "19.0.0"
|
|
38
41
|
},
|
|
39
42
|
"peerDependencies": {
|
|
40
|
-
"react": "18.x"
|
|
43
|
+
"react": "18.x || 19.x"
|
|
41
44
|
},
|
|
42
45
|
"scripts": {
|
|
43
46
|
"prebuild": "shx rm -rf dist",
|
package/.npmignore
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
# @scaleway/use-growthbook
|
|
2
|
-
|
|
3
|
-
## 2.1.5
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [#2325](https://github.com/scaleway/scaleway-lib/pull/2325) [`34186a6`](https://github.com/scaleway/scaleway-lib/commit/34186a617935638ebcb080c45dd90a0b9ec58f48) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.3.1`.
|
|
8
|
-
|
|
9
|
-
- [#2312](https://github.com/scaleway/scaleway-lib/pull/2312) [`a1b85f1`](https://github.com/scaleway/scaleway-lib/commit/a1b85f107cf24304c4361223ebcd6ff74bd3f1cb) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.3.0`.
|
|
10
|
-
|
|
11
|
-
## 2.1.4
|
|
12
|
-
|
|
13
|
-
### Patch Changes
|
|
14
|
-
|
|
15
|
-
- [#2237](https://github.com/scaleway/scaleway-lib/pull/2237) [`28eaa6e`](https://github.com/scaleway/scaleway-lib/commit/28eaa6ec008441711c6b702780864dc965d3776b) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.2.1`.
|
|
16
|
-
|
|
17
|
-
## 2.1.3
|
|
18
|
-
|
|
19
|
-
### Patch Changes
|
|
20
|
-
|
|
21
|
-
- [#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`.
|
|
22
|
-
|
|
23
|
-
## 2.1.2
|
|
24
|
-
|
|
25
|
-
### Patch Changes
|
|
26
|
-
|
|
27
|
-
- [#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`.
|
|
28
|
-
|
|
29
|
-
## 2.1.1
|
|
30
|
-
|
|
31
|
-
### Patch Changes
|
|
32
|
-
|
|
33
|
-
- [#2045](https://github.com/scaleway/scaleway-lib/pull/2045) [`0d79190`](https://github.com/scaleway/scaleway-lib/commit/0d79190d997cb0fc966a4be53e67877900bc95b3) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `1.0.1`.
|
|
34
|
-
|
|
35
|
-
## 2.1.0
|
|
36
|
-
|
|
37
|
-
### Minor Changes
|
|
38
|
-
|
|
39
|
-
- [#1960](https://github.com/scaleway/scaleway-lib/pull/1960) [`d034b3c`](https://github.com/scaleway/scaleway-lib/commit/d034b3cda1cac30ce2ed4e95be5a2c79642f8ca4) Thanks [@Slashgear](https://github.com/Slashgear)! - add legacy main attribut for CommonJS export usage
|
|
40
|
-
|
|
41
|
-
## 2.0.4
|
|
42
|
-
|
|
43
|
-
### Patch Changes
|
|
44
|
-
|
|
45
|
-
- [#1953](https://github.com/scaleway/scaleway-lib/pull/1953) [`1fddf05`](https://github.com/scaleway/scaleway-lib/commit/1fddf0515851908b094f983b05b3d87af8eef433) Thanks [@philibea](https://github.com/philibea)! - add cjs build
|
|
46
|
-
|
|
47
|
-
## 2.0.3
|
|
48
|
-
|
|
49
|
-
### Patch Changes
|
|
50
|
-
|
|
51
|
-
- [#1943](https://github.com/scaleway/scaleway-lib/pull/1943) [`e726def`](https://github.com/scaleway/scaleway-lib/commit/e726def8e0cb4593f800f9acecca51b173ae907a) Thanks [@philibea](https://github.com/philibea)! - Migration from rollup to vite
|
|
52
|
-
|
|
53
|
-
## 2.0.2
|
|
54
|
-
|
|
55
|
-
### Patch Changes
|
|
56
|
-
|
|
57
|
-
- [#1897](https://github.com/scaleway/scaleway-lib/pull/1897) [`3b24eda`](https://github.com/scaleway/scaleway-lib/commit/3b24eda00840f12de6b0457b60704a159b87c0d0) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.26.0`.
|
|
58
|
-
|
|
59
|
-
## 2.0.1
|
|
60
|
-
|
|
61
|
-
### Patch Changes
|
|
62
|
-
|
|
63
|
-
- [#1865](https://github.com/scaleway/scaleway-lib/pull/1865) [`778989b`](https://github.com/scaleway/scaleway-lib/commit/778989bf70f52461463ac3a4ff260d3da73b86e8) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.25.0`.
|
|
64
|
-
|
|
65
|
-
## 2.0.0
|
|
66
|
-
|
|
67
|
-
### Major Changes
|
|
68
|
-
|
|
69
|
-
- [#1837](https://github.com/scaleway/scaleway-lib/pull/1837) [`5404963`](https://github.com/scaleway/scaleway-lib/commit/5404963ddd01fafe6ed9753d8324fb19849065ca) Thanks [@philibea](https://github.com/philibea)! - upgrade node version from 14 to 20
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- [#1789](https://github.com/scaleway/scaleway-lib/pull/1789) [`cf00fbd`](https://github.com/scaleway/scaleway-lib/commit/cf00fbd55a29a56dc3aba89d426d67eb51e6cd22) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.24.0`.
|
|
74
|
-
|
|
75
|
-
## 1.0.6
|
|
76
|
-
|
|
77
|
-
### Patch Changes
|
|
78
|
-
|
|
79
|
-
- [#1667](https://github.com/scaleway/scaleway-lib/pull/1667) [`3e890c2`](https://github.com/scaleway/scaleway-lib/commit/3e890c242054cd950b825e1178f6fe652b0e39f3) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.21.0`.
|
|
80
|
-
|
|
81
|
-
## 1.0.5
|
|
82
|
-
|
|
83
|
-
### Patch Changes
|
|
84
|
-
|
|
85
|
-
- [#1615](https://github.com/scaleway/scaleway-lib/pull/1615) [`03c4c6b`](https://github.com/scaleway/scaleway-lib/commit/03c4c6be73214dc48096e0c43fcd23a47b0102a4) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.20.0`.
|
|
86
|
-
|
|
87
|
-
## 1.0.4
|
|
88
|
-
|
|
89
|
-
### Patch Changes
|
|
90
|
-
|
|
91
|
-
- [#1572](https://github.com/scaleway/scaleway-lib/pull/1572) [`57ddd1a`](https://github.com/scaleway/scaleway-lib/commit/57ddd1a39c048675f343c0da8735714f1cb5678a) Thanks [@philibea](https://github.com/philibea)! - when attributes a of provider change there is new instance of growthbook created and can make a desync during render
|
|
92
|
-
|
|
93
|
-
- [#1566](https://github.com/scaleway/scaleway-lib/pull/1566) [`2223dc1`](https://github.com/scaleway/scaleway-lib/commit/2223dc1ec4993b57e4dbeb41f65a8659c63d548c) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.19.0`.
|
|
94
|
-
|
|
95
|
-
## 1.0.3
|
|
96
|
-
|
|
97
|
-
### Patch Changes
|
|
98
|
-
|
|
99
|
-
- [#1518](https://github.com/scaleway/scaleway-lib/pull/1518) [`ca2aa68`](https://github.com/scaleway/scaleway-lib/commit/ca2aa68fcde0470dde378b4322ff55e9caec170f) Thanks [@Slashgear](https://github.com/Slashgear)! - Export directly some usable type on provider init attributes
|
|
100
|
-
|
|
101
|
-
## 1.0.2
|
|
102
|
-
|
|
103
|
-
### Patch Changes
|
|
104
|
-
|
|
105
|
-
- [#1497](https://github.com/scaleway/scaleway-lib/pull/1497) [`252e3e1`](https://github.com/scaleway/scaleway-lib/commit/252e3e1f51f3f164ca2426e4888e6d4322b648a4) Thanks [@renovate](https://github.com/apps/renovate)! - Updated dependency `@growthbook/growthbook-react` to `0.18.0`.
|
|
106
|
-
|
|
107
|
-
## 1.0.1
|
|
108
|
-
|
|
109
|
-
### Patch Changes
|
|
110
|
-
|
|
111
|
-
- [#1439](https://github.com/scaleway/scaleway-lib/pull/1439) [`eaad0f7`](https://github.com/scaleway/scaleway-lib/commit/eaad0f7195dac15e3b7b2b300b481e3fe7b543cf) Thanks [@philibea](https://github.com/philibea)! - add loadfeature configuration into the providers and moove return function from null to void
|
|
112
|
-
|
|
113
|
-
## 1.0.0
|
|
114
|
-
|
|
115
|
-
### Major Changes
|
|
116
|
-
|
|
117
|
-
- [#1434](https://github.com/scaleway/scaleway-lib/pull/1434) [`4695cbc`](https://github.com/scaleway/scaleway-lib/commit/4695cbce29e4ac688607b97d67401e33923c92f3) Thanks [@Slashgear](https://github.com/Slashgear)! - Initialize the AB test common package for integration of GrowthBook inside Scaleway frontend apps
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { GrowthBook as GBType } from '@growthbook/growthbook-react'
|
|
2
|
-
import type { ReactNode } from 'react'
|
|
3
|
-
import { vi } from 'vitest'
|
|
4
|
-
|
|
5
|
-
export const getAttributes = vi.fn<() => ReturnType<GBType['getAttributes']>>()
|
|
6
|
-
export const setAttributes = vi.fn<() => ReturnType<GBType['setAttributes']>>(
|
|
7
|
-
() => Promise.resolve(),
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
export const GrowthBook = vi.fn(() => ({
|
|
11
|
-
loadFeatures: vi.fn<() => ReturnType<GBType['loadFeatures']>>(),
|
|
12
|
-
getAttributes,
|
|
13
|
-
setAttributes,
|
|
14
|
-
}))
|
|
15
|
-
export const GrowthBookProvider = ({ children }: { children: ReactNode }) =>
|
|
16
|
-
children
|
|
17
|
-
|
|
18
|
-
export const useGrowthBook = vi.fn()
|
|
19
|
-
|
|
20
|
-
console.debug('GrowthBook Mock', GrowthBookProvider)
|
|
21
|
-
// export { GrowthBook, GrowthBookProvider, useGrowthBook }
|
package/tsconfig.build.json
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"noEmit": false,
|
|
5
|
-
"emitDeclarationOnly": true,
|
|
6
|
-
"rootDir": "src",
|
|
7
|
-
"outDir": "dist"
|
|
8
|
-
},
|
|
9
|
-
"exclude": [
|
|
10
|
-
"*.config.ts",
|
|
11
|
-
"*.setup.ts",
|
|
12
|
-
"**/__tests__",
|
|
13
|
-
"**/__mocks__",
|
|
14
|
-
"src/**/*.test.tsx"
|
|
15
|
-
]
|
|
16
|
-
}
|
package/tsconfig.json
DELETED
package/vite.config.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineConfig, mergeConfig } from 'vite'
|
|
2
|
-
import { defaultConfig } from '../../vite.config'
|
|
3
|
-
|
|
4
|
-
export default mergeConfig(defineConfig(defaultConfig), {
|
|
5
|
-
build: {
|
|
6
|
-
lib: {
|
|
7
|
-
formats: ['es', 'cjs'],
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
test: {
|
|
11
|
-
environment: 'jsdom',
|
|
12
|
-
setupFiles: ['./vitest.setup.ts'],
|
|
13
|
-
},
|
|
14
|
-
})
|
package/vitest.setup.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as matchers from '@testing-library/jest-dom/matchers'
|
|
2
|
-
import '@testing-library/jest-dom/vitest'
|
|
3
|
-
import { cleanup } from '@testing-library/react'
|
|
4
|
-
import { afterEach, expect, vi } from 'vitest'
|
|
5
|
-
|
|
6
|
-
expect.extend(matchers)
|
|
7
|
-
|
|
8
|
-
afterEach(() => {
|
|
9
|
-
cleanup()
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
vi.mock('@growthbook/growthbook-react')
|