@uxf/analytics 11.100.0 → 11.107.0

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/README.md CHANGED
@@ -140,12 +140,12 @@ export default function App({ Component, pageProps }) {
140
140
  }
141
141
  ```
142
142
 
143
- #### 3. Handle AB testing in `middleware.ts`
143
+ #### 3. Handle AB testing in `proxy.ts`
144
144
 
145
145
  ```ts
146
146
  import { handleABTesting } from "@uxf/analytics/ab-testing";
147
147
 
148
- export async function middleware(request: NextRequest) {
148
+ export async function proxy(request: NextRequest) {
149
149
  const nextResponse = NextResponse.next();
150
150
 
151
151
  handleABTesting(request, nextResponse, experiments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/analytics",
3
- "version": "11.100.0",
3
+ "version": "11.107.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "tsc -P tsconfig.json",
@@ -14,10 +14,13 @@
14
14
  },
15
15
  "author": "",
16
16
  "license": "ISC",
17
- "dependencies": {
18
- "@uxf/core": "11.100.0"
19
- },
20
17
  "peerDependencies": {
18
+ "@uxf/core": "11.107.0",
21
19
  "react": ">=18.0.2"
20
+ },
21
+ "devDependencies": {
22
+ "@types/react": "18.3.27",
23
+ "@uxf/core": "11.107.0",
24
+ "react": "18.3.1"
22
25
  }
23
26
  }
@@ -37,14 +37,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.ABTestingProvider = ABTestingProvider;
38
38
  exports.useABTesting = useABTesting;
39
39
  exports.useABTestingVariant = useABTestingVariant;
40
- const use_on_mount_1 = require("@uxf/core-react/hooks/use-on-mount");
41
40
  const react_1 = __importStar(require("react"));
42
41
  const ab_testing_1 = require("./ab-testing");
43
42
  const ABTestingContext = (0, react_1.createContext)([]);
44
43
  function ABTestingProvider(props) {
45
- (0, use_on_mount_1.useOnMount)(() => {
44
+ (0, react_1.useEffect)(() => {
46
45
  (0, ab_testing_1.sendABTestingEvent)(props.getExpVariantString);
47
- });
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps
47
+ }, []);
48
48
  return react_1.default.createElement(ABTestingContext.Provider, { value: props.experiments }, props.children);
49
49
  }
50
50
  function useABTesting() {