@scaleway/use-growthbook 2.1.9 → 2.1.10

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.
@@ -5,8 +5,8 @@ const growthbookReact = require("@growthbook/growthbook-react");
5
5
  const react = require("react");
6
6
  const defaultLoadConfig = {
7
7
  autoRefresh: false,
8
- timeout: 500,
9
- skipCache: false
8
+ skipCache: false,
9
+ timeout: 500
10
10
  };
11
11
  const getGrowthBookInstance = ({
12
12
  config: {
@@ -19,11 +19,11 @@ const getGrowthBookInstance = ({
19
19
  trackingCallback
20
20
  }) => new growthbookReact.GrowthBook({
21
21
  apiHost,
22
+ backgroundSync,
22
23
  clientKey,
23
24
  enableDevMode,
24
- trackingCallback,
25
- backgroundSync,
26
- subscribeToChanges
25
+ subscribeToChanges,
26
+ trackingCallback
27
27
  });
28
28
  const AbTestProvider = ({
29
29
  children,
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import type { ComponentType, ReactNode } from 'react';
2
2
  import type { Attributes, ErrorCallback, LoadConfig, ToolConfig, TrackingCallback } from './types';
3
3
  type AbTestProviderProps = {
4
4
  children: ReactNode;
@@ -8,5 +8,5 @@ type AbTestProviderProps = {
8
8
  attributes: Attributes;
9
9
  loadConfig?: LoadConfig;
10
10
  };
11
- export declare const AbTestProvider: ({ children, config, trackingCallback, errorCallback, attributes, loadConfig, }: AbTestProviderProps) => import("react").JSX.Element;
11
+ export declare const AbTestProvider: ComponentType<AbTestProviderProps>;
12
12
  export {};
@@ -3,8 +3,8 @@ import { GrowthBook, GrowthBookProvider } from "@growthbook/growthbook-react";
3
3
  import { useMemo, useCallback, useEffect } from "react";
4
4
  const defaultLoadConfig = {
5
5
  autoRefresh: false,
6
- timeout: 500,
7
- skipCache: false
6
+ skipCache: false,
7
+ timeout: 500
8
8
  };
9
9
  const getGrowthBookInstance = ({
10
10
  config: {
@@ -17,11 +17,11 @@ const getGrowthBookInstance = ({
17
17
  trackingCallback
18
18
  }) => new GrowthBook({
19
19
  apiHost,
20
+ backgroundSync,
20
21
  clientKey,
21
22
  enableDevMode,
22
- trackingCallback,
23
- backgroundSync,
24
- subscribeToChanges
23
+ subscribeToChanges,
24
+ trackingCallback
25
25
  });
26
26
  const AbTestProvider = ({
27
27
  children,
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const growthbookReact = require("@growthbook/growthbook-react");
4
- const useAbTestAttributes = require("./useAbTestAttributes.cjs");
5
4
  const AbTestProvider = require("./AbTestProvider.cjs");
5
+ const useAbTestAttributes = require("./useAbTestAttributes.cjs");
6
6
  Object.defineProperty(exports, "FeatureString", {
7
7
  enumerable: true,
8
8
  get: () => growthbookReact.FeatureString
@@ -43,5 +43,5 @@ Object.defineProperty(exports, "withRunExperiment", {
43
43
  enumerable: true,
44
44
  get: () => growthbookReact.withRunExperiment
45
45
  });
46
- exports.useAbTestAttributes = useAbTestAttributes.useAbTestAttributes;
47
46
  exports.AbTestProvider = AbTestProvider.AbTestProvider;
47
+ exports.useAbTestAttributes = useAbTestAttributes.useAbTestAttributes;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- export { useExperiment, useFeature, withRunExperiment, useFeatureIsOn, useFeatureValue, useGrowthBook, useGrowthBookSSR, } from '@growthbook/growthbook-react';
2
- export { FeatureString, FeaturesReady, IfFeatureEnabled, } from '@growthbook/growthbook-react';
3
- export { useAbTestAttributes } from './useAbTestAttributes';
1
+ export { FeatureString, FeaturesReady, IfFeatureEnabled, useExperiment, useFeature, useFeatureIsOn, useFeatureValue, useGrowthBook, useGrowthBookSSR, withRunExperiment, } from '@growthbook/growthbook-react';
4
2
  export { AbTestProvider } from './AbTestProvider';
5
- export type { TrackingCallback, ErrorCallback, ToolConfig } from './types';
3
+ export type { ErrorCallback, ToolConfig, TrackingCallback } from './types';
4
+ export { useAbTestAttributes } from './useAbTestAttributes';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { FeatureString, FeaturesReady, IfFeatureEnabled, useExperiment, useFeature, useFeatureIsOn, useFeatureValue, useGrowthBook, useGrowthBookSSR, withRunExperiment } from "@growthbook/growthbook-react";
2
- import { useAbTestAttributes } from "./useAbTestAttributes.js";
3
2
  import { AbTestProvider } from "./AbTestProvider.js";
3
+ import { useAbTestAttributes } from "./useAbTestAttributes.js";
4
4
  export {
5
5
  AbTestProvider,
6
6
  FeatureString,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/use-growthbook",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "Utility package to expose AB test tool",
5
5
  "engines": {
6
6
  "node": ">=20.x"
@@ -34,10 +34,10 @@
34
34
  "feature flags"
35
35
  ],
36
36
  "dependencies": {
37
- "@growthbook/growthbook-react": "1.5.1"
37
+ "@growthbook/growthbook-react": "1.6.2"
38
38
  },
39
39
  "devDependencies": {
40
- "react": "19.1.0"
40
+ "react": "19.2.3"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": "18.x || 19.x"