diff --git a/.changeset/config.json b/.changeset/config.json index 962e9799b0..bd54146d5f 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -4,14 +4,14 @@ "commit": false, "fixed": [ [ - "rrweb", - "rrweb-snapshot", - "rrdom", - "rrdom-nodejs", - "rrweb-player", - "@rrweb/types", - "@rrweb/web-extension", - "rrvideo" + "howdygo-rrweb", + "howdygo-rrweb-snapshot", + "howdygo-rrdom", + "howdygo-rrdom-nodejs", + "howdygo-rrweb-player", + "howdygo-rrweb-types", + "howdygo-rrweb-web-extension", + "howdygo-rrvideo" ] ], "linked": [], diff --git a/.changeset/eleven-bobcats-peel.md b/.changeset/eleven-bobcats-peel.md index 75f7263e1f..e3dbcf911e 100644 --- a/.changeset/eleven-bobcats-peel.md +++ b/.changeset/eleven-bobcats-peel.md @@ -1,6 +1,6 @@ --- -'rrweb-snapshot': patch -'rrweb': patch +"rrweb-snapshot": patch +"rrweb": patch --- better support for coexistence with older libraries (e.g. MooTools & Prototype.js) which modify the in-built `Array.from` function diff --git a/.changeset/fair-ducks-clean.md b/.changeset/fair-ducks-clean.md new file mode 100644 index 0000000000..19269db760 --- /dev/null +++ b/.changeset/fair-ducks-clean.md @@ -0,0 +1,6 @@ +--- +"rrweb-snapshot": patch +"rrweb": patch +--- + +Fix and test for bug #1457 which was affecting replay of complex tailwind css diff --git a/.changeset/friendly-zebras-relax.md b/.changeset/friendly-zebras-relax.md new file mode 100644 index 0000000000..99b2084c1f --- /dev/null +++ b/.changeset/friendly-zebras-relax.md @@ -0,0 +1,5 @@ +--- +'rrweb': patch +--- + +Support recording canvas in iframe and shadow dom diff --git a/.changeset/nervous-poets-grin.md b/.changeset/nervous-poets-grin.md index 084e1c5524..d6e1f2dcb7 100644 --- a/.changeset/nervous-poets-grin.md +++ b/.changeset/nervous-poets-grin.md @@ -1,6 +1,6 @@ --- 'rrdom': patch -'rrdom-nodejs': patch +'howdygo-rrdom-nodejs': patch 'rrweb': patch 'rrweb-player': patch 'rrweb-snapshot': patch diff --git a/.changeset/pre.json b/.changeset/pre.json index f752b6ec00..1bf2302d3e 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -3,11 +3,11 @@ "tag": "alpha", "initialVersions": { "rrdom": "0.1.7", - "rrdom-nodejs": "0.1.7", + "howdygo-rrdom-nodejs": "0.1.7", "rrweb": "2.0.0-alpha.4", "rrweb-player": "1.0.0-alpha.4", "rrweb-snapshot": "2.0.0-alpha.4", - "@rrweb/types": "2.0.0-alpha.4", + "howdygo-rrweb-types": "2.0.0-alpha.4", "@rrweb/web-extension": "2.0.0-alpha.4", "rrvideo": "2.0.0-alpha.6" }, diff --git a/.changeset/serious-ants-juggle.md b/.changeset/serious-ants-juggle.md index e475e12267..7392d5dd48 100644 --- a/.changeset/serious-ants-juggle.md +++ b/.changeset/serious-ants-juggle.md @@ -1,6 +1,6 @@ --- 'rrdom': major -'rrdom-nodejs': major +'howdygo-rrdom-nodejs': major 'rrweb': patch --- diff --git a/package.json b/package.json index 702137ea58..f240ec84e0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "url": "git+ssh://git@github.com/rrweb-io/rrweb.git" }, "keywords": [ - "rrweb" + "howdygo-rrweb" ], "author": "yanzhen@smartx.com", "license": "MIT", diff --git a/packages/rrdom-nodejs/CHANGELOG.md b/packages/rrdom-nodejs/CHANGELOG.md index 3e550009cb..9ff70b4b12 100644 --- a/packages/rrdom-nodejs/CHANGELOG.md +++ b/packages/rrdom-nodejs/CHANGELOG.md @@ -1,12 +1,12 @@ -# rrdom-nodejs +# howdygo-rrdom-nodejs -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes - Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]: - - rrdom@2.0.0-alpha.13 - - rrweb-snapshot@2.0.0-alpha.13 + - rrdom@2.0.0-alpha.19 + - rrweb-snapshot@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/rrdom-nodejs/package.json b/packages/rrdom-nodejs/package.json index 09a69a7ffd..8d97297306 100644 --- a/packages/rrdom-nodejs/package.json +++ b/packages/rrdom-nodejs/package.json @@ -1,6 +1,6 @@ { - "name": "rrdom-nodejs", - "version": "2.0.0-alpha.13", + "name": "howdygo-rrdom-nodejs", + "version": "2.0.0-alpha.19", "scripts": { "dev": "rollup -c -w", "bundle": "rollup --config", @@ -11,12 +11,12 @@ "lint": "yarn eslint src/**/*.ts" }, "keywords": [ - "rrweb", - "rrdom-nodejs" + "howdygo-rrweb", + "howdygo-rrdom-nodejs" ], "license": "MIT", - "main": "lib/rrdom-nodejs.cjs", - "module": "es/rrdom-nodejs.js", + "main": "lib/howdygo-rrdom-nodejs.cjs", + "module": "es/howdygo-rrdom-nodejs.js", "typings": "es", "files": [ "dist", @@ -48,8 +48,8 @@ "cssom": "^0.5.0", "cssstyle": "^2.3.0", "nwsapi": "^2.2.0", - "rrdom": "^2.0.0-alpha.13", - "rrweb-snapshot": "^2.0.0-alpha.13" + "howdygo-rrdom": "^2.0.0-alpha.19", + "howdygo-rrweb-snapshot": "^2.0.0-alpha.19" }, "browserslist": [ "supports es6-class" diff --git a/packages/rrdom-nodejs/src/document-nodejs.ts b/packages/rrdom-nodejs/src/document-nodejs.ts index 1d13970d34..37d3869ddf 100644 --- a/packages/rrdom-nodejs/src/document-nodejs.ts +++ b/packages/rrdom-nodejs/src/document-nodejs.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ -import { NodeType as RRNodeType } from 'rrweb-snapshot'; +import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot'; import type { NWSAPI } from 'nwsapi'; import type { CSSStyleDeclaration as CSSStyleDeclarationType } from 'cssstyle'; import { @@ -14,7 +14,7 @@ import { ClassList, IRRDocument, CSSStyleDeclaration, -} from 'rrdom'; +} from 'howdygo-rrdom'; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires const nwsapi = require('nwsapi'); // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires diff --git a/packages/rrdom-nodejs/test/document-nodejs.test.ts b/packages/rrdom-nodejs/test/document-nodejs.test.ts index ba3c6144d8..bcf9736f8c 100644 --- a/packages/rrdom-nodejs/test/document-nodejs.test.ts +++ b/packages/rrdom-nodejs/test/document-nodejs.test.ts @@ -3,7 +3,7 @@ */ import * as fs from 'fs'; import * as path from 'path'; -import { NodeType as RRNodeType } from 'rrweb-snapshot'; +import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot'; import { RRCanvasElement, RRCDATASection, @@ -16,7 +16,7 @@ import { RRStyleElement, RRText, } from '../src/document-nodejs'; -import { buildFromDom } from 'rrdom'; +import { buildFromDom } from 'howdygo-rrdom'; describe('RRDocument for nodejs environment', () => { describe('RRDocument API', () => { diff --git a/packages/rrdom/CHANGELOG.md b/packages/rrdom/CHANGELOG.md index aa73fc9c4a..ed198eced2 100644 --- a/packages/rrdom/CHANGELOG.md +++ b/packages/rrdom/CHANGELOG.md @@ -1,13 +1,13 @@ # rrdom -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes - [#1432](https://github.com/rrweb-io/rrweb/pull/1432) [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961) Thanks [@Juice10](https://github.com/Juice10)! - Support `loop` in `RRMediaElement` - Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]: - - rrweb-snapshot@2.0.0-alpha.13 + - rrweb-snapshot@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/rrdom/package.json b/packages/rrdom/package.json index 430620782c..528617ddb4 100644 --- a/packages/rrdom/package.json +++ b/packages/rrdom/package.json @@ -1,12 +1,12 @@ { - "name": "rrdom", - "version": "2.0.0-alpha.13", + "name": "howdygo-rrdom", + "version": "2.0.0-alpha.19", "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme", "license": "MIT", - "main": "lib/rrdom.cjs", - "module": "es/rrdom.js", + "main": "lib/howdygo-rrdom.cjs", + "module": "es/howdygo-rrdom.js", "typings": "es", - "unpkg": "dist/rrdom.js", + "unpkg": "dist/howdygo-rrdom.js", "files": [ "dist", "lib", @@ -32,7 +32,7 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^20.0.0", - "@rrweb/types": "^2.0.0-alpha.13", + "howdygo-rrweb-types": "^2.0.0-alpha.19", "@types/jest": "^27.4.1", "@types/puppeteer": "^5.4.4", "@typescript-eslint/eslint-plugin": "^5.23.0", @@ -47,6 +47,6 @@ "ts-jest": "^27.1.3" }, "dependencies": { - "rrweb-snapshot": "^2.0.0-alpha.13" + "howdygo-rrweb-snapshot": "^2.0.0-alpha.19" } } diff --git a/packages/rrdom/rollup.config.js b/packages/rrdom/rollup.config.js index 5bd346673f..6f3e951221 100644 --- a/packages/rrdom/rollup.config.js +++ b/packages/rrdom/rollup.config.js @@ -55,6 +55,7 @@ for (let config of baseConfigs) { name: config.name, format: 'iife', file: pkg.unpkg.replace(pkg.name, config.path), + extend: true, }, ], }, @@ -67,6 +68,7 @@ for (let config of baseConfigs) { format: 'iife', file: toMinPath(pkg.unpkg).replace(pkg.name, config.path), sourcemap: true, + extend: true, }, ], }, @@ -78,6 +80,7 @@ for (let config of baseConfigs) { { format: 'cjs', file: pkg.main.replace(pkg.name, config.path), + extend: true, }, ], }, diff --git a/packages/rrdom/src/diff.ts b/packages/rrdom/src/diff.ts index 8ccf81f8c6..4557afc703 100644 --- a/packages/rrdom/src/diff.ts +++ b/packages/rrdom/src/diff.ts @@ -2,7 +2,7 @@ import { NodeType as RRNodeType, Mirror as NodeMirror, elementNode, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; import type { canvasMutationData, canvasEventWithTime, @@ -10,7 +10,7 @@ import type { scrollData, styleDeclarationData, styleSheetRuleData, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; import type { IRRCDATASection, IRRComment, @@ -83,16 +83,16 @@ export type ReplayerHandler = { target: HTMLCanvasElement, ) => void; applyInput: (data: inputData) => void; - applyScroll: (data: scrollData, isSync: boolean) => void; + applyScroll: (data: scrollData, isSync: boolean, forceScroll: boolean | undefined) => void; applyStyleSheetMutation: ( data: styleDeclarationData | styleSheetRuleData, styleSheet: CSSStyleSheet, ) => void; - // Similar to the `afterAppend` callback in the `rrweb-snapshot` package. It's a postorder traversal of the newly appended nodes. + // Similar to the `afterAppend` callback in the `howdygo-rrweb-snapshot` package. It's a postorder traversal of the newly appended nodes. afterAppend?(node: Node, id: number): void; }; -// A set contains newly appended nodes. It's used to make sure the afterAppend callback can iterate newly appended nodes in the same traversal order as that in the `rrweb-snapshot` package. +// A set contains newly appended nodes. It's used to make sure the afterAppend callback can iterate newly appended nodes in the same traversal order as that in the `howdygo-rrweb-snapshot` package. let createdNodeSet: WeakSet | null = null; /** @@ -220,14 +220,14 @@ function diffAfterUpdatingChildren( switch (newTree.RRNodeType) { case RRNodeType.Document: { const scrollData = (newTree as RRDocument).scrollData; - scrollData && replayer.applyScroll(scrollData, true); + scrollData && replayer.applyScroll(scrollData, true, true); break; } case RRNodeType.Element: { const oldElement = oldTree as HTMLElement; const newRRElement = newTree as RRElement; newRRElement.scrollData && - replayer.applyScroll(newRRElement.scrollData, true); + replayer.applyScroll(newRRElement.scrollData, true, true); /** * Input data need to get applied after all children of this node are updated. * Otherwise when we set a value for a select element whose options are empty, the value won't actually update. diff --git a/packages/rrdom/src/document.ts b/packages/rrdom/src/document.ts index befdadb86d..1a42336791 100644 --- a/packages/rrdom/src/document.ts +++ b/packages/rrdom/src/document.ts @@ -1,4 +1,4 @@ -import { NodeType as RRNodeType } from 'rrweb-snapshot'; +import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot'; import { parseCSSText, camelize, toCSSText } from './style'; export interface IRRNode { parentElement: IRRNode | null; @@ -308,7 +308,7 @@ export function BaseRRDocumentImpl< } /** - * Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot). + * Adhoc implementation for setting xhtml namespace in rebuilt.ts (howdygo-rrweb-snapshot). * There are two lines used this function: * 1. doc.write('\') * 2. doc.write('\') diff --git a/packages/rrdom/src/index.ts b/packages/rrdom/src/index.ts index eeddb03e1c..fa85507954 100644 --- a/packages/rrdom/src/index.ts +++ b/packages/rrdom/src/index.ts @@ -1,12 +1,12 @@ import { NodeType as RRNodeType, createMirror as createNodeMirror, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; import type { Mirror as NodeMirror, IMirror, serializedNodeWithId, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; import type { canvasMutationData, canvasEventWithTime, @@ -14,7 +14,7 @@ import type { scrollData, styleSheetRuleData, styleDeclarationData, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; import { BaseRRNode as RRNode, BaseRRCDATASectionImpl, @@ -198,7 +198,7 @@ type RRElementType = K extends keyof RRElementTagNameMap ? RRElementTagNameMap[K] : RRElement; function getValidTagName(element: HTMLElement): string { - // https://github.com/rrweb-io/rrweb-snapshot/issues/56 + // https://github.com/rrweb-io/howdygo-rrweb-snapshot/issues/56 if (element instanceof HTMLFormElement) { return 'FORM'; } @@ -338,7 +338,7 @@ export function createMirror(): Mirror { return new Mirror(); } -// based on Mirror from rrweb-snapshots +// based on Mirror from howdygo-rrweb-snapshots export class Mirror implements IMirror { private idNodeMap: Map = new Map(); private nodeMetaMap: WeakMap = new WeakMap(); diff --git a/packages/rrdom/test/diff.test.ts b/packages/rrdom/test/diff.test.ts index fc76f48bd9..8ff8694f4b 100644 --- a/packages/rrdom/test/diff.test.ts +++ b/packages/rrdom/test/diff.test.ts @@ -8,7 +8,7 @@ import { serializedNodeWithId, createMirror, Mirror as NodeMirror, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; import { buildFromDom, getDefaultSN, @@ -25,14 +25,14 @@ import { sameNodeType, } from '../src/diff'; import type { IRRElement, IRRNode } from '../src/document'; -import { Replayer } from 'rrweb'; +import { Replayer } from 'howdygo-rrweb'; import type { eventWithTime, canvasMutationData, styleDeclarationData, styleSheetRuleData, -} from '@rrweb/types'; -import { EventType, IncrementalSource } from '@rrweb/types'; +} from 'howdygo-rrweb-types'; +import { EventType, IncrementalSource } from 'howdygo-rrweb-types'; import { compileTSCode } from './utils'; const elementSn = { diff --git a/packages/rrdom/test/document.test.ts b/packages/rrdom/test/document.test.ts index ad3b02134e..bd7d95d796 100644 --- a/packages/rrdom/test/document.test.ts +++ b/packages/rrdom/test/document.test.ts @@ -1,7 +1,7 @@ /** * @jest-environment jsdom */ -import { NodeType as RRNodeType } from 'rrweb-snapshot'; +import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot'; import { BaseRRDocumentImpl, BaseRRDocumentTypeImpl, @@ -371,7 +371,7 @@ describe('Basic RRDocument implementation', () => { expect(node.childNodes.length).toEqual(0); }); - it('can cover the usage of write() in rrweb-snapshot', () => { + it('can cover the usage of write() in howdygo-rrweb-snapshot', () => { const node = new RRDocument(); node.write( '', diff --git a/packages/rrdom/test/virtual-dom.test.ts b/packages/rrdom/test/virtual-dom.test.ts index b99aca5ae4..07b6301a86 100644 --- a/packages/rrdom/test/virtual-dom.test.ts +++ b/packages/rrdom/test/virtual-dom.test.ts @@ -15,7 +15,7 @@ import { NodeType, NodeType as RRNodeType, textNode, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; import { buildFromDom, buildFromNode, diff --git a/packages/rrvideo/CHANGELOG.md b/packages/rrvideo/CHANGELOG.md index 46339afe44..14141b2240 100644 --- a/packages/rrvideo/CHANGELOG.md +++ b/packages/rrvideo/CHANGELOG.md @@ -1,11 +1,11 @@ # rrvideo -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes - Updated dependencies []: - - rrweb-player@2.0.0-alpha.13 + - rrweb-player@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/rrvideo/package.json b/packages/rrvideo/package.json index 4cbd92463d..a3af235126 100644 --- a/packages/rrvideo/package.json +++ b/packages/rrvideo/package.json @@ -1,10 +1,10 @@ { - "name": "rrvideo", - "version": "2.0.0-alpha.13", + "name": "howdygo-rrvideo", + "version": "2.0.0-alpha.19", "description": "transform rrweb session into video", "main": "build/index.js", "bin": { - "rrvideo": "build/cli.js" + "howdygo-rrvideo": "build/cli.js" }, "files": [ "build" @@ -26,13 +26,13 @@ "@types/node": "^18.15.11", "jest": "^27.5.1", "ts-jest": "^27.1.3", - "@rrweb/types": "^2.0.0-alpha.13" + "howdygo-rrweb-types": "^2.0.0-alpha.19" }, "dependencies": { "@open-tech-world/cli-progress-bar": "^2.0.2", "fs-extra": "^11.1.1", "minimist": "^1.2.5", "playwright": "^1.32.1", - "rrweb-player": "^2.0.0-alpha.13" + "howdygo-rrweb-player": "^2.0.0-alpha.19" } } diff --git a/packages/rrvideo/src/cli.ts b/packages/rrvideo/src/cli.ts index 600c531a23..a9d5eaa6ac 100644 --- a/packages/rrvideo/src/cli.ts +++ b/packages/rrvideo/src/cli.ts @@ -3,7 +3,7 @@ import * as fs from 'fs'; import * as path from 'path'; import minimist from 'minimist'; import { ProgressBar } from '@open-tech-world/cli-progress-bar'; -import type { RRwebPlayerOptions } from 'rrweb-player'; +import type { RRwebPlayerOptions } from 'howdygo-rrweb-player'; import { transformToVideo } from './index'; const argv = minimist(process.argv.slice(2)); diff --git a/packages/rrvideo/src/index.ts b/packages/rrvideo/src/index.ts index 0909746929..ff78b456ca 100644 --- a/packages/rrvideo/src/index.ts +++ b/packages/rrvideo/src/index.ts @@ -1,11 +1,11 @@ import * as fs from 'fs-extra'; import * as path from 'path'; import { chromium } from 'playwright'; -import { EventType, eventWithTime } from '@rrweb/types'; -import type { RRwebPlayerOptions } from 'rrweb-player'; +import { EventType, eventWithTime } from 'howdygo-rrweb-types'; +import type { RRwebPlayerOptions } from 'howdygo-rrweb-player'; const rrwebScriptPath = path.resolve( - require.resolve('rrweb-player'), + require.resolve('howdygo-rrweb-player'), '../../dist/index.js', ); const rrwebStylePath = path.resolve(rrwebScriptPath, '../style.css'); @@ -27,7 +27,7 @@ type RRvideoConfig = { const defaultConfig: Required = { input: '', - output: 'rrvideo-output.webm', + output: 'howdygo-rrvideo-output.webm', headless: true, // A good trade-off value between quality and file size. resolutionRatio: 0.8, @@ -94,7 +94,7 @@ function getMaxViewport(events: eventWithTime[]) { } export async function transformToVideo(options: RRvideoConfig) { - const defaultVideoDir = '__rrvideo__temp__'; + const defaultVideoDir = '__howdygo-rrvideo__temp__'; const config = { ...defaultConfig }; if (!options.input) throw new Error('input is required'); // If the output is not specified or undefined, use the default value. diff --git a/packages/rrvideo/test/cli.test.ts b/packages/rrvideo/test/cli.test.ts index 29efe4815c..6c9c903293 100644 --- a/packages/rrvideo/test/cli.test.ts +++ b/packages/rrvideo/test/cli.test.ts @@ -28,7 +28,7 @@ describe('should be able to run cli', () => { execSync('node ./build/cli.js --input ./test/generated/example.json', { stdio: 'pipe', }); - const outputFile = path.resolve(__dirname, '../rrvideo-output.webm'); + const outputFile = path.resolve(__dirname, '../howdygo-rrvideo-output.webm'); expect(fs.existsSync(outputFile)).toBe(true); fs.removeSync(outputFile); }); diff --git a/packages/rrvideo/test/events/example.ts b/packages/rrvideo/test/events/example.ts index 00701fd6ca..22f9c7bea2 100644 --- a/packages/rrvideo/test/events/example.ts +++ b/packages/rrvideo/test/events/example.ts @@ -1,5 +1,5 @@ -import { EventType, IncrementalSource } from '@rrweb/types'; -import type { eventWithTime } from '@rrweb/types'; +import { EventType, IncrementalSource } from 'howdygo-rrweb-types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; const now = Date.now(); const events: eventWithTime[] = [ diff --git a/packages/rrweb-player/CHANGELOG.md b/packages/rrweb-player/CHANGELOG.md index 31485fea43..f9c8271b2e 100644 --- a/packages/rrweb-player/CHANGELOG.md +++ b/packages/rrweb-player/CHANGELOG.md @@ -1,11 +1,11 @@ # rrweb-player -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes - Updated dependencies [[`3d1877c`](https://github.com/rrweb-io/rrweb/commit/3d1877cff83d9a018630674fb6e730050ceef812), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`02f50d2`](https://github.com/rrweb-io/rrweb/commit/02f50d260cfe72209c94de1679336737f238e216)]: - - rrweb@2.0.0-alpha.13 + - rrweb@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/rrweb-player/package.json b/packages/rrweb-player/package.json index da8cba206a..53381f6e6a 100644 --- a/packages/rrweb-player/package.json +++ b/packages/rrweb-player/package.json @@ -1,10 +1,10 @@ { - "name": "rrweb-player", - "version": "2.0.0-alpha.13", + "name": "howdygo-rrweb-player", + "version": "2.0.0-alpha.19", "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", - "@rrweb/types": "^2.0.0-alpha.13", + "howdygo-rrweb-types": "^2.0.0-alpha.19", "@types/offscreencanvas": "^2019.6.4", "eslint-config-google": "^0.14.0", "eslint-plugin-svelte3": "^4.0.0", @@ -24,7 +24,7 @@ }, "dependencies": { "@tsconfig/svelte": "^1.0.0", - "rrweb": "^2.0.0-alpha.13" + "howdygo-rrweb": "^2.0.0-alpha.19" }, "scripts": { "build": "rollup -c", @@ -51,7 +51,7 @@ "url": "git+https://github.com/rrweb-io/rrweb.git" }, "keywords": [ - "rrweb" + "howdygo-rrweb" ], "author": "yanzhen@smartx.com", "license": "MIT", diff --git a/packages/rrweb-player/src/Controller.svelte b/packages/rrweb-player/src/Controller.svelte index 7e49df841e..e6098637b0 100644 --- a/packages/rrweb-player/src/Controller.svelte +++ b/packages/rrweb-player/src/Controller.svelte @@ -1,7 +1,7 @@ + diff --git a/packages/rrweb/test/integration.test.ts b/packages/rrweb/test/integration.test.ts index 5ce9b76469..79a35f0c6e 100644 --- a/packages/rrweb/test/integration.test.ts +++ b/packages/rrweb/test/integration.test.ts @@ -11,10 +11,17 @@ import { replaceLast, generateRecordSnippet, ISuite, + stripBase64, } from './utils'; import type { recordOptions } from '../src/types'; -import { eventWithTime, EventType, RecordPlugin } from '@rrweb/types'; -import { visitSnapshot, NodeType } from 'rrweb-snapshot'; +import { + eventWithTime, + EventType, + RecordPlugin, + IncrementalSource, + CanvasContext, +} from 'howdygo-rrweb-types'; +import { visitSnapshot, NodeType } from 'howdygo-rrweb-snapshot'; describe('record integration tests', function (this: ISuite) { jest.setTimeout(10_000); @@ -833,6 +840,138 @@ describe('record integration tests', function (this: ISuite) { assertSnapshot(snapshots); }); + describe('canvas', function (this: ISuite) { + jest.setTimeout(10_000); + it('should record canvas within iframe', async () => { + const page: puppeteer.Page = await browser.newPage(); + await page.goto(`${serverURL}/html`); + await page.setContent( + getHtml.call(this, 'canvas-iframe.html', { + recordCanvas: true, + }), + ); + + const frameId = await waitForIFrameLoad(page, '#iframe-canvas'); + await frameId.waitForFunction('window.canvasMutationApplied'); + await waitForRAF(page); + + const snapshots = (await page.evaluate( + 'window.snapshots', + )) as eventWithTime[]; + expect(snapshots[snapshots.length - 1].data).toEqual( + expect.objectContaining({ + source: IncrementalSource.CanvasMutation, + type: CanvasContext['2D'], + commands: expect.arrayContaining([ + { + args: [200, 100], + property: 'lineTo', + }, + ]), + }), + ); + assertSnapshot(stripBase64(snapshots)); + }); + + it('should record canvas within iframe with sampling', async () => { + const maxFPS = 60; + const page: puppeteer.Page = await browser.newPage(); + await page.goto(`${serverURL}/html`); + await page.setContent( + getHtml.call(this, 'canvas-iframe.html', { + recordCanvas: true, + sampling: { + canvas: maxFPS, + }, + }), + ); + + const frameId = await waitForIFrameLoad(page, '#iframe-canvas'); + await frameId.waitForFunction('window.canvasMutationApplied'); + await waitForRAF(page); + await page.waitForTimeout(1000 / maxFPS); + + const snapshots = (await page.evaluate( + 'window.snapshots', + )) as eventWithTime[]; + expect(snapshots[snapshots.length - 1].data).toEqual( + expect.objectContaining({ + source: IncrementalSource.CanvasMutation, + type: CanvasContext['2D'], + commands: expect.arrayContaining([ + expect.objectContaining({ + property: 'drawImage', + }), + ]), + }), + ); + }); + + it('should record canvas within shadow dom', async () => { + const page: puppeteer.Page = await browser.newPage(); + await page.goto(`${serverURL}/html`); + await page.setContent( + getHtml.call(this, 'canvas-shadow-dom.html', { + recordCanvas: true, + }), + ); + + await page.waitForFunction('window.canvasMutationApplied'); + await waitForRAF(page); + + const snapshots = (await page.evaluate( + 'window.snapshots', + )) as eventWithTime[]; + expect(snapshots[snapshots.length - 1].data).toEqual( + expect.objectContaining({ + source: IncrementalSource.CanvasMutation, + type: CanvasContext['2D'], + commands: expect.arrayContaining([ + { + args: [100, 100, 50, 50], + property: 'fillRect', + }, + ]), + }), + ); + assertSnapshot(stripBase64(snapshots)); + }); + + it('should record canvas within shadow dom with sampling', async () => { + const page: puppeteer.Page = await browser.newPage(); + await page.goto(`${serverURL}/html`); + await page.setContent( + getHtml.call(this, 'canvas-shadow-dom.html', { + recordCanvas: true, + sampling: { + canvas: 60, + }, + }), + ); + + await page.waitForFunction('window.canvasMutationApplied'); + await waitForRAF(page); + + await page.waitForTimeout(50); + + const snapshots = (await page.evaluate( + 'window.snapshots', + )) as eventWithTime[]; + expect(snapshots[snapshots.length - 1].data).toEqual( + expect.objectContaining({ + source: IncrementalSource.CanvasMutation, + type: CanvasContext['2D'], + commands: expect.arrayContaining([ + expect.objectContaining({ + property: 'drawImage', + }), + ]), + }), + ); + assertSnapshot(stripBase64(snapshots)); + }); + }); + it('should record images with blob url', async () => { const page: puppeteer.Page = await browser.newPage(); page.on('console', (msg) => console.log(msg.text())); diff --git a/packages/rrweb/test/machine.test.ts b/packages/rrweb/test/machine.test.ts index bf96a317b5..fd912bb2a6 100644 --- a/packages/rrweb/test/machine.test.ts +++ b/packages/rrweb/test/machine.test.ts @@ -1,6 +1,6 @@ import { discardPriorSnapshots } from '../src/replay/machine'; import { sampleEvents } from './utils'; -import { EventType } from '@rrweb/types'; +import { EventType } from 'howdygo-rrweb-types'; const events = sampleEvents.filter( (e) => ![EventType.DomContentLoaded, EventType.Load].includes(e.type), diff --git a/packages/rrweb/test/packer.test.ts b/packages/rrweb/test/packer.test.ts index e6487d7a20..87b4a35549 100644 --- a/packages/rrweb/test/packer.test.ts +++ b/packages/rrweb/test/packer.test.ts @@ -1,5 +1,5 @@ import { pack, unpack } from '../src/packer'; -import { eventWithTime, EventType } from '@rrweb/types'; +import { eventWithTime, EventType } from 'howdygo-rrweb-types'; import { MARK } from '../src/packer/base'; const event: eventWithTime = { diff --git a/packages/rrweb/test/record.test.ts b/packages/rrweb/test/record.test.ts index 51e7ad2342..173d958c5b 100644 --- a/packages/rrweb/test/record.test.ts +++ b/packages/rrweb/test/record.test.ts @@ -10,7 +10,7 @@ import { IncrementalSource, styleSheetRuleData, selectionData, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; import { assertSnapshot, getServerURL, diff --git a/packages/rrweb/test/record/__snapshots__/webgl.test.ts.snap b/packages/rrweb/test/record/__snapshots__/webgl.test.ts.snap index c7aeb17e1c..e465828cfa 100644 --- a/packages/rrweb/test/record/__snapshots__/webgl.test.ts.snap +++ b/packages/rrweb/test/record/__snapshots__/webgl.test.ts.snap @@ -1,5 +1,171 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`record webgl record canvas within iframe will record changes to a canvas element 1`] = ` +"[ + { + \\"type\\": 4, + \\"data\\": { + \\"href\\": \\"about:blank\\", + \\"width\\": 1920, + \\"height\\": 1080 + } + }, + { + \\"type\\": 2, + \\"data\\": { + \\"node\\": { + \\"type\\": 0, + \\"childNodes\\": [ + { + \\"type\\": 1, + \\"name\\": \\"html\\", + \\"publicId\\": \\"\\", + \\"systemId\\": \\"\\", + \\"id\\": 2 + }, + { + \\"type\\": 2, + \\"tagName\\": \\"html\\", + \\"attributes\\": {}, + \\"childNodes\\": [ + { + \\"type\\": 2, + \\"tagName\\": \\"head\\", + \\"attributes\\": {}, + \\"childNodes\\": [], + \\"id\\": 4 + }, + { + \\"type\\": 2, + \\"tagName\\": \\"body\\", + \\"attributes\\": {}, + \\"childNodes\\": [ + { + \\"type\\": 3, + \\"textContent\\": \\"\\\\n \\", + \\"id\\": 6 + }, + { + \\"type\\": 2, + \\"tagName\\": \\"iframe\\", + \\"attributes\\": { + \\"id\\": \\"iframe1\\" + }, + \\"childNodes\\": [], + \\"id\\": 7 + }, + { + \\"type\\": 3, + \\"textContent\\": \\"\\\\n \\\\n \\\\n \\", + \\"id\\": 8 + } + ], + \\"id\\": 5 + } + ], + \\"id\\": 3 + } + ], + \\"id\\": 1 + }, + \\"initialOffset\\": { + \\"left\\": 0, + \\"top\\": 0 + } + } + }, + { + \\"type\\": 3, + \\"data\\": { + \\"source\\": 0, + \\"adds\\": [ + { + \\"parentId\\": 7, + \\"nextId\\": null, + \\"node\\": { + \\"type\\": 0, + \\"childNodes\\": [ + { + \\"type\\": 2, + \\"tagName\\": \\"html\\", + \\"attributes\\": {}, + \\"childNodes\\": [ + { + \\"type\\": 2, + \\"tagName\\": \\"head\\", + \\"attributes\\": {}, + \\"childNodes\\": [], + \\"rootId\\": 9, + \\"id\\": 11 + }, + { + \\"type\\": 2, + \\"tagName\\": \\"body\\", + \\"attributes\\": {}, + \\"childNodes\\": [], + \\"rootId\\": 9, + \\"id\\": 12 + } + ], + \\"rootId\\": 9, + \\"id\\": 10 + } + ], + \\"compatMode\\": \\"BackCompat\\", + \\"id\\": 9 + } + } + ], + \\"removes\\": [], + \\"texts\\": [], + \\"attributes\\": [], + \\"isAttachIframe\\": true + } + }, + { + \\"type\\": 3, + \\"data\\": { + \\"source\\": 0, + \\"texts\\": [], + \\"attributes\\": [], + \\"removes\\": [], + \\"adds\\": [ + { + \\"parentId\\": 12, + \\"nextId\\": null, + \\"node\\": { + \\"type\\": 2, + \\"tagName\\": \\"canvas\\", + \\"attributes\\": { + \\"id\\": \\"canvas\\" + }, + \\"childNodes\\": [], + \\"rootId\\": 9, + \\"id\\": 13 + } + } + ] + } + }, + { + \\"type\\": 3, + \\"data\\": { + \\"source\\": 9, + \\"id\\": 13, + \\"type\\": 1, + \\"commands\\": [ + { + \\"property\\": \\"clear\\", + \\"args\\": [ + 16384 + ] + } + ] + } + } +]" +`; + exports[`record webgl recordCanvas FPS should record snapshots 1`] = ` "[ { diff --git a/packages/rrweb/test/record/cross-origin-iframes.test.ts b/packages/rrweb/test/record/cross-origin-iframes.test.ts index 1b0d00f2d0..d54a7afe67 100644 --- a/packages/rrweb/test/record/cross-origin-iframes.test.ts +++ b/packages/rrweb/test/record/cross-origin-iframes.test.ts @@ -6,8 +6,8 @@ import type { listenerHandler, eventWithTime, mutationData, -} from '@rrweb/types'; -import { EventType, IncrementalSource } from '@rrweb/types'; +} from 'howdygo-rrweb-types'; +import { EventType, IncrementalSource } from 'howdygo-rrweb-types'; import { assertSnapshot, getServerURL, diff --git a/packages/rrweb/test/record/error-handler.test.ts b/packages/rrweb/test/record/error-handler.test.ts index 25b94e9f4c..4eb2fe6536 100644 --- a/packages/rrweb/test/record/error-handler.test.ts +++ b/packages/rrweb/test/record/error-handler.test.ts @@ -2,7 +2,7 @@ import * as fs from 'fs'; import * as path from 'path'; import type * as puppeteer from 'puppeteer'; import type { recordOptions } from '../../src/types'; -import { listenerHandler, eventWithTime, EventType } from '@rrweb/types'; +import { listenerHandler, eventWithTime, EventType } from 'howdygo-rrweb-types'; import { launchPuppeteer } from '../utils'; import { callbackWrapper, diff --git a/packages/rrweb/test/record/webgl.test.ts b/packages/rrweb/test/record/webgl.test.ts index 762d3607bd..6a71d88c33 100644 --- a/packages/rrweb/test/record/webgl.test.ts +++ b/packages/rrweb/test/record/webgl.test.ts @@ -8,14 +8,15 @@ import { EventType, IncrementalSource, CanvasContext, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; import { assertSnapshot, launchPuppeteer, stripBase64, waitForRAF, + waitForIFrameLoad, } from '../utils'; -import type { ICanvas } from 'rrweb-snapshot'; +import type { ICanvas } from 'howdygo-rrweb-snapshot'; interface ISuite { code: string; @@ -315,4 +316,54 @@ describe('record webgl', function (this: ISuite) { assertSnapshot(stripBase64(ctx.events)); }); }); + + describe('record canvas within iframe', function (this: ISuite) { + jest.setTimeout(10_000); + + const ctx: ISuite = setup.call( + this, + ` + + + + + + + `, + ); + + it('will record changes to a canvas element', async () => { + const frame = await waitForIFrameLoad(ctx.page, '#iframe1'); + await frame.evaluate(() => { + const canvas = document.createElement('canvas'); + canvas.id = 'canvas'; + document.body.appendChild(canvas); + }); + + await ctx.page.waitForTimeout(50); + + await frame.evaluate(() => { + const canvas = document.getElementById('canvas') as HTMLCanvasElement; + const gl = canvas.getContext('webgl')!; + + gl.clear(gl.COLOR_BUFFER_BIT); + }); + await ctx.page.waitForTimeout(50); + + const lastEvent = ctx.events[ctx.events.length - 1]; + expect(lastEvent).toMatchObject({ + data: { + source: IncrementalSource.CanvasMutation, + type: CanvasContext.WebGL, + commands: [ + { + args: [16384], + property: 'clear', + }, + ], + }, + }); + assertSnapshot(stripBase64(ctx.events)); + }); + }); }); diff --git a/packages/rrweb/test/replay/preload-all-images.test.ts b/packages/rrweb/test/replay/preload-all-images.test.ts index 36133d3a6d..ec2a9a092d 100644 --- a/packages/rrweb/test/replay/preload-all-images.test.ts +++ b/packages/rrweb/test/replay/preload-all-images.test.ts @@ -11,7 +11,7 @@ import { IncrementalSource, EventType, eventWithTime, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; let replayer: Replayer; diff --git a/packages/rrweb/test/replay/webgl-mutation.test.ts b/packages/rrweb/test/replay/webgl-mutation.test.ts index 378b0636e6..27f381d4ae 100644 --- a/packages/rrweb/test/replay/webgl-mutation.test.ts +++ b/packages/rrweb/test/replay/webgl-mutation.test.ts @@ -6,7 +6,7 @@ import { polyfillWebGLGlobals } from '../utils'; polyfillWebGLGlobals(); import webglMutation from '../../src/replay/canvas/webgl'; -import { CanvasContext } from '@rrweb/types'; +import { CanvasContext } from 'howdygo-rrweb-types'; import { variableListFor } from '../../src/replay/canvas/deserialize-args'; let canvas: HTMLCanvasElement; diff --git a/packages/rrweb/test/replayer.test.ts b/packages/rrweb/test/replayer.test.ts index b54d360a6b..eb39aac02e 100644 --- a/packages/rrweb/test/replayer.test.ts +++ b/packages/rrweb/test/replayer.test.ts @@ -25,7 +25,7 @@ import adoptedStyleSheetModification from './events/adopted-style-sheet-modifica import documentReplacementEvents from './events/document-replacement'; import hoverInIframeShadowDom from './events/iframe-shadowdom-hover'; import customElementDefineClass from './events/custom-element-define-class'; -import { ReplayerEvents } from '@rrweb/types'; +import { ReplayerEvents } from 'howdygo-rrweb-types'; interface ISuite { code: string; diff --git a/packages/rrweb/test/utils.ts b/packages/rrweb/test/utils.ts index 30a36abfcb..a2de338f46 100644 --- a/packages/rrweb/test/utils.ts +++ b/packages/rrweb/test/utils.ts @@ -1,4 +1,4 @@ -import { NodeType } from 'rrweb-snapshot'; +import { NodeType } from 'howdygo-rrweb-snapshot'; import { EventType, IncrementalSource, @@ -8,7 +8,7 @@ import { Optional, mouseInteractionData, pluginEvent, -} from '@rrweb/types'; +} from 'howdygo-rrweb-types'; import type { recordOptions } from '../src/types'; import * as puppeteer from 'puppeteer'; import { format } from 'prettier'; @@ -338,7 +338,10 @@ export function stripBase64(events: eventWithTime[]) { const newObj: Partial = {}; for (const prop in obj) { const value = obj[prop]; - if (prop === 'base64' && typeof value === 'string') { + if ( + (prop === 'base64' || prop === 'rr_dataURL') && + typeof value === 'string' + ) { let index = base64Strings.indexOf(value); if (index === -1) { index = base64Strings.push(value) - 1; @@ -353,11 +356,11 @@ export function stripBase64(events: eventWithTime[]) { return events.map((evt) => { if ( - evt.type === EventType.IncrementalSnapshot && - evt.data.source === IncrementalSource.CanvasMutation + evt.type === EventType.FullSnapshot || + evt.type === EventType.IncrementalSnapshot ) { const newData = walk(evt.data); - return { ...evt, data: newData }; + return { ...evt, data: newData } as eventWithTime; } return evt; }); @@ -701,7 +704,8 @@ export function generateRecordSnippet(options: recordOptions) { recordCanvas: ${options.recordCanvas}, recordAfter: '${options.recordAfter || 'load'}', inlineImages: ${options.inlineImages}, - plugins: ${options.plugins} + plugins: ${options.plugins}, + sampling: ${JSON.stringify(options.sampling)}, }); `; } diff --git a/packages/rrweb/tsconfig.json b/packages/rrweb/tsconfig.json index fb1b407ad6..93d911a015 100644 --- a/packages/rrweb/tsconfig.json +++ b/packages/rrweb/tsconfig.json @@ -11,7 +11,8 @@ "outDir": "build", "lib": [ "es6", - "dom" + "dom", + "es2021.weakref" ], "downlevelIteration": true, "importsNotUsedAsValues": "error", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index e0966d11bc..a898200d43 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,6 +1,6 @@ # @rrweb/types -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes @@ -9,7 +9,7 @@ - [#1369](https://github.com/rrweb-io/rrweb/pull/1369) [`c278d06`](https://github.com/rrweb-io/rrweb/commit/c278d068a0e2f1175cce7cc63920ac1fbf4783cf) Thanks [@stefansundin](https://github.com/stefansundin)! - Fix type error when using `"moduleResolution": "NodeNext"`. - Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]: - - rrweb-snapshot@2.0.0-alpha.13 + - rrweb-snapshot@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/types/package.json b/packages/types/package.json index 2d61372168..a96cce67f8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,12 +1,12 @@ { - "name": "@rrweb/types", - "version": "2.0.0-alpha.13", + "name": "howdygo-rrweb-types", + "version": "2.0.0-alpha.19", "publishConfig": { "access": "public" }, "keywords": [ - "rrweb", - "@rrweb/types" + "howdygo-rrweb", + "howdygo-rrweb-types" ], "scripts": { "dev": "vite", @@ -15,7 +15,7 @@ "prepublish": "npm run build", "lint": "yarn eslint src/**/*.ts" }, - "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/types#readme", + "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/howdygo-rrweb-types#readme", "bugs": { "url": "https://github.com/rrweb-io/rrweb/issues" }, @@ -25,14 +25,14 @@ }, "license": "MIT", "type": "module", - "main": "./dist/types.umd.cjs", - "module": "./dist/types.js", + "main": "./dist/howdygo-rrweb-types.umd.cjs", + "module": "./dist/howdygo-rrweb-types.js", "typings": "dist/index.d.ts", "exports": { ".": { - "types": "./dist/index.d.ts", - "import": "./dist/types.js", - "require": "./dist/types.umd.cjs" + "types": "./dist/howdygo-rrweb-types.d.ts", + "import": "./dist/howdygo-rrweb-types.js", + "require": "./dist/howdygo-rrweb-types.umd.cjs" } }, "files": [ @@ -44,7 +44,7 @@ "vite-plugin-dts": "^1.7.3" }, "dependencies": { - "rrweb-snapshot": "^2.0.0-alpha.13" + "howdygo-rrweb-snapshot": "^2.0.0-alpha.19" }, "browserslist": [ "supports es6-class" diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 0476ce2d68..281208cc06 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -3,7 +3,7 @@ import type { Mirror, INode, DataURLOptions, -} from 'rrweb-snapshot'; +} from 'howdygo-rrweb-snapshot'; export enum EventType { DomContentLoaded, @@ -425,6 +425,8 @@ type mouseInteractionParam = { id: number; x?: number; y?: number; + xOffset?: number; + yOffset?: number; pointerType?: PointerTypes; }; diff --git a/packages/web-extension/CHANGELOG.md b/packages/web-extension/CHANGELOG.md index 0e09b1fa4b..675b53159f 100644 --- a/packages/web-extension/CHANGELOG.md +++ b/packages/web-extension/CHANGELOG.md @@ -1,12 +1,12 @@ # @rrweb/web-extension -## 2.0.0-alpha.13 +## 2.0.0-alpha.19 ### Patch Changes - Updated dependencies [[`3d1877c`](https://github.com/rrweb-io/rrweb/commit/3d1877cff83d9a018630674fb6e730050ceef812), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`02f50d2`](https://github.com/rrweb-io/rrweb/commit/02f50d260cfe72209c94de1679336737f238e216)]: - - rrweb@2.0.0-alpha.13 - - rrweb-player@2.0.0-alpha.13 + - rrweb@2.0.0-alpha.19 + - rrweb-player@2.0.0-alpha.19 ## 2.0.0-alpha.12 diff --git a/packages/web-extension/package.json b/packages/web-extension/package.json index d06f8a8bb0..cc06a1beaf 100644 --- a/packages/web-extension/package.json +++ b/packages/web-extension/package.json @@ -1,7 +1,7 @@ { - "name": "@rrweb/web-extension", + "name": "howdygo-rrweb-web-extension", "private": true, - "version": "2.0.0-alpha.13", + "version": "2.0.0-alpha.19", "description": "The web extension of rrweb which helps to run rrweb on any website out of box", "author": "rrweb-io", "license": "MIT", @@ -16,7 +16,7 @@ "prepublish": "npm run pack:chrome && npm run pack:firefox" }, "devDependencies": { - "@rrweb/types": "^2.0.0-alpha.13", + "howdygo-rrweb-types": "^2.0.0-alpha.19", "@types/react-dom": "^18.0.6", "@types/webextension-polyfill": "^0.9.1", "@vitejs/plugin-react": "^2.1.0", @@ -40,7 +40,7 @@ "react-dom": "^18.2.0", "react-icons": "^4.4.0", "react-router-dom": "^6.4.1", - "rrweb": "^2.0.0-alpha.13", - "rrweb-player": "^2.0.0-alpha.13" + "howdygo-rrweb": "^2.0.0-alpha.19", + "howdygo-rrweb-player": "^2.0.0-alpha.19" } } diff --git a/packages/web-extension/src/background/index.ts b/packages/web-extension/src/background/index.ts index 901669907b..4453ac0581 100644 --- a/packages/web-extension/src/background/index.ts +++ b/packages/web-extension/src/background/index.ts @@ -1,5 +1,5 @@ import Browser from 'webextension-polyfill'; -import type { eventWithTime } from '@rrweb/types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; import Channel from '~/utils/channel'; import { LocalData, diff --git a/packages/web-extension/src/content/index.ts b/packages/web-extension/src/content/index.ts index fce329e711..5c1dccdc9b 100644 --- a/packages/web-extension/src/content/index.ts +++ b/packages/web-extension/src/content/index.ts @@ -1,6 +1,6 @@ import Browser, { Storage } from 'webextension-polyfill'; import { nanoid } from 'nanoid'; -import type { eventWithTime } from '@rrweb/types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; import { LocalData, LocalDataKey, diff --git a/packages/web-extension/src/content/inject.ts b/packages/web-extension/src/content/inject.ts index 1d18474a01..f66b4811bf 100644 --- a/packages/web-extension/src/content/inject.ts +++ b/packages/web-extension/src/content/inject.ts @@ -1,6 +1,6 @@ -import { record } from 'rrweb'; +import { record } from 'howdygo-rrweb'; import type { recordOptions } from 'rrweb/typings/types'; -import type { eventWithTime } from '@rrweb/types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; import { MessageName, RecordStartedMessage } from '~/types'; import { isInCrossOriginIFrame } from '~/utils'; diff --git a/packages/web-extension/src/pages/Player.tsx b/packages/web-extension/src/pages/Player.tsx index df0bf0aadf..b688f8265d 100644 --- a/packages/web-extension/src/pages/Player.tsx +++ b/packages/web-extension/src/pages/Player.tsx @@ -1,6 +1,6 @@ import { useRef, useEffect, useState } from 'react'; import { useParams } from 'react-router-dom'; -import Replayer from 'rrweb-player'; +import Replayer from 'howdygo-rrweb-player'; import { Box, Breadcrumb, diff --git a/packages/web-extension/src/types.ts b/packages/web-extension/src/types.ts index f0dae57e43..f22aeeb794 100644 --- a/packages/web-extension/src/types.ts +++ b/packages/web-extension/src/types.ts @@ -1,4 +1,4 @@ -import type { eventWithTime } from '@rrweb/types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; export enum SyncDataKey { settings = 'settings', diff --git a/packages/web-extension/src/utils/recording.ts b/packages/web-extension/src/utils/recording.ts index 69fc8362ea..d621b316f5 100644 --- a/packages/web-extension/src/utils/recording.ts +++ b/packages/web-extension/src/utils/recording.ts @@ -1,5 +1,5 @@ import Browser from 'webextension-polyfill'; -import type { eventWithTime } from '@rrweb/types'; +import type { eventWithTime } from 'howdygo-rrweb-types'; import { LocalData, diff --git a/packages/web-extension/src/utils/storage.ts b/packages/web-extension/src/utils/storage.ts index 9c52c38a05..c6fc8adb56 100644 --- a/packages/web-extension/src/utils/storage.ts +++ b/packages/web-extension/src/utils/storage.ts @@ -1,5 +1,5 @@ import { openDB } from 'idb'; -import { eventWithTime } from '@rrweb/types'; +import { eventWithTime } from 'howdygo-rrweb-types'; import { Session } from '~/types'; /**