@spotify-confidence/session-recording 0.18.12 → 0.18.13

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.13](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.12...session-recording-v0.18.13) (2026-09-09)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @spotify-confidence/csr-common bumped to 0.18.10
11
+ * @spotify-confidence/csr-recorder bumped to 0.17.18
12
+
3
13
  ## [0.18.12](https://github.com/spotify/confidence-sdk-js/compare/session-recording-v0.18.11...session-recording-v0.18.12) (2026-09-07)
4
14
 
5
15
 
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_uploader = require("./uploader-B6-mcWdA.cjs");
2
+ const require_uploader = require("./uploader-DG4NHFfc.cjs");
3
3
  const VALID_KEY_PATTERN = /^[a-zA-Z0-9_.-]+$/;
4
4
  function validateKey(key) {
5
5
  if (typeof key !== "string" || key.length === 0) return "key is empty";
@@ -234,12 +234,13 @@ var Recorder = class Recorder {
234
234
  };
235
235
  }
236
236
  parameterizeHref(href) {
237
+ const strippedHref = require_uploader.stripUrlQueryAndHash(href);
237
238
  try {
238
- const url = new URL(href);
239
+ const url = new URL(strippedHref);
239
240
  url.pathname = this.parameterizeRoute(url.pathname);
240
241
  return url.toString();
241
242
  } catch (_e) {
242
- return this.parameterizeRoute(href);
243
+ return this.parameterizeRoute(strippedHref);
243
244
  }
244
245
  }
245
246
  emitRouteChange(from, to, trigger) {
@@ -11326,7 +11327,7 @@ function observeFlags(onFlagWrite) {
11326
11327
  }
11327
11328
  //#endregion
11328
11329
  //#region src/version.ts
11329
- const SDK_VERSION = "0.18.12";
11330
+ const SDK_VERSION = "0.18.13";
11330
11331
  //#endregion
11331
11332
  //#region src/index.ts
11332
11333
  const DEFAULT_API_URL = "https://recording.confidence.dev";
package/dist/index.d.cts CHANGED
@@ -25,7 +25,7 @@ type UserAgentContext = {
25
25
  screenWidth?: number;
26
26
  screenHeight?: number;
27
27
  devicePixelRatio?: number; /** Initial document URI — without query/hash to avoid leaking PII. */
28
- uri?: string;
28
+ uri?: string; /** Document referrer — without query/hash to avoid leaking PII. */
29
29
  referrer?: string;
30
30
  };
31
31
  interface ClientContext {
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ type UserAgentContext = {
25
25
  screenWidth?: number;
26
26
  screenHeight?: number;
27
27
  devicePixelRatio?: number; /** Initial document URI — without query/hash to avoid leaking PII. */
28
- uri?: string;
28
+ uri?: string; /** Document referrer — without query/hash to avoid leaking PII. */
29
29
  referrer?: string;
30
30
  };
31
31
  interface ClientContext {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as RecordingPluginName, t as createUploader } from "./uploader-vqAzevKI.js";
1
+ import { i as RecordingPluginName, r as stripUrlQueryAndHash, t as createUploader } from "./uploader-Dj4tUQ6O.js";
2
2
  const VALID_KEY_PATTERN = /^[a-zA-Z0-9_.-]+$/;
3
3
  function validateKey(key) {
4
4
  if (typeof key !== "string" || key.length === 0) return "key is empty";
@@ -233,12 +233,13 @@ var Recorder = class Recorder {
233
233
  };
234
234
  }
235
235
  parameterizeHref(href) {
236
+ const strippedHref = stripUrlQueryAndHash(href);
236
237
  try {
237
- const url = new URL(href);
238
+ const url = new URL(strippedHref);
238
239
  url.pathname = this.parameterizeRoute(url.pathname);
239
240
  return url.toString();
240
241
  } catch (_e) {
241
- return this.parameterizeRoute(href);
242
+ return this.parameterizeRoute(strippedHref);
242
243
  }
243
244
  }
244
245
  emitRouteChange(from, to, trigger) {
@@ -11307,7 +11308,7 @@ function observeFlags(onFlagWrite) {
11307
11308
  }
11308
11309
  //#endregion
11309
11310
  //#region src/version.ts
11310
- const SDK_VERSION = "0.18.12";
11311
+ const SDK_VERSION = "0.18.13";
11311
11312
  //#endregion
11312
11313
  //#region src/index.ts
11313
11314
  const DEFAULT_API_URL = "https://recording.confidence.dev";
@@ -50,6 +50,12 @@ const RecordingPluginName = {
50
50
  FlagEvaluation: "csr:flagEvaluation"
51
51
  };
52
52
  //#endregion
53
+ //#region ../csr-common/src/url.ts
54
+ /** Remove query strings and fragments, including from relative or malformed URLs. */
55
+ function stripUrlQueryAndHash(url) {
56
+ return url.split(/[?#]/, 1)[0];
57
+ }
58
+ //#endregion
53
59
  //#region ../csr-common/src/metrics.ts
54
60
  const RecordingMetricKey = {
55
61
  Click: "clicks",
@@ -1845,7 +1851,7 @@ function collectUserAgentContext() {
1845
1851
  screenHeight: window.screen.height,
1846
1852
  devicePixelRatio: window.devicePixelRatio,
1847
1853
  uri: `${window.location.origin}${window.location.pathname}`,
1848
- referrer: document.referrer
1854
+ referrer: stripUrlQueryAndHash(document.referrer)
1849
1855
  };
1850
1856
  }
1851
1857
  //#endregion
@@ -2160,6 +2166,12 @@ Object.defineProperty(exports, "createUploader", {
2160
2166
  return createUploader;
2161
2167
  }
2162
2168
  });
2169
+ Object.defineProperty(exports, "stripUrlQueryAndHash", {
2170
+ enumerable: true,
2171
+ get: function() {
2172
+ return stripUrlQueryAndHash;
2173
+ }
2174
+ });
2163
2175
  Object.defineProperty(exports, "workerScript", {
2164
2176
  enumerable: true,
2165
2177
  get: function() {
@@ -50,6 +50,12 @@ const RecordingPluginName = {
50
50
  FlagEvaluation: "csr:flagEvaluation"
51
51
  };
52
52
  //#endregion
53
+ //#region ../csr-common/src/url.ts
54
+ /** Remove query strings and fragments, including from relative or malformed URLs. */
55
+ function stripUrlQueryAndHash(url) {
56
+ return url.split(/[?#]/, 1)[0];
57
+ }
58
+ //#endregion
53
59
  //#region ../csr-common/src/metrics.ts
54
60
  const RecordingMetricKey = {
55
61
  Click: "clicks",
@@ -1845,7 +1851,7 @@ function collectUserAgentContext() {
1845
1851
  screenHeight: window.screen.height,
1846
1852
  devicePixelRatio: window.devicePixelRatio,
1847
1853
  uri: `${window.location.origin}${window.location.pathname}`,
1848
- referrer: document.referrer
1854
+ referrer: stripUrlQueryAndHash(document.referrer)
1849
1855
  };
1850
1856
  }
1851
1857
  //#endregion
@@ -2148,4 +2154,4 @@ function writeCounter(counter) {
2148
2154
  sessionStorage.setItem(STORAGE_COUNTER, String(counter));
2149
2155
  }
2150
2156
  //#endregion
2151
- export { workerScript as n, RecordingPluginName as r, createUploader as t };
2157
+ export { RecordingPluginName as i, workerScript as n, stripUrlQueryAndHash as r, createUploader as t };
package/dist/worker.cjs CHANGED
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_uploader = require("./uploader-B6-mcWdA.cjs");
2
+ const require_uploader = require("./uploader-DG4NHFfc.cjs");
3
3
  exports.workerScript = require_uploader.workerScript;
package/dist/worker.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as workerScript } from "./uploader-vqAzevKI.js";
1
+ import { n as workerScript } from "./uploader-Dj4tUQ6O.js";
2
2
  export { workerScript };
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.12",
4
+ "version": "0.18.13",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/spotify/confidence-sdk-js.git",
@@ -41,8 +41,8 @@
41
41
  }
42
42
  },
43
43
  "dependencies": {
44
- "@spotify-confidence/csr-common": "0.18.9",
45
- "@spotify-confidence/csr-recorder": "0.17.17"
44
+ "@spotify-confidence/csr-common": "0.18.10",
45
+ "@spotify-confidence/csr-recorder": "0.17.18"
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.12';
1
+ export const SDK_VERSION = '0.18.13';