From c803e02f56debb9dc43c78a6be842594a2c821a4 Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Mon, 3 Jun 2024 10:07:24 -0400 Subject: [PATCH 1/7] fix(rrweb-snapshot): pass maskInputFn correctly --- .../test/__snapshots__/integration.test.ts.snap | 6 ++++++ packages/rrweb/src/record/index.ts | 1 + .../rrweb/test/__snapshots__/integration.test.ts.snap | 9 +++++++++ 3 files changed, 16 insertions(+) diff --git a/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap b/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap index a50f27cebe..1728e7efab 100644 --- a/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap +++ b/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap @@ -363,6 +363,12 @@ exports[`integration tests [html file]: picture-in-frame.html 1`] = ` " `; +exports[`integration tests [html file]: picture-with-inline-onload.html 1`] = ` +" + \\"This + " +`; + exports[`integration tests [html file]: preload.html 1`] = ` " diff --git a/packages/rrweb/src/record/index.ts b/packages/rrweb/src/record/index.ts index c2ac921a7c..b09baf6139 100644 --- a/packages/rrweb/src/record/index.ts +++ b/packages/rrweb/src/record/index.ts @@ -378,6 +378,7 @@ function record( inlineStylesheet, maskAllInputs: maskInputOptions, maskTextFn, + maskInputFn, slimDOM: slimDOMOptions, dataURLOptions, recordCanvas, diff --git a/packages/rrweb/test/__snapshots__/integration.test.ts.snap b/packages/rrweb/test/__snapshots__/integration.test.ts.snap index e320254111..de38709f18 100644 --- a/packages/rrweb/test/__snapshots__/integration.test.ts.snap +++ b/packages/rrweb/test/__snapshots__/integration.test.ts.snap @@ -9216,6 +9216,15 @@ exports[`record integration tests should not record input values if dynamically \\"id\\": 21 } }, + { + \\"type\\": 3, + \\"data\\": { + \\"source\\": 3, + \\"id\\": 21, + \\"x\\": 2, + \\"y\\": 0 + } + }, { \\"type\\": 3, \\"data\\": { From b202f5e6c13bb22ea1c6414290538ce1379388a1 Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Mon, 3 Jun 2024 16:56:00 -0400 Subject: [PATCH 2/7] test: snapshot issue --- .../rrweb/test/__snapshots__/integration.test.ts.snap | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/rrweb/test/__snapshots__/integration.test.ts.snap b/packages/rrweb/test/__snapshots__/integration.test.ts.snap index de38709f18..e320254111 100644 --- a/packages/rrweb/test/__snapshots__/integration.test.ts.snap +++ b/packages/rrweb/test/__snapshots__/integration.test.ts.snap @@ -9216,15 +9216,6 @@ exports[`record integration tests should not record input values if dynamically \\"id\\": 21 } }, - { - \\"type\\": 3, - \\"data\\": { - \\"source\\": 3, - \\"id\\": 21, - \\"x\\": 2, - \\"y\\": 0 - } - }, { \\"type\\": 3, \\"data\\": { From bf02ff569ef6761623da769d681020d817dec354 Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Wed, 5 Jun 2024 14:34:16 -0400 Subject: [PATCH 3/7] test: remove snapshot --- .../test/__snapshots__/integration.test.ts.snap | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap b/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap index 1728e7efab..a50f27cebe 100644 --- a/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap +++ b/packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap @@ -363,12 +363,6 @@ exports[`integration tests [html file]: picture-in-frame.html 1`] = ` " `; -exports[`integration tests [html file]: picture-with-inline-onload.html 1`] = ` -" - \\"This - " -`; - exports[`integration tests [html file]: preload.html 1`] = ` " From 8017f2a2901ab5c73b47952ad1fb012d37eb3efc Mon Sep 17 00:00:00 2001 From: Lew Gordon <167105523+lewgordon-amplitude@users.noreply.github.com> Date: Wed, 5 Jun 2024 14:37:30 -0400 Subject: [PATCH 4/7] Create short-masks-cross.md --- .changeset/short-masks-cross.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/short-masks-cross.md diff --git a/.changeset/short-masks-cross.md b/.changeset/short-masks-cross.md new file mode 100644 index 0000000000..b3a1d16452 --- /dev/null +++ b/.changeset/short-masks-cross.md @@ -0,0 +1,5 @@ +--- +"@amplitude/rrweb": patch +--- + +fix(rrweb-snapshot): pass maskInputFn correctly From bb4509d4efbe6df9e1a73c6bcf85bb1879029206 Mon Sep 17 00:00:00 2001 From: lewgordon-amplitude Date: Wed, 5 Jun 2024 18:38:34 +0000 Subject: [PATCH 5/7] Apply formatting changes --- .changeset/short-masks-cross.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/short-masks-cross.md b/.changeset/short-masks-cross.md index b3a1d16452..5630816889 100644 --- a/.changeset/short-masks-cross.md +++ b/.changeset/short-masks-cross.md @@ -1,5 +1,5 @@ --- -"@amplitude/rrweb": patch +'@amplitude/rrweb': patch --- fix(rrweb-snapshot): pass maskInputFn correctly From 5844b679cad8b35bd99708a906e60dce963524ea Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Wed, 5 Jun 2024 15:23:58 -0400 Subject: [PATCH 6/7] build: no rollup cache --- packages/rrdom/test/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rrdom/test/utils.ts b/packages/rrdom/test/utils.ts index 6fe53920d2..e07f150708 100644 --- a/packages/rrdom/test/utils.ts +++ b/packages/rrdom/test/utils.ts @@ -9,6 +9,7 @@ const _typescript = typescript as unknown as typeof typescript.default; export async function compileTSCode(inputFilePath: string) { const bundle = await rollup.rollup({ input: inputFilePath, + cache: false, plugins: [ resolve() as unknown as rollup.Plugin, _typescript({ From 01c42a7cbed8bdd8c28f773aa7edfdfb11cc1b68 Mon Sep 17 00:00:00 2001 From: Lew Gordon Date: Wed, 5 Jun 2024 15:59:10 -0400 Subject: [PATCH 7/7] build: typescript rollup cache clean --- packages/rrdom/test/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/rrdom/test/utils.ts b/packages/rrdom/test/utils.ts index e07f150708..ad1497a2d8 100644 --- a/packages/rrdom/test/utils.ts +++ b/packages/rrdom/test/utils.ts @@ -14,6 +14,7 @@ export async function compileTSCode(inputFilePath: string) { resolve() as unknown as rollup.Plugin, _typescript({ tsconfigOverride: { compilerOptions: { module: 'ESNext' } }, + clean: true, }) as unknown as rollup.Plugin, ], });