Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ Since we want the record and replay sides to share a strongly typed data structu
2. Run `yarn install` in the root to install required dependencies for all sub-packages (note: `npm install` is _not_ recommended).
3. Run `yarn dev` in the root to get auto-building for all the sub-packages whenever you modify anything.
4. Navigate to one of the sub-packages (in the `packages` folder) where you'd like to make a change.
5. Patch the code and run `yarn test` to run the tests, make sure they pass before you commit anything.
6. Push the code and create a pull request.
5. Patch the code and run `yarn test` to run the tests, make sure they pass before you commit anything. Add test cases in order to avoid future regression.
6. If tests are failing, but the change in output is desirable, run `yarn test:update` and carefully commit the changes in test output.
7. Push the code and create a pull request.

Protip: You can run `yarn test` in the root folder to run all the tests.

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@
"typescript": "^4.7.3"
},
"scripts": {
"build:all": "yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references' 'yarn turbo run prepublish'",
"build:all": "NODE_OPTIONS='--max-old-space-size=4096' yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references' 'yarn turbo run prepublish'",
"test": "yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references --check' 'yarn turbo run test'",
"test:watch": "yarn turbo run test:watch",
"test:update": "yarn turbo run test:update",
"reformat:all": "yarn turbo run reformat",
"dev": "yarn turbo run dev",
"repl": "cd packages/rrweb && npm run repl",
"live-stream": "cd packages/rrweb && yarn live-stream",
Expand Down
1 change: 1 addition & 0 deletions packages/rrdom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"url": "git+https://github.com/rrweb-io/rrweb.git"
},
"scripts": {
"reformat": "yarn prettier --write '**/*.{ts,md}'",
"dev": "rollup -c -w",
"bundle": "rollup --config",
"bundle:es-only": "cross-env ES_ONLY=true rollup --config",
Expand Down
2 changes: 1 addition & 1 deletion packages/rrvideo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"prepublish": "yarn build"
"prepublish": "npm run build"
},
"author": "[email protected]",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions packages/rrweb-player/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
},
"scripts": {
"build": "rollup -c",
"reformat": "yarn prettier --write '**/*.{ts,md}'",
"dev": "rollup -c -w",
"prepublishOnly": "yarn build",
"prepublishOnly": "npm run build",
"start": "sirv public",
"validate": "svelte-check",
"prepublish": "yarn build",
"prepublish": "npm run build",
"lint": "yarn eslint src/**/*.ts"
},
"description": "rrweb's replayer UI",
Expand Down
4 changes: 3 additions & 1 deletion packages/rrweb-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
"prepack": "npm run bundle && npm run typings",
"test": "jest",
"test:watch": "jest --watch",
"test:update": "jest --updateSnapshot",
"bundle": "rollup --config",
"bundle:es-only": "cross-env ES_ONLY=true rollup --config",
"dev": "yarn bundle:es-only --watch",
"reformat": "yarn prettier --write '**/*.{ts,md}'",
"dev": "npm run bundle:es-only --watch",
"typings": "tsc -d --declarationDir typings",
"prepublish": "npm run typings && npm run bundle",
"lint": "yarn eslint src"
Expand Down
15 changes: 10 additions & 5 deletions packages/rrweb/package.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like the old commands are enough for me.

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@
"scripts": {
"prepare": "npm run prepack",
"prepack": "npm run bundle",
"test": "npm run bundle:browser && jest --testPathIgnorePatterns test/benchmark",
"test:headless": "PUPPETEER_HEADLESS=true npm run test",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch",
"retest": "jest --testPathIgnorePatterns test/benchmark",
"build-and-test": "npm run bundle:browser && npm run retest",
"test": "npm run test:headless",
"test:headless": "PUPPETEER_HEADLESS=true npm run build-and-test",
"test:headful": "PUPPETEER_HEADLESS=false npm run build-and-test",
"test:watch": "npm run test:headless -- --watch",
"test:update": "npm run test:headless -- --updateSnapshot",
"repl": "npm run bundle:browser && node scripts/repl.js",
"live-stream": "yarn bundle:browser && node scripts/stream.js",
"dev": "yarn bundle:browser --watch",
"live-stream": "npm run bundle:browser && node scripts/stream.js",
"dev": "npm run bundle:browser --watch",
"reformat": "yarn prettier --write '**/*.{ts,md}'",
"bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",
"bundle": "rollup --config",
"typings": "tsc -d --declarationDir typings",
Expand Down
1 change: 1 addition & 0 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@rrweb/types"
],
"scripts": {
"reformat": "yarn prettier --write '**/*.{ts,md}'",
"dev": "vite",
"build": "tsc -noEmit && vite build",
"check-types": "tsc -noEmit",
Expand Down
2 changes: 2 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
},
"test": {},
"test:watch": {},
"test:update": {},
"reformat": {},
"dev": {},
"lint": {},
"check-types": {}
Expand Down