Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d9fca01
feat: migrate rage clicks to Zen Observable (#1354)
daniel-graham-amplitude Oct 30, 2025
f933ec3
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Oct 30, 2025
d317063
again
daniel-graham-amplitude Oct 30, 2025
48e9d25
refactor: dead clicks from RxJS to Zen Observable (#1364)
daniel-graham-amplitude Oct 30, 2025
877147e
refactor: remove RxJS from "frustration-plugin" code (#1376)
daniel-graham-amplitude Oct 31, 2025
82f0e00
chore: migrate network tracking to zen observable (#1373)
daniel-graham-amplitude Oct 31, 2025
02270be
refactor: track-change use ZenObservable over RxJS (#1377)
daniel-graham-amplitude Oct 31, 2025
8474670
refactor: track action click RxJS -> Zen (#1378)
daniel-graham-amplitude Nov 7, 2025
0fcab03
fix: remove rage click functionality from track-click (#1383)
daniel-graham-amplitude Nov 8, 2025
948fd11
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Nov 8, 2025
f9e2f80
chore(release): publish
amplitude-sdk-bot Nov 10, 2025
a3b4368
refactor: track-click from rxjs to zen (#1384)
daniel-graham-amplitude Nov 11, 2025
3137bf5
chore(release): publish
amplitude-sdk-bot Nov 11, 2025
a5d3241
feat(page-view-tracking-browser): Track page view id in session stora…
Dogfalo Nov 12, 2025
f830069
feat(autocapture): add method to get unique element path for element
Dogfalo Oct 29, 2025
6b53d02
Revert "chore(release): publish"
daniel-graham-amplitude Nov 12, 2025
f68b67f
Revert "chore(release): publish"
daniel-graham-amplitude Nov 12, 2025
4d01eca
Merge branch 'feat-zoning' of github.com:amplitude/Amplitude-TypeScri…
daniel-graham-amplitude Nov 12, 2025
dd6ed60
remove rxjs
daniel-graham-amplitude Nov 12, 2025
353f9dd
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Nov 12, 2025
b51f8e8
again
daniel-graham-amplitude Nov 12, 2025
27f23dd
again
daniel-graham-amplitude Nov 12, 2025
e065421
again
daniel-graham-amplitude Nov 12, 2025
344a509
chore(release): publish
amplitude-sdk-bot Nov 12, 2025
5af9048
fix(analytics-core): record unsuccessful response (#1405) (#1406)
Mercy811 Nov 18, 2025
5b1b5f5
test(analytics-browser-test): update analytics-browser version
Mercy811 Nov 19, 2025
7081e5b
Revert "test(analytics-browser-test): update analytics-browser version"
Mercy811 Nov 19, 2025
11994b6
test(analytics-browser-test): update analytics-browser version (#1407)
Mercy811 Nov 19, 2025
0f202b3
chore(release): publish
amplitude-sdk-bot Nov 19, 2025
da9ba2f
Revert "chore(release): publish"
Mercy811 Nov 19, 2025
39b3484
ci: apply tags (#1408)
Mercy811 Nov 19, 2025
c15b921
chore(release): publish
amplitude-sdk-bot Nov 19, 2025
d742933
fix(analytics-core): record unsuccessful response from catch error (#…
Mercy811 Nov 20, 2025
2466a6a
chore(release): publish
amplitude-sdk-bot Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/feature-branch-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,50 @@ jobs:
run: |
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.branch-name.outputs.current_branch }} --create-release github

# Update test packages to use exact versions of their dependencies
- name: Update test package dependencies
run: |
echo "Updating test package dependencies..."

# Get the new version of analytics-browser
BROWSER_VERSION=$(node -p "require('./packages/analytics-browser/package.json').version")
echo "Current @amplitude/analytics-browser version: $BROWSER_VERSION"

# Get the current dependency version in analytics-browser-test
CURRENT_DEP=$(node -p "require('./packages/analytics-browser-test/package.json').dependencies['@amplitude/analytics-browser']")
echo "Current dependency in analytics-browser-test: $CURRENT_DEP"

# Update if versions differ
if [ "$BROWSER_VERSION" != "$CURRENT_DEP" ]; then
echo "Updating analytics-browser-test to use @amplitude/analytics-browser@$BROWSER_VERSION"
cd packages/analytics-browser-test
npm pkg set dependencies.@amplitude/analytics-browser="$BROWSER_VERSION"
cd ../..

# Get all tags pointing to the current HEAD before amending
TAGS=$(git tag --points-at HEAD)

# Add and amend to the version commit
git add packages/analytics-browser-test/package.json
git commit --amend --no-edit --no-verify

# Re-apply all tags to the new HEAD (after amend)
for TAG in $TAGS; do
echo "Moving tag $TAG to amended commit"
git tag -f "$TAG"
done

# Push the amended commit if this is a real prerelease (not dry-run)
if [ "${{ github.event.inputs.releaseType }}" == "prerelease" ]; then
git push origin ${{ steps.branch-name.outputs.current_branch }} --follow-tags --force
echo "✅ Updated and pushed analytics-browser-test dependency"
else
echo "✅ Updated analytics-browser-test dependency (dry-run, not pushed)"
fi
else
echo "✅ analytics-browser-test already uses the correct version"
fi

# Use 'from git' option if `lerna version` has already been run
- name: Publish Release to NPM
if: ${{ github.event.inputs.releaseType == 'prerelease' }}
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/publish-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,45 @@ jobs:

echo "✅ Successfully created release version"

# Update test packages to use exact versions of their dependencies
- name: Update test package dependencies
if: ${{ env.PUBLISH_FROM != 'from-package' }}
run: |
echo "Updating test package dependencies..."

# Get the new version of analytics-browser
BROWSER_VERSION=$(node -p "require('./packages/analytics-browser/package.json').version")
echo "Current @amplitude/analytics-browser version: $BROWSER_VERSION"

# Get the current dependency version in analytics-browser-test
CURRENT_DEP=$(node -p "require('./packages/analytics-browser-test/package.json').dependencies['@amplitude/analytics-browser']")
echo "Current dependency in analytics-browser-test: $CURRENT_DEP"

# Update if versions differ
if [ "$BROWSER_VERSION" != "$CURRENT_DEP" ]; then
echo "Updating analytics-browser-test to use @amplitude/analytics-browser@$BROWSER_VERSION"
cd packages/analytics-browser-test
npm pkg set dependencies.@amplitude/analytics-browser="$BROWSER_VERSION"
cd ../..

# Get all tags pointing to the current HEAD before amending
TAGS=$(git tag --points-at HEAD)

# Add and amend to the version commit
git add packages/analytics-browser-test/package.json
git commit --amend --no-edit --no-verify

# Re-apply all tags to the new HEAD (after amend)
for TAG in $TAGS; do
echo "Moving tag $TAG to amended commit"
git tag -f "$TAG"
done

echo "✅ Updated analytics-browser-test dependency"
else
echo "✅ analytics-browser-test already uses the correct version"
fi

# Publish to NPM using from-git or from-package:
# - from-git: Publishes packages tagged by 'lerna version' in the current commit (requires prior versioning)
# - from-package: Compares package.json versions with NPM registry, publishes any versions not present in registry
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cache": true
},
"test": {
"dependsOn": ["build"],
"dependsOn": ["^build", "build"],
"cache": true
},
"test:playwright": {
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-browser-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": "https://github.com/amplitude/Amplitude-TypeScript/issues"
},
"dependencies": {
"@amplitude/analytics-browser": "^2.6.3-beta.0"
"@amplitude/analytics-browser": "2.31.0-zen-plus-zoning.2"
},
"devDependencies": {
"nock": "^13.2.4"
Expand Down
1 change: 1 addition & 0 deletions packages/analytics-browser-test/test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ const generatePageViewEventProps = (
'[Amplitude] Page Path': url.pathname,
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': url.href.split('?')[0],
'[Amplitude] Page View ID': uuid,
...(options?.withPageURLEnrichmentProperties
? addPageUrlEnrichmentPreviousPageProperties(url.href, previousUrl.href || '')
: {}),
Expand Down
223 changes: 115 additions & 108 deletions packages/analytics-browser-test/test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1928,119 +1928,125 @@ describe('integration', () => {

return new Promise<void>((resolve) => {
setTimeout(() => {
expect(payload).toEqual({
api_key: apiKey,
client_upload_time: event_upload_time,
events: [
{
device_id: uuid,
event_id: 0,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/about',
'[Amplitude] Page Path': '/about',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/about',
'[Amplitude] Page Counter': 1,
'[Amplitude] Previous Page Location': '',
'[Amplitude] Previous Page Type': 'direct',
try {
expect(payload).toEqual({
api_key: apiKey,
client_upload_time: event_upload_time,
events: [
{
device_id: uuid,
event_id: 0,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/about',
'[Amplitude] Page Path': '/about',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/about',
'[Amplitude] Page View ID': uuid,
'[Amplitude] Page Counter': 1,
'[Amplitude] Previous Page Location': '',
'[Amplitude] Previous Page Type': 'direct',
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
{
device_id: uuid,
event_id: 1,
event_type: 'Event in first session',
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/about',
'[Amplitude] Page Path': '/about',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/about',
'[Amplitude] Previous Page Location': '',
'[Amplitude] Previous Page Type': 'direct',
{
device_id: uuid,
event_id: 1,
event_type: 'Event in first session',
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/about',
'[Amplitude] Page Path': '/about',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/about',
'[Amplitude] Previous Page Location': '',
'[Amplitude] Previous Page Type': 'direct',
},
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
{
device_id: uuid,
event_id: 2,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/contact',
'[Amplitude] Page Path': '/contact',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/contact',
'[Amplitude] Previous Page Location': 'https://www.example.com/about',
'[Amplitude] Previous Page Type': 'internal',
'[Amplitude] Page Counter': 2,
{
device_id: uuid,
event_id: 2,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/contact',
'[Amplitude] Page Path': '/contact',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/contact',
'[Amplitude] Page View ID': uuid,
'[Amplitude] Previous Page Location': 'https://www.example.com/about',
'[Amplitude] Previous Page Type': 'internal',
'[Amplitude] Page Counter': 2,
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
{
device_id: uuid,
event_id: 3,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/more',
'[Amplitude] Page Path': '/more',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/more',
'[Amplitude] Page Counter': 1,
'[Amplitude] Previous Page Location': 'https://www.example.com/contact',
'[Amplitude] Previous Page Type': 'internal',
{
device_id: uuid,
event_id: 3,
event_properties: {
'[Amplitude] Page Domain': 'www.example.com',
'[Amplitude] Page Location': 'https://www.example.com/more',
'[Amplitude] Page Path': '/more',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': 'https://www.example.com/more',
'[Amplitude] Page Counter': 1,
'[Amplitude] Page View ID': uuid,
'[Amplitude] Previous Page Location': 'https://www.example.com/contact',
'[Amplitude] Previous Page Type': 'internal',
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
},
event_type: '[Amplitude] Page Viewed',
insert_id: uuid,
ip: '$remote',
language: 'en-US',
library,
partner_id: undefined,
plan: undefined,
platform: 'Web',
session_id: number,
time: number,
user_agent: userAgent,
user_id: '[email protected]',
],
options: {
min_id_length: undefined,
},
],
options: {
min_id_length: undefined,
},
});
scope.done();
});
} finally {
scope.done();
}
resolve();
}, 4000);
});
Expand Down Expand Up @@ -2076,6 +2082,7 @@ describe('integration', () => {
'[Amplitude] Page Path': '',
'[Amplitude] Page Title': '',
'[Amplitude] Page URL': '',
'[Amplitude] Page View ID': uuid,
'[Amplitude] Page Counter': 1,
'[Amplitude] Previous Page Location': '',
'[Amplitude] Previous Page Type': 'direct',
Expand Down
Loading