Skip to content

Commit

Permalink
Merge branch 'master' into sync-branch
Browse files Browse the repository at this point in the history
  • Loading branch information
gnpaone authored Feb 7, 2025
2 parents 88ea2d0 + 9e238e6 commit 2058999
Show file tree
Hide file tree
Showing 48 changed files with 640 additions and 174 deletions.
2 changes: 0 additions & 2 deletions .changeset/eslint-camelcase-devonly.md

This file was deleted.

10 changes: 10 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
"changesets": [
"attribute-text-reductions",
"beige-olives-roll",
"blank-cherries-laugh",
"blank-dev-changset",
"brave-numbers-joke",
"breezy-cats-heal",
"breezy-mice-breathe",
Expand All @@ -45,7 +47,9 @@
"curvy-apples-lay",
"curvy-balloons-brake",
"date-now-guard",
"dirty-pets-fly",
"dirty-rules-dress",
"efficiently-splitCssText-1603",
"eight-terms-hunt",
"eighty-teachers-smash",
"eleven-bobcats-peel",
Expand All @@ -62,9 +66,11 @@
"fluffy-planes-retire",
"format-head-prettier",
"forty-elephants-attack",
"four-panthers-fly",
"fresh-cars-impress",
"fresh-spoons-drive",
"friendly-numbers-leave",
"fuzzy-mugs-march",
"giant-rats-chew",
"gold-apples-joke",
"gold-experts-type",
Expand All @@ -90,6 +96,7 @@
"lovely-files-sparkle",
"lovely-pears-cross",
"lovely-students-boil",
"lucky-donuts-hammer",
"mean-tips-impress",
"metal-mugs-mate",
"mighty-ads-worry",
Expand All @@ -107,6 +114,7 @@
"new-snakes-call",
"nice-pugs-reply",
"no-neg-lookbehind",
"odd-onions-brush",
"old-dryers-hide",
"perfect-bulldogs-punch",
"perfect-dolls-grab",
Expand All @@ -120,6 +128,7 @@
"rare-adults-sneeze",
"real-masks-explode",
"real-trains-switch",
"red-peaches-explode",
"rich-crews-protect",
"rich-dots-lay",
"rich-jars-remember",
Expand Down Expand Up @@ -149,6 +158,7 @@
"swift-dancers-rest",
"swift-peas-film",
"swift-pots-search",
"textarea-inner-html",
"thin-vans-applaud",
"thirty-baboons-punch",
"three-baboons-bow",
Expand Down
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@ module.exports = {
rules: {
'tsdoc/syntax': 'warn',
'@typescript-eslint/prefer-as-const': 'warn',
'camelcase': ['error', {
allow: ['rr_.*', 'legacy_.*', 'UNSAFE_.*', '__rrweb_.*'],
}],
},
};
4 changes: 2 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js lts/*
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,25 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js lts/*
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Set registry settings
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set registry https://npm.pkg.github.com
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" > "$HOME/.npmrc"
echo '@rrweb:registry=https://npm.pkg.github.com/' >> "$HOME/.npmrc"
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -32,19 +40,3 @@ jobs:
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

- name: Publish Chrome Extension
uses: mnao305/chrome-extension-upload@v5.0.0
if: steps.changesets.outputs.published == 'true'
with:
extension-id: 'pdaldeopoccdhlkabbkcjmecmmoninhe'
file-path: ./packages/web-extension/dist/chrome.zip
client-id: ${{ secrets.CWS_CLIENT_ID }}
client-secret: ${{ secrets.CWS_CLIENT_SECRET }}
refresh-token: ${{ secrets.CWS_REFRESH_TOKEN }}
publish: true
17 changes: 9 additions & 8 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
Expand All @@ -35,7 +35,7 @@ jobs:

annotation:
# Skip the annotation action in push events
if: github.event_name == 'pull_request_target'
if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != 'Midpath-Software/rrweb'
needs: eslint_check_upload
runs-on: ubuntu-latest
name: ESLint Annotation
Expand All @@ -48,19 +48,20 @@ jobs:
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
report-json: 'eslint_report.json'
markdown-report-on-step-summary: true

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'
if: github.event_name != 'push' && github.event.pull_request.head.repo.full_name != 'Midpath-Software/rrweb'
runs-on: ubuntu-latest
name: Format Check
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
Expand All @@ -71,16 +72,16 @@ jobs:

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'
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == 'Midpath-Software/rrweb'
runs-on: ubuntu-latest
name: Format Code
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/tarball.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Upload tarball

on:
workflow_dispatch:
push:
branches:
- master

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
name: Tarball
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Setup Node.js lts/*
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'yarn'

- name: Install Dependencies
run: yarn install --frozen-lockfile

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

- name: Version Packages Using Changesets
id: version
run: |
yarn changeset version
echo "VERSION=$(node -p 'require(\"./package.json\").version')" >> "$GITHUB_ENV"
- name: Build Packages as Tarballs
id: build
run: |
mkdir -p built-packages
for pkg_json in $(find packages -mindepth 2 -name package.json); do
pkg_dir=$(dirname "$pkg_json")
pkg_name=$(jq -r .name "$pkg_json")
pkg_version=$(jq -r .version "$pkg_json")
if [[ -n "$pkg_name" && -n "$pkg_version" ]]; then
echo "Packing $pkg_name ($pkg_dir)"
(cd "$pkg_dir" && yarn pack --filename "../../built-packages/${pkg_name}-${pkg_version}.tgz")
else
echo "Skipping $pkg_dir (invalid package.json)"
fi
done
- name: Upload Built Packages as Artifacts
uses: actions/upload-artifact@v4
with:
name: built-packages
path: built-packages/
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
{
"name": "@rrweb/_monorepo",
"description": "record and replay the web",
"publishConfig": {
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"repository": {
"type": "git",
"url": "git+ssh://git@github.com/rrweb-io/rrweb.git"
"url": "git+ssh://git@github.com/Midpath-Software/rrweb.git"
},
"keywords": [
"rrweb"
],
"author": "yanzhen@smartx.com",
"author": "gnpaone@gmail.com",
"license": "MIT",
"bugs": {
"url": "https://github.com/rrweb-io/rrweb/issues"
"url": "https://github.com/Midpath-Software/rrweb/issues"
},
"private": true,
"homepage": "https://github.com/rrweb-io/rrweb#readme",
"homepage": "https://github.com/Midpath-Software/rrweb#readme",
"workspaces": [
"packages/*",
"packages/plugins/*"
Expand Down Expand Up @@ -54,8 +58,8 @@
"dev": "yarn turbo run dev --concurrency=18",
"repl": "cd packages/rrweb && npm run repl",
"live-stream": "cd packages/rrweb && yarn live-stream",
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'ESLINT_USE_FLAT_CONFIG=false yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
"lint:report": "ESLINT_USE_FLAT_CONFIG=false yarn eslint --output-file eslint_report.json --format json packages/*/src --ext .ts,.tsx,.js,.jsx",
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
"lint:report": "yarn eslint --output-file eslint_report.json --format json packages/*/src --ext .ts,.tsx,.js,.jsx",
"release": "yarn build:all && changeset publish"
},
"resolutions": {
Expand All @@ -66,5 +70,5 @@
"defaults",
"not op_mini all"
],
"packageManager": "yarn@1.22.19"
"packageManager": "yarn@1.22.22"
}
18 changes: 18 additions & 0 deletions packages/all/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @rrweb/all

