Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 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
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
eba9524
chore(release): publish
amplitude-sdk-dev Jan 2, 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
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/github-pages-deploy-action@4.1.5
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
8 changes: 4 additions & 4 deletions .github/workflows/publish-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:

# Temporarily disable exit on error to capture output even when command fails
set +e
OUTPUT=$(GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --no-private --create-release github 2>&1)
OUTPUT=$(GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version -y --no-private --create-release github 2>&1)
EXIT_CODE=$?
set -e

Expand All @@ -120,7 +120,7 @@ jobs:
# Publish to NPM
- name: Publish Release to NPM
run: |
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:publish -- ${{ env.PUBLISH_FROM }} -y --pre-dist-tag beta --loglevel silly
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:publish
env:
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}

Expand Down Expand Up @@ -174,12 +174,12 @@ jobs:
- name: Dry run pre-release version
if: ${{ github.event.inputs.releaseType == 'dry-run' }}
run: |
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.determine-branch.outputs.branch }} --no-changelog --no-push --no-git-tag-version
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version:dry-run -y --preid ${{ env.PREID }}

- name: Pre-release version
if: ${{ github.event.inputs.releaseType == 'prerelease' }}
run: |
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.determine-branch.outputs.branch }} --create-release github
GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.determine-branch.outputs.branch }} --create-release github

# Use 'from git' option if `lerna version` has already been run
- name: Publish Release to NPM
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
Loading
Loading