@scaleway/use-growthbook 2.1.4 → 2.1.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/use-growthbook",
3
- "version": "2.1.4",
3
+ "version": "2.1.6",
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",
@@ -31,13 +34,13 @@
31
34
  "feature flags"
32
35
  ],
33
36
  "dependencies": {
34
- "@growthbook/growthbook-react": "1.2.1"
37
+ "@growthbook/growthbook-react": "1.3.1"
35
38
  },
36
39
  "devDependencies": {
37
40
  "react": "18.3.1"
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
@@ -1,5 +0,0 @@
1
- **/__tests__/**
2
- examples/
3
- src
4
- .eslintrc.cjs
5
- !.npmignore
package/CHANGELOG.md DELETED
@@ -1,109 +0,0 @@
1
- # @scaleway/use-growthbook
2
-
3
- ## 2.1.4
4
-
5
- ### Patch Changes
6
-
7
- - [#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`.
8
-
9
- ## 2.1.3
10
-
11
- ### Patch Changes
12
-
13
- - [#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`.
14
-
15
- ## 2.1.2
16
-
17
- ### Patch Changes
18
-
19
- - [#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`.
20
-
21
- ## 2.1.1
22
-
23
- ### Patch Changes
24
-
25
- - [#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`.
26
-
27
- ## 2.1.0
28
-
29
- ### Minor Changes
30
-
31
- - [#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
32
-
33
- ## 2.0.4
34
-
35
- ### Patch Changes
36
-
37
- - [#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
38
-
39
- ## 2.0.3
40
-
41
- ### Patch Changes
42
-
43
- - [#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
44
-
45
- ## 2.0.2
46
-
47
- ### Patch Changes
48
-
49
- - [#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`.
50
-
51
- ## 2.0.1
52
-
53
- ### Patch Changes
54
-
55
- - [#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`.
56
-
57
- ## 2.0.0
58
-
59
- ### Major Changes
60
-
61
- - [#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
62
-
63
- ### Patch Changes
64
-
65
- - [#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`.
66
-
67
- ## 1.0.6
68
-
69
- ### Patch Changes
70
-
71
- - [#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`.
72
-
73
- ## 1.0.5
74
-
75
- ### Patch Changes
76
-
77
- - [#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`.
78
-
79
- ## 1.0.4
80
-
81
- ### Patch Changes
82
-
83
- - [#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
84
-
85
- - [#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`.
86
-
87
- ## 1.0.3
88
-
89
- ### Patch Changes
90
-
91
- - [#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
92
-
93
- ## 1.0.2
94
-
95
- ### Patch Changes
96
-
97
- - [#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`.
98
-
99
- ## 1.0.1
100
-
101
- ### Patch Changes
102
-
103
- - [#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
104
-
105
- ## 1.0.0
106
-
107
- ### Major Changes
108
-
109
- - [#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 }
@@ -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
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "include": ["src/**/*.ts", "src/**/*.tsx", "*.config.ts"]
4
- }
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')