@scaleway/use-growthbook 1.0.1 → 1.0.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 +12 -0
- package/dist/index.d.ts +5 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scaleway/use-growthbook
|
|
2
2
|
|
|
3
|
+
## 1.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#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
|
|
8
|
+
|
|
9
|
+
## 1.0.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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`.
|
|
14
|
+
|
|
3
15
|
## 1.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Context } from '@growthbook/growthbook-react';
|
|
1
2
|
export { Context, FeatureString, FeaturesReady, IfFeatureEnabled, useExperiment, useFeature, useFeatureIsOn, useFeatureValue, withRunExperiment } from '@growthbook/growthbook-react';
|
|
2
3
|
import * as react from 'react';
|
|
3
4
|
import { ReactNode } from 'react';
|
|
@@ -19,19 +20,16 @@ type ToolConfig = {
|
|
|
19
20
|
clientKey: string;
|
|
20
21
|
enableDevMode: boolean;
|
|
21
22
|
};
|
|
22
|
-
type TrackingCallback =
|
|
23
|
-
|
|
24
|
-
}, result: {
|
|
25
|
-
key: string;
|
|
26
|
-
}) => void;
|
|
23
|
+
type TrackingCallback = NonNullable<Context['trackingCallback']>;
|
|
24
|
+
type ErrorCallback = (error: Error | string) => void;
|
|
27
25
|
type AbTestProviderProps = {
|
|
28
26
|
children: ReactNode;
|
|
29
27
|
config: ToolConfig;
|
|
30
28
|
trackingCallback: TrackingCallback;
|
|
31
|
-
errorCallback:
|
|
29
|
+
errorCallback: ErrorCallback;
|
|
32
30
|
attributes: Attributes;
|
|
33
31
|
loadConfig?: LoadConfig;
|
|
34
32
|
};
|
|
35
33
|
declare const AbTestProvider: ({ children, config, trackingCallback, errorCallback, attributes, loadConfig, }: AbTestProviderProps) => react.JSX.Element;
|
|
36
34
|
|
|
37
|
-
export { AbTestProvider, useAbTestAttributes };
|
|
35
|
+
export { AbTestProvider, type ErrorCallback, type ToolConfig, type TrackingCallback, useAbTestAttributes };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/use-growthbook",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Utility package to expose AB test tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"feature flags"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@growthbook/growthbook-react": "0.
|
|
28
|
+
"@growthbook/growthbook-react": "0.18.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"react": "18.2.0"
|