Skip to content

use local variables - #1913

Draft
daniel-graham-amplitude wants to merge 1 commit into
mainfrom
no-ticket-react-native-example-setup
Draft

use local variables#1913
daniel-graham-amplitude wants to merge 1 commit into
mainfrom
no-ticket-react-native-example-setup

Conversation

@daniel-graham-amplitude

@daniel-graham-amplitude daniel-graham-amplitude commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

Note

Low Risk
Example-app-only dependency and config changes; no production SDK or library code modified.

Overview
The expo-app example no longer depends on monorepo workspace:* links for @amplitude/analytics-react-native and the network-capture plugin. It pins @amplitude/analytics-react-native@1.6.8 and @amplitude/babel-plugin-autocapture-transformer@0.1.1 from npm, with an updated pnpm-lock.yaml reflecting the published dependency tree (including transitive @amplitude/plugin-network-capture-browser).

App.tsx drops the explicit network-capture plugin import and sets autocapture.networkTracking to false instead of a config object with ignoreHosts. babel.config.js runs transform-inline-environment-variables before the autocapture Babel plugin so env vars are inlined in the right order.

pnpm-workspace.yaml adds minimumReleaseAgeExclude for @amplitude/* so those scoped packages can install without pnpm’s minimum release age delay.

Reviewed by Cursor Bugbot for commit c19b447. Bugbot is set up for automated code reviews on this repo. Configure here.

@daniel-graham-amplitude
daniel-graham-amplitude requested a review from a team as a code owner July 28, 2026 23:08
@daniel-graham-amplitude
daniel-graham-amplitude marked this pull request as draft July 28, 2026 23:08

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Conflicting babel plugin declarations
    • Removed the leftover workspace entry from devDependencies so the babel plugin is only declared as 0.1.1 under dependencies, matching the lockfile.

Create PR

Or push these changes by commenting:

@cursor push 2e113cf242
Preview (2e113cf242)
diff --git a/examples/react-native/expo-app/package.json b/examples/react-native/expo-app/package.json
--- a/examples/react-native/expo-app/package.json
+++ b/examples/react-native/expo-app/package.json
@@ -27,7 +27,6 @@
     "react-native-web": "0.18.10"
   },
   "devDependencies": {
-    "@amplitude/babel-plugin-autocapture-transformer": "workspace:*",
     "@babel/core": "^7.20.5",
     "babel-plugin-transform-inline-environment-variables": "^0.4.4",
     "@types/react": "~18.0.26",

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit c19b447. Configure here.

"@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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conflicting babel plugin declarations

High Severity

@amplitude/babel-plugin-autocapture-transformer is declared as 0.1.1 under dependencies and still as workspace:* under devDependencies. The lockfile only records the published specifier, so package.json and pnpm-lock.yaml disagree and installs with a frozen lockfile can fail or resolve unpredictably.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit c19b447. Configure here.

@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
packages/analytics-browser/lib/scripts/amplitude-min.js.gz 61.28 KB (0%)
packages/session-replay-browser/lib/scripts/session-replay-browser-min.js.gz 134.97 KB (0%)
packages/unified/lib/scripts/amplitude-min.umd.js.gz 215.36 KB (0%)
@amplitude/element-selector (gzipped esm) 2.67 KB (0%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant