@spotify-confidence/session-recording 0.18.8 → 0.18.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.cjs +20 -5
- package/dist/index.js +20 -5
- package/package.json +2 -2
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.18.10](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.9...session-recording-v0.18.10) (2026-08-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @spotify-confidence/csr-recorder bumped to 0.17.15
|
|
11
|
+
|
|
12
|
+
## [0.18.9](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.8...session-recording-v0.18.9) (2026-08-20)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* The following workspace dependencies were updated
|
|
18
|
+
* dependencies
|
|
19
|
+
* @spotify-confidence/csr-recorder bumped to 0.17.14
|
|
20
|
+
|
|
3
21
|
## [0.18.8](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.7...session-recording-v0.18.8) (2026-08-18)
|
|
4
22
|
|
|
5
23
|
|
package/dist/index.cjs
CHANGED
|
@@ -83,6 +83,7 @@ var Recorder = class Recorder {
|
|
|
83
83
|
onEvent;
|
|
84
84
|
state = "idle";
|
|
85
85
|
visibilityHandler = null;
|
|
86
|
+
pageShowHandler = null;
|
|
86
87
|
originalFetch = null;
|
|
87
88
|
originalXhrOpen = null;
|
|
88
89
|
originalXhrSend = null;
|
|
@@ -128,6 +129,12 @@ var Recorder = class Recorder {
|
|
|
128
129
|
};
|
|
129
130
|
document.addEventListener("visibilitychange", this.visibilityHandler);
|
|
130
131
|
}
|
|
132
|
+
if (typeof window !== "undefined") {
|
|
133
|
+
this.pageShowHandler = (event) => {
|
|
134
|
+
if (event.persisted) this.engine.takeFullSnapshot();
|
|
135
|
+
};
|
|
136
|
+
window.addEventListener("pageshow", this.pageShowHandler);
|
|
137
|
+
}
|
|
131
138
|
if (config?.captureNetworkRequests) this.patchNetwork();
|
|
132
139
|
if (config?.captureRouteChanges !== false) this.patchRouting();
|
|
133
140
|
}
|
|
@@ -314,6 +321,10 @@ var Recorder = class Recorder {
|
|
|
314
321
|
document.removeEventListener("visibilitychange", this.visibilityHandler);
|
|
315
322
|
this.visibilityHandler = null;
|
|
316
323
|
}
|
|
324
|
+
if (this.pageShowHandler) {
|
|
325
|
+
window.removeEventListener("pageshow", this.pageShowHandler);
|
|
326
|
+
this.pageShowHandler = null;
|
|
327
|
+
}
|
|
317
328
|
this.restoreNetwork();
|
|
318
329
|
this.restoreRouting();
|
|
319
330
|
this.engine.stop();
|
|
@@ -11140,16 +11151,17 @@ function clickModifiersPlugin() {
|
|
|
11140
11151
|
observer: (_callback, win) => {
|
|
11141
11152
|
const onClick = (event) => {
|
|
11142
11153
|
const click = event;
|
|
11143
|
-
|
|
11154
|
+
const modifiers = {
|
|
11144
11155
|
button: click.button,
|
|
11145
11156
|
altKey: click.altKey,
|
|
11146
11157
|
ctrlKey: click.ctrlKey,
|
|
11147
11158
|
metaKey: click.metaKey,
|
|
11148
11159
|
shiftKey: click.shiftKey
|
|
11149
11160
|
};
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11161
|
+
pendingClick = modifiers;
|
|
11162
|
+
win.setTimeout(() => {
|
|
11163
|
+
if (pendingClick === modifiers) pendingClick = null;
|
|
11164
|
+
}, 0);
|
|
11153
11165
|
};
|
|
11154
11166
|
win.addEventListener("click", onClick, true);
|
|
11155
11167
|
return () => win.removeEventListener("click", onClick, true);
|
|
@@ -11200,6 +11212,9 @@ var RrwebEngine = class {
|
|
|
11200
11212
|
slimDOMOptions: "all"
|
|
11201
11213
|
}) ?? null;
|
|
11202
11214
|
}
|
|
11215
|
+
takeFullSnapshot() {
|
|
11216
|
+
takeFullSnapshot(true);
|
|
11217
|
+
}
|
|
11203
11218
|
stop() {
|
|
11204
11219
|
this.stopFn?.();
|
|
11205
11220
|
this.stopFn = null;
|
|
@@ -11250,7 +11265,7 @@ function observeFlags(onFlagWrite) {
|
|
|
11250
11265
|
}
|
|
11251
11266
|
//#endregion
|
|
11252
11267
|
//#region src/version.ts
|
|
11253
|
-
const SDK_VERSION = "0.18.
|
|
11268
|
+
const SDK_VERSION = "0.18.10";
|
|
11254
11269
|
//#endregion
|
|
11255
11270
|
//#region src/index.ts
|
|
11256
11271
|
const DEFAULT_API_URL = "https://recording.confidence.dev";
|
package/dist/index.js
CHANGED
|
@@ -82,6 +82,7 @@ var Recorder = class Recorder {
|
|
|
82
82
|
onEvent;
|
|
83
83
|
state = "idle";
|
|
84
84
|
visibilityHandler = null;
|
|
85
|
+
pageShowHandler = null;
|
|
85
86
|
originalFetch = null;
|
|
86
87
|
originalXhrOpen = null;
|
|
87
88
|
originalXhrSend = null;
|
|
@@ -127,6 +128,12 @@ var Recorder = class Recorder {
|
|
|
127
128
|
};
|
|
128
129
|
document.addEventListener("visibilitychange", this.visibilityHandler);
|
|
129
130
|
}
|
|
131
|
+
if (typeof window !== "undefined") {
|
|
132
|
+
this.pageShowHandler = (event) => {
|
|
133
|
+
if (event.persisted) this.engine.takeFullSnapshot();
|
|
134
|
+
};
|
|
135
|
+
window.addEventListener("pageshow", this.pageShowHandler);
|
|
136
|
+
}
|
|
130
137
|
if (config?.captureNetworkRequests) this.patchNetwork();
|
|
131
138
|
if (config?.captureRouteChanges !== false) this.patchRouting();
|
|
132
139
|
}
|
|
@@ -313,6 +320,10 @@ var Recorder = class Recorder {
|
|
|
313
320
|
document.removeEventListener("visibilitychange", this.visibilityHandler);
|
|
314
321
|
this.visibilityHandler = null;
|
|
315
322
|
}
|
|
323
|
+
if (this.pageShowHandler) {
|
|
324
|
+
window.removeEventListener("pageshow", this.pageShowHandler);
|
|
325
|
+
this.pageShowHandler = null;
|
|
326
|
+
}
|
|
316
327
|
this.restoreNetwork();
|
|
317
328
|
this.restoreRouting();
|
|
318
329
|
this.engine.stop();
|
|
@@ -11121,16 +11132,17 @@ function clickModifiersPlugin() {
|
|
|
11121
11132
|
observer: (_callback, win) => {
|
|
11122
11133
|
const onClick = (event) => {
|
|
11123
11134
|
const click = event;
|
|
11124
|
-
|
|
11135
|
+
const modifiers = {
|
|
11125
11136
|
button: click.button,
|
|
11126
11137
|
altKey: click.altKey,
|
|
11127
11138
|
ctrlKey: click.ctrlKey,
|
|
11128
11139
|
metaKey: click.metaKey,
|
|
11129
11140
|
shiftKey: click.shiftKey
|
|
11130
11141
|
};
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11142
|
+
pendingClick = modifiers;
|
|
11143
|
+
win.setTimeout(() => {
|
|
11144
|
+
if (pendingClick === modifiers) pendingClick = null;
|
|
11145
|
+
}, 0);
|
|
11134
11146
|
};
|
|
11135
11147
|
win.addEventListener("click", onClick, true);
|
|
11136
11148
|
return () => win.removeEventListener("click", onClick, true);
|
|
@@ -11181,6 +11193,9 @@ var RrwebEngine = class {
|
|
|
11181
11193
|
slimDOMOptions: "all"
|
|
11182
11194
|
}) ?? null;
|
|
11183
11195
|
}
|
|
11196
|
+
takeFullSnapshot() {
|
|
11197
|
+
takeFullSnapshot(true);
|
|
11198
|
+
}
|
|
11184
11199
|
stop() {
|
|
11185
11200
|
this.stopFn?.();
|
|
11186
11201
|
this.stopFn = null;
|
|
@@ -11231,7 +11246,7 @@ function observeFlags(onFlagWrite) {
|
|
|
11231
11246
|
}
|
|
11232
11247
|
//#endregion
|
|
11233
11248
|
//#region src/version.ts
|
|
11234
|
-
const SDK_VERSION = "0.18.
|
|
11249
|
+
const SDK_VERSION = "0.18.10";
|
|
11235
11250
|
//#endregion
|
|
11236
11251
|
//#region src/index.ts
|
|
11237
11252
|
const DEFAULT_API_URL = "https://recording.confidence.dev";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spotify-confidence/session-recording",
|
|
3
3
|
"license": "Apache-2.0",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.10",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/spotify/confidence-sdk-js.git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@spotify-confidence/csr-common": "0.18.7",
|
|
45
|
-
"@spotify-confidence/csr-recorder": "0.17.
|
|
45
|
+
"@spotify-confidence/csr-recorder": "0.17.15"
|
|
46
46
|
},
|
|
47
47
|
"module": "./dist/index.js",
|
|
48
48
|
"exports": {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '0.18.
|
|
1
|
+
export const SDK_VERSION = '0.18.10';
|