From c19b447f48f11d74e98f0c313978d49f80037e1d Mon Sep 17 00:00:00 2001 From: Daniel Graham Date: Tue, 28 Jul 2026 16:08:19 -0700 Subject: [PATCH] use local variables --- examples/react-native/expo-app/App.tsx | 5 +- .../react-native/expo-app/babel.config.js | 2 +- examples/react-native/expo-app/package.json | 4 +- examples/react-native/expo-app/pnpm-lock.yaml | 58 ++++++++++++++++--- .../react-native/expo-app/pnpm-workspace.yaml | 6 +- 5 files changed, 59 insertions(+), 16 deletions(-) diff --git a/examples/react-native/expo-app/App.tsx b/examples/react-native/expo-app/App.tsx index 7c1ae62b4..0d67c6dad 100644 --- a/examples/react-native/expo-app/App.tsx +++ b/examples/react-native/expo-app/App.tsx @@ -1,7 +1,6 @@ import {Button, StyleSheet, Text, View} from 'react-native'; import {useEffect} from 'react'; import {identify, Identify, init, track, add, Types, trackScreenViewOnNavigationStateChange} from '@amplitude/analytics-react-native'; -import {networkCapturePlugin} from '@amplitude/plugin-network-capture-browser'; import { NavigationContainer, useNavigationContainerRef } from "@react-navigation/native"; import { createNativeStackNavigator } from "@react-navigation/native-stack"; import FetchNetworkTestScreen from './FetchNetworkTestScreen'; @@ -59,9 +58,7 @@ export default function App() { autocapture: { screenViews: true, elementInteractions: true, - networkTracking: { - ignoreHosts: ['http://localhost:8081'], - }, + networkTracking: false, appLifecycles: true, sessions: true, }, diff --git a/examples/react-native/expo-app/babel.config.js b/examples/react-native/expo-app/babel.config.js index 1d909e17e..7765e7789 100644 --- a/examples/react-native/expo-app/babel.config.js +++ b/examples/react-native/expo-app/babel.config.js @@ -3,13 +3,13 @@ module.exports = function (api) { return { presets: ['babel-preset-expo'], plugins: [ - '@amplitude/babel-plugin-autocapture-transformer', // Inlines AMPLITUDE_API_KEY from the shell environment at bundle time. // `export AMPLITUDE_API_KEY=…` before `pnpm run android` / `pnpm run ios`. [ 'transform-inline-environment-variables', {include: ['AMPLITUDE_API_KEY', 'TEST_SERVER_HOST']}, ], + '@amplitude/babel-plugin-autocapture-transformer', ], }; }; diff --git a/examples/react-native/expo-app/package.json b/examples/react-native/expo-app/package.json index 4a459bdf9..791845dff 100644 --- a/examples/react-native/expo-app/package.json +++ b/examples/react-native/expo-app/package.json @@ -9,8 +9,8 @@ "eject": "expo eject" }, "dependencies": { - "@amplitude/analytics-react-native": "workspace:*", - "@amplitude/plugin-network-capture-browser": "workspace:*", + "@amplitude/analytics-react-native": "1.6.8", + "@amplitude/babel-plugin-autocapture-transformer": "0.1.1", "@babel/runtime": "^7.20.0", "@react-native-async-storage/async-storage": "~1.17.11", "@react-navigation/native": "^6.1.18", diff --git a/examples/react-native/expo-app/pnpm-lock.yaml b/examples/react-native/expo-app/pnpm-lock.yaml index db9453cd5..b8fd3a1c8 100644 --- a/examples/react-native/expo-app/pnpm-lock.yaml +++ b/examples/react-native/expo-app/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@amplitude/analytics-react-native': - specifier: workspace:* - version: link:../../../packages/analytics-react-native - '@amplitude/plugin-network-capture-browser': - specifier: workspace:* - version: link:../../../packages/plugin-network-capture-browser + specifier: 1.6.8 + version: 1.6.8(react-native@0.71.14(@babel/core@7.28.6)(@babel/preset-env@7.28.6(@babel/core@7.28.6))(react@18.2.0))(react@18.2.0) + '@amplitude/babel-plugin-autocapture-transformer': + specifier: 0.1.1 + version: 0.1.1(@babel/core@7.28.6) '@babel/runtime': specifier: ^7.20.0 version: 7.28.6 @@ -57,9 +57,6 @@ importers: specifier: 0.18.10 version: 0.18.10(react-dom@18.2.0(react@18.2.0))(react@18.2.0) devDependencies: - '@amplitude/babel-plugin-autocapture-transformer': - specifier: workspace:* - version: link:../../../packages/babel-plugin-autocapture-transformer '@babel/core': specifier: ^7.20.5 version: 7.28.6 @@ -1084,9 +1081,23 @@ packages: '@amplitude/analytics-connector@1.6.4': resolution: {integrity: sha512-SpIv0IQMNIq6SH3UqFGiaZyGSc7PBZwRdq7lvP0pBxW8i4Ny+8zwI0pV+VMfMHQwWY3wdIbWw5WQphNjpdq1/Q==} + '@amplitude/analytics-core@2.54.1': + resolution: {integrity: sha512-VMpcIPw7MBM9glKwTZivMiPeUSysY06LZr0Rsdl35szJqKIl3JAuVPR8UnRyYOxqDUZfkOPIm9w1+3E/NNtWVw==} + + '@amplitude/analytics-react-native@1.6.8': + resolution: {integrity: sha512-s/n5yKLcoobuj4u62D4M8VJGXOPrGR6RrnFfN5gO0uzDPQJNEeSoFDO6k4mPygMEox6MLVBfCXKt9Zk1xbujMA==} + peerDependencies: + react: '*' + react-native: '*' + '@amplitude/analytics-types@1.4.0': resolution: {integrity: sha512-RiMPHBqdrJ8ktTqG+Wzj2htnN/PCG9jGZG0SXtTFnWwVvcAJYbYm55/nrP1TTyrx1OlLhvF2VG3lVUP/xGAU8w==} + '@amplitude/babel-plugin-autocapture-transformer@0.1.1': + resolution: {integrity: sha512-rCrvYpZ170noIqmNxR/T2Z3D1yZ1k7hbw+IK1w7A9PeoS2hWfKfraJdH81YstGRAXZ4oXkkh20gbe30PR5Q+LQ==} + peerDependencies: + '@babel/core': ^7.0.0 + '@amplitude/engagement-browser@1.0.10': resolution: {integrity: sha512-sv8ei+Xy2qMs31lvW3bJCOZBg8LRuorAxlzM8fmh3FyVaRMbs5WyQGaWSfJ8y5tqmllJnLfbBS5R38Mv6G3h7w==} @@ -1102,6 +1113,9 @@ packages: '@amplitude/experiment-js-client@1.21.1': resolution: {integrity: sha512-chE/4qQG/5Cgl93Wqj1NEdgOL5LkqySLlfk1EN0f+7bJa52HpkGFALA2FeCNYf31Z5CglEeKX6dUMgL7y33SIw==} + '@amplitude/plugin-network-capture-browser@1.10.12': + resolution: {integrity: sha512-FYdyMhPoToBL1GslOd7QjLctdhaL24sLKNGgXtYNVE8PiJNbmGNHWxf4Tr/CZ69uAuByXzo3Nvc0fGHpRIXiiQ==} + '@amplitude/rrdom@2.1.0': resolution: {integrity: sha512-2dAtxXL02usBV2CSOnScLd3WoVqWaeiGpxN8LuXJ0r/NpLJkW1k876v2tRKAz5NrxPwSdjihsMmwCIXHpJhHfA==} @@ -8367,8 +8381,31 @@ snapshots: '@amplitude/analytics-connector@1.6.4': {} + '@amplitude/analytics-core@2.54.1': + dependencies: + '@amplitude/analytics-connector': 1.6.4 + '@types/zen-observable': 0.8.3 + safe-json-stringify: 1.2.0 + tslib: 2.8.1 + zen-observable: 0.10.0 + + '@amplitude/analytics-react-native@1.6.8(react-native@0.71.14(@babel/core@7.28.6)(@babel/preset-env@7.28.6(@babel/core@7.28.6))(react@18.2.0))(react@18.2.0)': + dependencies: + '@amplitude/analytics-core': 2.54.1 + '@amplitude/plugin-network-capture-browser': 1.10.12 + '@amplitude/ua-parser-js': 0.7.33 + '@react-native-async-storage/async-storage': 1.17.12(react-native@0.71.14(@babel/core@7.28.6)(@babel/preset-env@7.28.6(@babel/core@7.28.6))(react@18.2.0)) + react: 18.2.0 + react-native: 0.71.14(@babel/core@7.28.6)(@babel/preset-env@7.28.6(@babel/core@7.28.6))(react@18.2.0) + tslib: 2.8.1 + '@amplitude/analytics-types@1.4.0': {} + '@amplitude/babel-plugin-autocapture-transformer@0.1.1(@babel/core@7.28.6)': + dependencies: + '@babel/core': 7.28.6 + tslib: 2.8.1 + '@amplitude/engagement-browser@1.0.10': dependencies: '@amplitude/analytics-types': 1.4.0 @@ -8395,6 +8432,11 @@ snapshots: base64-js: 1.5.1 unfetch: 4.1.0 + '@amplitude/plugin-network-capture-browser@1.10.12': + dependencies: + '@amplitude/analytics-core': 2.54.1 + tslib: 2.8.1 + '@amplitude/rrdom@2.1.0': dependencies: '@amplitude/rrweb-snapshot': 2.1.0 diff --git a/examples/react-native/expo-app/pnpm-workspace.yaml b/examples/react-native/expo-app/pnpm-workspace.yaml index e4a6aecb0..e728131c1 100644 --- a/examples/react-native/expo-app/pnpm-workspace.yaml +++ b/examples/react-native/expo-app/pnpm-workspace.yaml @@ -1,3 +1,7 @@ packages: - '.' - - '../../../packages/*' \ No newline at end of file + - '../../../packages/*' + +# allow @amplitude/babel-plugin-autocapture-transformer to be installed without 3 day delay +minimumReleaseAgeExclude: + - '@amplitude/*' \ No newline at end of file