## 2.0.1-alpha.20

### Patch Changes

- Updated dependencies [[`3e6ea35`](https://github.com/rrweb-io/rrweb/commit/3e6ea3574f9e587c5e66967fe62ba63a9a02d5c8)]:
- rrweb@2.0.1-alpha.20
- @rrweb/types@2.0.1-alpha.20
- @rrweb/packer@2.0.1-alpha.20

## 2.0.1-alpha.19

### Patch Changes

- Updated dependencies [[`dc20cd4`](https://github.com/rrweb-io/rrweb/commit/dc20cd45cc63058325784444af6bd32ed2cace48), [`79837ac`](https://github.com/rrweb-io/rrweb/commit/79837ac8f2f459935f6737210890b5c12033a53b)]:
- rrweb@2.0.1-alpha.19
- @rrweb/types@2.0.1-alpha.19
- @rrweb/packer@2.0.1-alpha.19

## 2.0.0-alpha.18

### Patch Changes
Expand Down
17 changes: 9 additions & 8 deletions packages/all/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "@rrweb/all",
"version": "2.0.0-alpha.18",
"version": "2.0.1-alpha.20",
"publishConfig": {
"access": "public"
"access": "public",
"registry": "https://npm.pkg.github.com"
},
"keywords": [
"rrweb",
Expand All @@ -17,13 +18,13 @@
"prepublish": "tsc -noEmit && vite build",
"lint": "yarn eslint src/**/*.ts"
},
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/all#readme",
"homepage": "https://github.com/Midpath-Software/rrweb/tree/main/packages/@rrweb/all#readme",
"bugs": {
"url": "https://github.com/rrweb-io/rrweb/issues"
"url": "https://github.com/Midpath-Software/rrweb/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/rrweb-io/rrweb.git"
"url": "git+https://github.com/Midpath-Software/rrweb.git"
},
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -56,9 +57,9 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@rrweb/types": "^2.0.0-alpha.18",
"@rrweb/packer": "^2.0.0-alpha.18",
"rrweb": "^2.0.0-alpha.18"
"@rrweb/types": "^2.0.1-alpha.20",
"@rrweb/packer": "^2.0.1-alpha.20",
"rrweb": "^2.0.1-alpha.20"
},
"browserslist": [
"supports es6-class"
Expand Down
14 changes: 14 additions & 0 deletions packages/packer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @rrweb/packer

## 2.0.1-alpha.20

### Patch Changes

- Updated dependencies []:
- @rrweb/types@2.0.1-alpha.20

## 2.0.1-alpha.19

### Patch Changes

- Updated dependencies []:
- @rrweb/types@2.0.1-alpha.19

## 2.0.0-alpha.18

### Patch Changes
Expand Down
Loading

0 comments on commit 2058999

Please sign in to comment.