refactor: remove analytics-types from workspace - #1906
refactor: remove analytics-types from workspace#1906daniel-graham-amplitude wants to merge 2 commits into
Conversation
333655e to
59570ce
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Deprecated package path check removed
- Restored the deprecated directory diff guard while allowing the intentional deletion of packages/analytics-types.
Or push these changes by commenting:
@cursor push c902e9e7ac
Preview (c902e9e7ac)
diff --git a/scripts/check-deprecated-packages.sh b/scripts/check-deprecated-packages.sh
--- a/scripts/check-deprecated-packages.sh
+++ b/scripts/check-deprecated-packages.sh
@@ -8,10 +8,25 @@
set -e
DEPRECATED_PACKAGES=("@amplitude/analytics-types" "@amplitude/analytics-remote-config")
+DEPRECATED_PACKAGE_DIRS=("packages/analytics-types")
FAILED=0
echo "Checking for new usage of deprecated packages..."
+# Allow deprecated packages to be deleted, but reject all other changes.
+echo "Checking for code changes in deprecated packages..."
+for DIR in "${DEPRECATED_PACKAGE_DIRS[@]}"; do
+ CHANGED_IN_DIR=$(git diff --diff-filter=d --name-only origin/${GITHUB_BASE_REF:-main}...HEAD | grep "^$DIR/" || true)
+
+ if [ -n "$CHANGED_IN_DIR" ]; then
+ echo "❌ ERROR: Code changes detected in deprecated package '$DIR'"
+ echo "Changed files:"
+ echo "$CHANGED_IN_DIR" | sed 's/^/ - /'
+ echo ""
+ FAILED=1
+ fi
+done
+
# Get the list of changed package.json files
CHANGED_FILES=$(git diff --name-only origin/${GITHUB_BASE_REF:-main}...HEAD | grep 'package.json$' || true)You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 59570ce. Configure here.
| FAILED=1 | ||
| fi | ||
| done | ||
|
|
There was a problem hiding this comment.
Deprecated package path check removed
Medium Severity
The deprecated-package CI script no longer inspects git diffs for changes under packages/analytics-types/, but the header and success output still claim that policy is enforced. A follow-up PR could reintroduce or edit that tree without failing check-deprecated-packages, even though CONTRIBUTING and the failure text still forbid it.
Reviewed by Cursor Bugbot for commit 59570ce. Configure here.
size-limit report 📦
|
Session Replay Browser E2E ResultsDetails
Flaky testschromium › e2e/trc-url-rule.spec.ts › TRC URL rule — happy path › starts recording after SPA navigation to a matching URL |
664db0a to
ed1890f
Compare



Summary
Checklist
Note
Medium Risk
Monorepo-wide type source changes (workspace vs fixed npm) can cause subtle type or duplicate-package issues at build time, though runtime behavior should match 2.11.1.
Overview
Removes the in-repo
packages/analytics-typespackage entirely and stops treating shared SDK types as a workspace member.plugin-global-user-properties,plugin-session-replay-browser,plugin-web-attribution-browser,session-replay-browser, andtargetingnow depend on the published npm package@amplitude/analytics-types@2.11.1instead ofworkspace:*, withpnpm-lock.yamlupdated to match.scripts/check-deprecated-packages.shno longer fails PRs that touchpackages/analytics-types, since that directory is gone; it still blocks new deprecated package dependencies inpackage.json.Reviewed by Cursor Bugbot for commit 59570ce. Bugbot is set up for automated code reviews on this repo. Configure here.