Skip to content

Commit 6cee8d0

Browse files
committed
ref: tweaks to tasks to get builds/pkg names working for Sentry
1 parent cf78794 commit 6cee8d0

File tree

77 files changed

+867
-449
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+867
-449
lines changed

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: PUPPETEER_HEADLESS=true xvfb-run --server-args="-screen 0 1920x1080x24" yarn test
4141

4242
- name: Upload diff images to GitHub
43-
uses: actions/upload-artifact@v3
43+
uses: actions/upload-artifact@v4
4444
if: failure()
4545
with:
4646
name: image-diff
@@ -71,11 +71,11 @@ jobs:
7171

7272
- name: Build Tarballs
7373
env:
74-
NODE_OPTIONS: "--max_old_space_size=4096"
74+
NODE_OPTIONS: '--max_old_space_size=4096'
7575
run: yarn build:tarball
7676

7777
- name: Upload Artifacts
78-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7979
with:
8080
name: ${{ github.sha }}
8181
path: |

.github/workflows/size-check.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/style-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
# Continue to the next step even if this fails
2929
continue-on-error: true
3030
- name: Upload ESLint Report
31-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
3232
with:
3333
name: eslint_report.json
3434
path: eslint_report.json

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ From this monorepo, Sentry maintains and publishes the following NPM packages:
1414
- `@sentry-internal/rrdom` (corresponds to the [original `rrdom` package](https://www.npmjs.com/package/rrdom))
1515
- `@sentry-internal/rrweb-player` (corresponds to the [original `rrweb-player` package](https://www.npmjs.com/package/rrweb-player))
1616
- `@sentry-internal/rrweb-snapshot` (corresponds to the [original `rrweb-snapshot` package](https://www.npmjs.com/package/rrweb-snapshot))
17+
- `@sentry-internal/rrweb-types` (corresponds to the [original `@rrweb/types` package](https://www.npmjs.com/package/@rrweb/types))
18+
- `@sentry-internal/rrweb-worker` (new package)
1719

1820
## Major changes from upstream branch
1921

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"typescript": "^4.9.5"
4545
},
4646
"scripts": {
47-
"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 prepare'",
47+
"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 prepack'",
4848
"build:tarball": "yarn lerna run build:tarball",
4949
"test": "yarn run concurrently --success=all -r -m=1 'yarn workspaces-to-typescript-project-references --check' 'yarn turbo run test --concurrency=1 --continue'",
5050
"test:watch": "yarn turbo run test:watch",
@@ -54,7 +54,6 @@
5454
"format:head": "git diff --name-only HEAD^ |grep '\\.ts$\\|\\.md$' |xargs yarn prettier --write",
5555
"dev": "CLEAR_DIST_DIR=false yarn turbo run dev --concurrency=17",
5656
"repl": "cd packages/rrweb && npm run repl",
57-
"typings": "yarn turbo run typings",
5857
"live-stream": "cd packages/rrweb && yarn live-stream",
5958
"lint": "yarn run concurrently --success=all -r -m=1 'yarn run markdownlint docs' 'yarn eslint packages/*/src --ext .ts,.tsx,.js,.jsx,.svelte'",
6059
"lint:report": "yarn eslint --output-file eslint_report.json --format json packages/*/src --ext .ts,.tsx,.js,.jsx",

packages/all/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"test": "vitest run",
1515
"test:watch": "vitest watch",
1616
"check-types": "tsc -noEmit",
17-
"prepublish": "npm run build",
17+
"prepack": "npm run build",
1818
"lint": "yarn eslint src/**/*.ts"
1919
},
2020
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/all#readme",
@@ -56,9 +56,9 @@
5656
"typescript": "^4.7.3"
5757
},
5858
"dependencies": {
59-
"@rrweb/types": "^2.0.0-alpha.14",
60-
"@rrweb/packer": "^2.0.0-alpha.14",
61-
"rrweb": "^2.0.0-alpha.14"
59+
"@sentry-internal/rrweb": "^2.0.0-alpha.14",
60+
"@sentry-internal/rrweb-packer": "^2.0.0-alpha.14",
61+
"@sentry-internal/rrweb-types": "^2.0.0-alpha.14"
6262
},
6363
"browserslist": [
6464
"supports es6-class"

packages/all/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from 'rrweb';
2-
export * from '@rrweb/packer';
1+
export * from '@sentry-internal/rrweb';
2+
export * from '@sentry-internal/rrweb-packer';
33
// export * from '@rrweb/rrweb-plugin-console-record';
44
// export * from '@rrweb/rrweb-plugin-console-replay';

packages/all/test/cross-origin-iframe-packer.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ import type {
1111
eventWithTime,
1212
listenerHandler,
1313
mutationData,
14-
} from '@rrweb/types';
15-
import { unpack } from '@rrweb/packer';
14+
} from '@sentry-internal/rrweb-types';
15+
import { unpack } from '@sentry-internal/rrweb-packer';
1616
import * as fs from 'fs';
1717
import * as path from 'path';
1818
import type * as puppeteer from 'puppeteer';
19-
import type { recordOptions } from 'rrweb';
20-
import type {} from '@rrweb/types';
21-
import { EventType } from '@rrweb/types';
19+
import type { recordOptions } from '@sentry-internal/rrweb';
20+
import type {} from '@sentry-internal/rrweb-types';
21+
import { EventType } from '@sentry-internal/rrweb-types';
2222
import {
2323
assertSnapshot,
2424
getServerURL,

packages/all/test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NodeType } from 'rrweb-snapshot';
1+
import { NodeType } from '@sentry-internal/rrweb-snapshot';
22
import { expect } from 'vitest';
33
import {
44
EventType,
@@ -8,7 +8,7 @@ import {
88
mouseInteractionData,
99
event,
1010
pluginEvent,
11-
} from '@rrweb/types';
11+
} from '@sentry-internal/rrweb-types';
1212
import * as puppeteer from 'puppeteer';
1313
import * as path from 'path';
1414
import * as http from 'http';

packages/all/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
22
"extends": "../../tsconfig.base.json",
3-
"include": ["src"],
3+
"include": [
4+
"src"
5+
],
46
"compilerOptions": {
57
"rootDir": "src",
68
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"
79
},
810
"references": [
911
{
10-
"path": "../types"
12+
"path": "../rrweb"
1113
},
1214
{
1315
"path": "../packer"
1416
},
1517
{
16-
"path": "../rrweb"
18+
"path": "../types"
1719
}
1820
]
1921
}

packages/packer/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@rrweb/packer",
3-
"version": "2.0.0-alpha.14",
2+
"name": "@sentry-internal/rrweb-packer",
3+
"version": "2.31.0",
44
"publishConfig": {
55
"access": "public"
66
},
@@ -11,10 +11,11 @@
1111
"scripts": {
1212
"dev": "vite build --watch",
1313
"build": "tsc -noEmit && vite build",
14+
"build:tarball": "npm pack",
1415
"test": "vitest run",
1516
"test:watch": "vitest watch",
1617
"check-types": "tsc -noEmit",
17-
"prepublish": "npm run build",
18+
"prepack": "npm run build",
1819
"lint": "yarn eslint src/**/*.ts"
1920
},
2021
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/packer#readme",
@@ -78,7 +79,7 @@
7879
},
7980
"dependencies": {
8081
"fflate": "^0.4.4",
81-
"@rrweb/types": "^2.0.0-alpha.14"
82+
"@sentry-internal/rrweb-types": "^2.31.0"
8283
},
8384
"browserslist": [
8485
"supports es6-class"

packages/packer/src/pack.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { strFromU8, strToU8, zlibSync } from 'fflate';
2-
import type { PackFn } from '@rrweb/types';
2+
import type { PackFn, eventWithTime } from '@sentry-internal/rrweb-types';
33
import { eventWithTimeAndPacker, MARK } from './base';
44

5-
export const pack: PackFn = (event) => {
5+
export const pack: PackFn = (event: eventWithTime) => {
66
const _e: eventWithTimeAndPacker = {
77
...event,
88
v: MARK,

packages/plugins/rrweb-plugin-canvas-webrtc-record/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dev": "vite build --watch",
2828
"build": "tsc -noEmit && vite build",
2929
"check-types": "tsc -noEmit",
30-
"prepublish": "npm run build"
30+
"prepack": "npm run build"
3131
},
3232
"repository": {
3333
"type": "git",
@@ -43,12 +43,12 @@
4343
},
4444
"homepage": "https://github.com/rrweb-io/rrweb#readme",
4545
"devDependencies": {
46-
"rrweb": "^2.0.0-alpha.14",
46+
"@sentry-internal/rrweb": "^2.0.0-alpha.14",
4747
"typescript": "^4.7.3",
4848
"vite": "^5.2.8",
4949
"vite-plugin-dts": "^3.8.1"
5050
},
5151
"peerDependencies": {
52-
"rrweb": "^2.0.0-alpha.14"
52+
"@sentry-internal/rrweb": "^2.0.0-alpha.14"
5353
}
5454
}

packages/plugins/rrweb-plugin-canvas-webrtc-record/tsconfig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"extends": "../../../tsconfig.base.json",
3-
"include": ["src"],
4-
"exclude": ["vite.config.ts"],
3+
"include": [
4+
"src"
5+
],
6+
"exclude": [
7+
"vite.config.ts"
8+
],
59
"compilerOptions": {
610
"rootDir": "src",
711
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"

packages/plugins/rrweb-plugin-canvas-webrtc-replay/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dev": "vite build --watch",
2828
"build": "tsc -noEmit && vite build",
2929
"check-types": "tsc -noEmit",
30-
"prepublish": "npm run build"
30+
"prepack": "npm run build"
3131
},
3232
"repository": {
3333
"type": "git",
@@ -43,12 +43,12 @@
4343
},
4444
"homepage": "https://github.com/rrweb-io/rrweb#readme",
4545
"devDependencies": {
46-
"rrweb": "^2.0.0-alpha.14",
46+
"@sentry-internal/rrweb": "^2.0.0-alpha.14",
4747
"typescript": "^4.7.3",
4848
"vite": "^5.2.8",
4949
"vite-plugin-dts": "^3.8.1"
5050
},
5151
"peerDependencies": {
52-
"rrweb": "^2.0.0-alpha.14"
52+
"@sentry-internal/rrweb": "^2.0.0-alpha.14"
5353
}
5454
}

packages/plugins/rrweb-plugin-canvas-webrtc-replay/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { RRNode } from '@sentry-internal/rrdom';
22
import type { Mirror } from '@sentry-internal/rrweb-snapshot';
33
import SimplePeer from 'simple-peer-light';
4-
import type { ReplayPlugin, Replayer } from 'rrweb';
4+
import type { ReplayPlugin, Replayer } from '@sentry-internal/rrweb';
55
import type { WebRTCDataChannel } from './types';
66

77
// TODO: restrict callback to real nodes only, or make sure callback gets called when real node gets added to dom as well

packages/plugins/rrweb-plugin-canvas-webrtc-replay/tsconfig.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
{
22
"extends": "../../../tsconfig.base.json",
3-
"include": ["src"],
4-
"exclude": ["vite.config.ts"],
3+
"include": [
4+
"src"
5+
],
6+
"exclude": [
7+
"vite.config.ts"
8+
],
59
"compilerOptions": {
610
"rootDir": "src",
711
"tsBuildInfoFile": "./tsconfig.tsbuildinfo"

packages/plugins/rrweb-plugin-console-record/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"test:watch": "vitest watch",
3030
"build": "tsc -noEmit && vite build",
3131
"check-types": "tsc -noEmit",
32-
"prepublish": "npm run build"
32+
"prepack": "npm run build"
3333
},
3434
"repository": {
3535
"type": "git",
@@ -45,14 +45,14 @@
4545
},
4646
"homepage": "https://github.com/rrweb-io/rrweb#readme",
4747
"devDependencies": {
48-
"rrweb": "^2.0.0-alpha.14",
48+
"@sentry-internal/rrweb": "^2.0.0-alpha.14",
4949
"typescript": "^4.7.3",
5050
"vite": "^5.2.8",
5151
"vite-plugin-dts": "^3.8.1",
5252
"vitest": "^1.4.0",
5353
"puppeteer": "^20.9.0"
5454
},
5555
"peerDependencies": {
56-
"rrweb": "^2.0.0-alpha.14"
56+
"@sentry-internal/rrweb": "^2.0.0-alpha.14"
5757
}
5858
}

packages/plugins/rrweb-plugin-console-record/test/html/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { eventWithTime } from '@rrweb/types';
2-
import { record } from 'rrweb';
1+
import type { eventWithTime } from '@sentry-internal/rrweb-types';
2+
import { record } from '@sentry-internal/rrweb';
33
import { getRecordConsolePlugin } from '../../src/index';
44

55
window.Date.now = () => new Date(Date.UTC(2018, 10, 15, 8)).valueOf();

packages/plugins/rrweb-plugin-console-record/test/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { stringifySnapshots } from '../../../rrweb/test/utils';
33
import { createServer, ViteDevServer } from 'vite';
44
import * as puppeteer from 'puppeteer';
55
import type { Browser, Page } from 'puppeteer';
6-
import type { eventWithTime } from '@rrweb/types';
6+
import type { eventWithTime } from '@sentry-internal/rrweb-types';
77

88
export async function launchPuppeteer(
99
options?: Parameters<(typeof puppeteer)['launch']>[0],

packages/plugins/rrweb-plugin-console-record/tsconfig.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
{
22
"extends": "../../../tsconfig.base.json",
3-
"include": ["src"],
4-
"exclude": ["vite.config.ts", "vitest.config.ts", "test"],
3+
"include": [
4+
"src"
5+
],
6+
"exclude": [
7+
"vite.config.ts",
8+
"vitest.config.ts",
9+
"test"
10+
],
511
"compilerOptions": {
612
"rootDir": "src",
713
"tsBuildInfoFile": "./tsconfig.tsbuildinfo",
8-
914
// TODO: enable me in the future
1015
// at time of writing (April 2024) there are 6 errors in this package
1116
"strict": false

0 commit comments

Comments
 (0)