Skip to content
Open
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
4a01050
chore: start migration from Yarn -> PNPM (#1443)
daniel-graham-amplitude Dec 29, 2025
5ed0db2
chore: use PNPM workspaces (#1446)
daniel-graham-amplitude Dec 30, 2025
244d9db
chore: migrate publish workflows to PNPM (#1448)
daniel-graham-amplitude Dec 30, 2025
253e268
docs: update documentation to use pnpm over yarn (#1449)
daniel-graham-amplitude Dec 30, 2025
bfe323e
merge from main
daniel-graham-amplitude Jan 1, 2026
7b1baaa
fix: action use pnpm over yarn
daniel-graham-amplitude Jan 1, 2026
87c90f1
fix: apply rage clicks to window over viewport
daniel-graham-amplitude Jan 1, 2026
afc8b78
fix test
daniel-graham-amplitude Jan 2, 2026
7ff875d
chore: update publish tag
daniel-graham-amplitude Jan 2, 2026
7c1a535
chore: fix -- problem with pnpm (#1462)
daniel-graham-amplitude Jan 2, 2026
b6afc2a
chore(release): publish
amplitude-sdk-dev Jan 2, 2026
359ec7c
chore: remove unknown args pnpm publish
daniel-graham-amplitude Jan 2, 2026
2f2e86b
chore: rebase pnpm-migration
daniel-graham-amplitude Jan 2, 2026
c2808e9
Revert "chore(release): publish"
daniel-graham-amplitude Jan 2, 2026
d36dc92
chore: clean up PR
daniel-graham-amplitude Jan 2, 2026
003570e
chore: clean up PR
daniel-graham-amplitude Jan 2, 2026
771aada
dummy commit
daniel-graham-amplitude Jan 2, 2026
6c9c7d6
chore: fix git-checks version to publish
daniel-graham-amplitude Jan 2, 2026
db34376
empty
daniel-graham-amplitude Jan 2, 2026
b8a027e
Revert "empty"
daniel-graham-amplitude Jan 2, 2026
935fc68
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Jan 2, 2026
0a24f2d
chore: fix git-checks version to publish
daniel-graham-amplitude Jan 2, 2026
96defd0
again
daniel-graham-amplitude Jan 2, 2026
3feb114
chore: fix git-checks version to publish
daniel-graham-amplitude Jan 2, 2026
cdbcdb2
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Jan 2, 2026
07b1239
Merge branch 'pnpm-migration' of github.com:amplitude/Amplitude-TypeS…
daniel-graham-amplitude Jan 2, 2026
6749750
fix: implement highlight text fix
daniel-graham-amplitude Jan 2, 2026
eba9524
chore(release): publish
amplitude-sdk-dev Jan 2, 2026
ce48dcd
fix: add selection observer to cancel out rage clicks
daniel-graham-amplitude Jan 3, 2026
e974e48
chore: add selection observable test
daniel-graham-amplitude Jan 3, 2026
e8bab23
again
daniel-graham-amplitude Jan 2, 2026
438d897
chore: add "auto" yes to version
daniel-graham-amplitude Jan 2, 2026
66ffd36
chore: clean up PR
daniel-graham-amplitude Jan 3, 2026
d8c094d
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Jan 3, 2026
bd7598b
fix: test coverage
daniel-graham-amplitude Jan 3, 2026
d0cc2e7
fix: make selection unsubscribable too
daniel-graham-amplitude Jan 3, 2026
a6793e0
chore: make unit tests leaner
daniel-graham-amplitude Jan 3, 2026
eb2a3ba
again
daniel-graham-amplitude Jan 3, 2026
2e728e5
refactor tests
daniel-graham-amplitude Jan 3, 2026
73f6737
chore: fix deploy script
daniel-graham-amplitude Jan 5, 2026
c3e9774
refactor tests
daniel-graham-amplitude Jan 5, 2026
454f675
add back targeting manager
daniel-graham-amplitude Jan 5, 2026
9ef44ba
fix: apply rage clicks to window over viewport
daniel-graham-amplitude Jan 1, 2026
a2076e4
fix test
daniel-graham-amplitude Jan 2, 2026
2f9f9a5
chore: cleanup rage click tests
daniel-graham-amplitude Jan 5, 2026
fe3dc36
Merge branch 'AMP-146045-rage-click-fix-mobile-scroll-false-positive'…
daniel-graham-amplitude Jan 5, 2026
8a4fbdd
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Jan 5, 2026
961ca02
Merge branch 'AMP-146045-rage-click-fix-mobile-scroll-false-positive'…
daniel-graham-amplitude Jan 5, 2026
eaeb3d1
Merge branch 'main' of github.com:amplitude/Amplitude-TypeScript into…
daniel-graham-amplitude Jan 5, 2026
9eb5742
fix: handle selectionStart exceptions
daniel-graham-amplitude Jan 5, 2026
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ labels: 'bug'

## Environment
- JS SDK Version: <!--- E.g. 7.1.0 -->
- Installation Method: <!-- I.e. NPM/Yarn or <script> import -->
- Installation Method: <!-- I.e. NPM/yarn/pnpm or <script> import -->
- Browser and Version: <!-- E.g. Chrome 84-->
18 changes: 8 additions & 10 deletions .github/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,34 @@ inputs:
runs:
using: "composite"
steps:
- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'

- name: Install project dependencies
run: |
yarn install --frozen-lockfile
pnpm install --frozen-lockfile
shell: bash

- name: Build all packages
run: |
yarn build
pnpm build
shell: bash

- name: Test all packages
run: |
yarn test
pnpm test
shell: bash

- name: Lint all packages
run: |
yarn lint
pnpm lint
shell: bash

- name: Configure Git User
Expand Down
15 changes: 9 additions & 6 deletions .github/actions/e2e-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ runs:
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install project dependencies
shell: bash
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build all packages
shell: bash
run: yarn build
run: pnpm build

- name: Create .env file
shell: bash
Expand All @@ -49,14 +52,14 @@ runs:
- name: Start dev server
shell: bash
run: |
yarn build:vite
yarn start --port ${{ inputs.server-port }} &
pnpm build:vite
pnpm start --port ${{ inputs.server-port }} &
sleep 10
curl -f http://localhost:${{ inputs.server-port }} || exit 1

- name: Run Playwright tests
shell: bash
run: yarn test:playwright:ci
run: pnpm test:playwright:ci

- name: Upload Playwright Report
if: always()
Expand Down
36 changes: 16 additions & 20 deletions .github/workflows/ci-nx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js 20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Install project dependencies
run: |
yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Build all packages
run: |
yarn build
run: pnpm build

- name: Build docs
run: |
yarn docs:check
run: pnpm docs:check

build:
name: Build
Expand All @@ -65,20 +66,17 @@ jobs:
with:
fetch-depth: 0 # Required for NX affected commands

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install project dependencies
run: |
yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Set up NX base for affected commands
run: |
Expand All @@ -87,7 +85,7 @@ jobs:

- name: Build affected packages
run: |
yarn build:nx-affected
pnpm build:nx-affected

# https://github.com/amplitude/Amplitude-TypeScript/issues/281
- name: Check module dependencies
Expand All @@ -103,9 +101,7 @@ jobs:
fi

- name: Test affected packages
run: |
yarn test:nx-affected
run: pnpm test:nx-affected

- name: Lint affected packages
run: |
yarn lint:nx-affected
run: pnpm lint:nx-affected
20 changes: 9 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,22 @@ jobs:
- name: Check out git repository
uses: actions/checkout@v3

- name: Cache dependencies
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install project dependencies
run: |
yarn install --frozen-lockfile
pnpm install --frozen-lockfile

- name: Build all packages
run: |
yarn build
pnpm build

# https://github.com/amplitude/Amplitude-TypeScript/issues/281
- name: Check module dependencies
Expand All @@ -54,12 +52,12 @@ jobs:

- name: Build docs
run: |
yarn docs:check
pnpm docs:check

- name: Test all packages
run: |
yarn test
pnpm test

- name: Lint all packages
run: |
yarn lint
pnpm lint
9 changes: 6 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup
run: |
yarn
yarn build
yarn docs
pnpm install --frozen-lockfile
pnpm build
pnpm docs

- name: Deploy
uses: JamesIves/[email protected]
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/publish-single-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,23 +112,20 @@ jobs:
echo "New packages can publish beta/alpha versions with latest tag"
fi

# Cache node_modules for faster builds
- name: Cache dependencies
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup PNPM
uses: pnpm/action-setup@v4

# Setup Node.js environment
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

# Install all project dependencies
- name: Install project dependencies
run: |
yarn install --frozen-lockfile
pnpm install --frozen-lockfile

# Configure Git for automated commits
- name: Configure Git User
Expand Down Expand Up @@ -164,7 +161,7 @@ jobs:
# Update version in src/version.ts - this file must exist
if [ -f "src/version.ts" ]; then
echo "Updating src/version.ts with new version"
echo "// Autogenerated by \`yarn version-file\`. DO NOT EDIT" > src/version.ts
echo "// Autogenerated by \`pnpm version-file\`. DO NOT EDIT" > src/version.ts
echo "export const VERSION = '$NEW_VERSION';" >> src/version.ts
echo "✅ Updated src/version.ts to version $NEW_VERSION"
else
Expand All @@ -191,17 +188,17 @@ jobs:
# Build the package to ensure it compiles correctly
- name: Build package
run: |
yarn build
pnpm build

# Run tests to ensure package quality
- name: Test package
run: |
yarn test
pnpm test

# Lint the code to ensure code quality standards
- name: Lint package
run: |
yarn lint
pnpm lint

# Configure NPM authentication for publishing
- name: Configure NPM User
Expand Down Expand Up @@ -257,7 +254,7 @@ jobs:

# Publish to npm with latest tag (always latest for new packages)
echo "Publishing $PACKAGE_NAME@$NEW_VERSION with tag latest"
npm publish --tag latest --access=public
pnpm publish --tag latest --access=public
echo "✅ Published $PACKAGE_NAME@$NEW_VERSION to npm with tag latest"

# Restore package to private and commit all changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
pnpm commitlint --edit $1
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint:staged
pnpm install --frozen-lockfile
pnpm lint:staged
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ This repository uses GitHub Actions for continuous integration. Contributors sho
Before running any tests or scripts, install dependencies and build the packages:

```bash
yarn install --frozen-lockfile
yarn build
pnpm install
pnpm build
```

## Testing and Linting

1. Install dependencies with `yarn install --frozen-lockfile`.
2. Build all packages with `yarn build`.
3. Verify documentation with `yarn docs:check`.
4. Run unit tests with `yarn test` and example tests with `yarn test:examples`.
5. Lint the code using `yarn lint`.
1. Install dependencies with `pnpm install`.
2. Build all packages with `pnpm build`.
3. Verify documentation with `pnpm docs:check`.
4. Run unit tests with `pnpm test` and example tests with `pnpm test:examples`.
5. Lint the code using `pnpm lint`.

These steps must pass before you submit your PR.

Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ Getting setup is quick and easy. Follow the steps below to get your your dev env

```
$ git clone <HTTPS_OR_GIT_URL>
$ yarn
$ yarn build
$ pnpm install
$ pnpm build
```

This repo contains mutliple major versions of all packages. For contributions to version `1.x`, create a branch off `v1.x`. For contributions to the `2.x` (latest) version, create a branch off `main`. Refer to the table below for more infomation about the release status of each package.
Expand All @@ -48,8 +48,8 @@ This repo contains mutliple major versions of all packages. For contributions to
Building quality software is one of our top priorities. We recommend getting your changes tested using manual and automated practices.

```
$ yarn build
$ yarn test
$ pnpm build
$ pnpm test
```

When writing commit message, follow [PR Commit Title Conventions](#PR-Commit-Title-Conventions) for the format. A git hook will also run to verify that the format is followed.
Expand Down Expand Up @@ -94,7 +94,7 @@ PR titles should follow [conventional commit standards](https://www.conventional
- `test(<optional scope>)`: Test updates
- `refactor(<optional scope>)`: Code change that neither fixes a bug nor adds a feature
- `style(<optional scope>)`: Code style changes (e.g. formatting, commas, semi-colons)
- `build(<optional scope>)`: Changes that affect the build system or external dependencies (e.g. Yarn, Npm)
- `build(<optional scope>)`: Changes that affect the build system or external dependencies (e.g. pnpm, Npm)
- `ci(<optional scope>)`: Changes to our CI configuration files and scripts
- `chore(<optional scope>)`: Other changes that don't modify src or test files
- `revert(<optional scope>)`: Revert commit
Loading
Loading