Skip to content

implement recording, replaying, version selecting #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
33 changes: 33 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
'jest/globals': true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:compat/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
tsconfigRootDir: __dirname,
project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'],
},
plugins: [
'@typescript-eslint',
'eslint-plugin-tsdoc',
'jest',
'compat',
'prettier',
],
rules: {
'tsdoc/syntax': 'warn',
'prettier/prettier': 'error',
},
};
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bug Report
description: Report an rrweb web extension bug
title: '[Bug]: '
labels:
- 'bug'
body:
- type: input
attributes:
label: Version
description: What's the version of the package?
placeholder: v1.0.0
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: textarea
attributes:
label: Actual Behavior
description: A clear description of what actually happens.
validations:
required: true
- type: textarea
attributes:
label: Steps to Reproduce
description: Describe detailed steps for reproducing the issue.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: If your problem needs further explanation, or if the issue you're seeing cannot be reproduced in a gist, please add more information here.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Feature Request
description: Suggest an idea for rrweb web extension
title: '[Feature Request]: '
labels:
- 'feature request'
body:
- type: textarea
attributes:
label: Problem Description
description: Please add a clear and concise description of the problem you are seeking to solve with this feature request.
validations:
required: true
- type: textarea
attributes:
label: Proposed Solution
description: Describe the solution you'd like in a clear and concise manner.
validations:
required: true
- type: textarea
attributes:
label: Alternatives Considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: textarea
attributes:
label: Additional Information
description: Add any other context about the problem here.
validations:
required: false
95 changes: 95 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Code Style Check

on: [push, pull_request_target]

jobs:
eslint_check_upload:
runs-on: ubuntu-latest
name: ESLint Check and Report Upload

steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn
- name: Build Packages
run: yarn build:all
- name: Eslint Check
run: yarn lint
- name: Save Code Linting Report JSON
run: yarn lint:report
# Continue to the next step even if this fails
continue-on-error: true
- name: Upload ESLint Report
uses: actions/upload-artifact@v3
with:
name: eslint_report.json
path: eslint_report.json

annotation:
# Skip the annotation action in push events
if: github.event_name == 'pull_request_target'
needs: eslint_check_upload
runs-on: ubuntu-latest
name: ESLint Annotation
steps:
- uses: actions/download-artifact@v3
with:
name: eslint_report.json
- name: Annotate Code Linting Results
uses: ataylorme/eslint-annotate-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: 'eslint_report.json'

prettier_check:
# In the forked PR, it's hard to format code and push to the branch directly, so the action only check the format correctness.
if: github.event_name != 'push' && github.event.pull_request.head.repo.full_name != 'rrweb-io/rrweb'
runs-on: ubuntu-latest
name: Format Check
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn
- name: Prettier Check
run: yarn prettier --check '**/*.{ts,md}'

prettier:
# Skip the format code action in forked PRs
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'rrweb-io/rrweb'
runs-on: ubuntu-latest
name: Format Code
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn
- name: Prettify Code
run: yarn prettier --write '**/*.{ts,md}'
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply formatting changes
branch: ${{ github.head_ref }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/*.log
**/node_modules/
**/dist
**/build
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
12 changes: 12 additions & 0 deletions .vscode/rrweb-web-extension.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"folders": [
{
"name": "rrweb web extension",
"path": ".."
},
{
"name": "web-extension (package)",
"path": "../packages/web-extension"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
Loading