Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ newPRWelcomeComment: |
Things that will help get your PR across the finish line:

- Follow the TypeScript [coding style](https://github.com/rrweb-io/rrweb/blob/master/docs/development/coding-style.md).
- Run `yarn lint` locally to catch formatting errors earlier.
- Run `pnpm lint` locally to catch formatting errors earlier.
- Document any user-facing changes you've made following the [documentation styleguide](https://github.com/rrweb-io/rrweb/blob/master/blob/main/docs/styleguide.md).
Comment on lines +8 to 9
- Include tests when adding/changing behavior.
- Include screenshots and animated GIFs whenever possible.
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'

- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true

- name: Build Project
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
run: NODE_OPTIONS='--max-old-space-size=4096' pnpm run build:all

- name: Install Playwright browsers
run: cd packages/rrvideo && yarn playwright install chromium
run: cd packages/rrvideo && pnpm exec playwright install chromium

- name: Read Puppeteer browser revision
id: puppeteer-browser
Expand All @@ -53,10 +57,10 @@ jobs:
chrome-version: ${{ steps.puppeteer-browser.outputs.revision }}

- name: Check types
run: yarn check-types
run: pnpm run check-types

- name: Run tests
run: PUPPETEER_EXECUTABLE_PATH=${{ steps.setup-chrome.outputs.chrome-path }} PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
run: PUPPETEER_EXECUTABLE_PATH=${{ steps.setup-chrome.outputs.chrome-path }} PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" pnpm run test

- name: Upload diff images to GitHub
uses: actions/upload-artifact@v4
Expand Down
33 changes: 25 additions & 8 deletions .github/workflows/eslint-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Build Packages
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
run: NODE_OPTIONS='--max-old-space-size=4096' pnpm run build:all
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Eslint Check
run: yarn turbo run lint
run: pnpm exec turbo run lint
- name: Save Code Linting Report JSON
run: yarn lint:report
run: pnpm run lint:report
# Continue to the next step even if this fails
continue-on-error: true
- name: Upload ESLint Report
Expand Down Expand Up @@ -84,13 +87,27 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Setup pnpm
if: ${{ hashFiles('pnpm-lock.yaml') != '' }}
uses: pnpm/action-setup@v6
with:
cache: true
- name: Install base dependencies
run: yarn install --frozen-lockfile
run: |
if [ -f pnpm-lock.yaml ]; then
pnpm install --frozen-lockfile
else
yarn install --frozen-lockfile
fi
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Build base branch
run: NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
run: |
if [ -f pnpm-lock.yaml ]; then
NODE_OPTIONS='--max-old-space-size=4096' pnpm run build:all
else
NODE_OPTIONS='--max-old-space-size=4096' yarn build:all
fi
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Measure base bundle sizes
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand All @@ -23,24 +23,29 @@ jobs:
with:
node-version: lts/*

- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true

- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn run release
publish: pnpm run release
env:
NODE_OPTIONS: '--max-old-space-size=4096'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build Chrome Extension
if: steps.changesets.outputs.published == 'true'
run: NODE_OPTIONS='--max-old-space-size=4096' DISABLE_WORKER_INLINING=true yarn turbo run prepublish --filter=@rrweb/web-extension
run: NODE_OPTIONS='--max-old-space-size=4096' DISABLE_WORKER_INLINING=true pnpm exec turbo run prepublish --filter=@rrweb/web-extension

- name: Publish Chrome Extension
uses: mnao305/chrome-extension-upload@v5.0.0
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Prettier Check
run: yarn prettier --check '**/*.{ts,md}'
run: pnpm exec prettier --check '**/*.{ts,md}'

prettier:
# Skip the format code action in forked PRs
Expand All @@ -43,13 +46,16 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: 'yarn'
- name: Setup pnpm
uses: pnpm/action-setup@v6
with:
cache: true
- name: Install Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile
env:
PUPPETEER_SKIP_DOWNLOAD: true
- name: Prettify Code
run: yarn prettier --write '**/*.{ts,md}'
run: pnpm exec prettier --write '**/*.{ts,md}'
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
Expand Down
10 changes: 4 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ temp

.DS_Store

# output of `yarn build`
# package build output
build
dist
umd
Expand All @@ -28,14 +28,12 @@ umd
# emacs working files end in a tilde
*~

# `.yarn/install-state.gz` is an optimization file that you shouldn't ever have to commit.
# It simply stores the exact state of your project so that the next commands can boot without having to resolve your workspaces all over again.
.yarn/install-state.gz


# for vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

# bundle analysis files
*-bundle-analysis.html

# generated by lint:report
eslint_report.json
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@
packages/rrweb-player/.svelte-kit/generated/*
packages/rrweb-player/.svelte-kit/ambient.d.ts
packages/rrweb-player/.svelte-kit/non-ambient.d.ts
packages/rrweb-player/src/**/*.svelte.d.ts

# package build output
packages/**/dist/**
packages/**/build/**
packages/rrweb-player/types/**
Loading
Loading