@jitsu/js 1.9.15 → 1.9.17

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/dist/jitsu.cjs.js CHANGED
@@ -1835,10 +1835,13 @@ const jitsuAnalyticsPlugin = (jitsuOptions = {}, storage) => {
1835
1835
  },
1836
1836
  };
1837
1837
  };
1838
+ let seedCounter = 0;
1838
1839
  function getSeed() {
1839
1840
  var _a;
1841
+ seedCounter = (seedCounter + 1) % Number.MAX_SAFE_INTEGER;
1840
1842
  const defaultSeed = Date.now() % 2147483647;
1841
- return isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1843
+ const seed = isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1844
+ return seed + seedCounter;
1842
1845
  }
1843
1846
  function randomId(hashString = "") {
1844
1847
  const d = Date.now();
package/dist/jitsu.es.js CHANGED
@@ -1833,10 +1833,13 @@ const jitsuAnalyticsPlugin = (jitsuOptions = {}, storage) => {
1833
1833
  },
1834
1834
  };
1835
1835
  };
1836
+ let seedCounter = 0;
1836
1837
  function getSeed() {
1837
1838
  var _a;
1839
+ seedCounter = (seedCounter + 1) % Number.MAX_SAFE_INTEGER;
1838
1840
  const defaultSeed = Date.now() % 2147483647;
1839
- return isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1841
+ const seed = isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1842
+ return seed + seedCounter;
1840
1843
  }
1841
1844
  function randomId(hashString = "") {
1842
1845
  const d = Date.now();
package/dist/web/p.js.txt CHANGED
@@ -1836,10 +1836,13 @@
1836
1836
  },
1837
1837
  };
1838
1838
  };
1839
+ let seedCounter = 0;
1839
1840
  function getSeed() {
1840
1841
  var _a;
1842
+ seedCounter = (seedCounter + 1) % Number.MAX_SAFE_INTEGER;
1841
1843
  const defaultSeed = Date.now() % 2147483647;
1842
- return isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1844
+ const seed = isInBrowser() ? ((_a = window === null || window === void 0 ? void 0 : window.performance) === null || _a === void 0 ? void 0 : _a.now()) || defaultSeed : defaultSeed;
1845
+ return seed + seedCounter;
1843
1846
  }
1844
1847
  function randomId(hashString = "") {
1845
1848
  const d = Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jitsu/js",
3
- "version": "1.9.15",
3
+ "version": "1.9.17",
4
4
  "description": "",
5
5
  "author": "Jitsu Dev Team <dev@jitsu.com>",
6
6
  "main": "dist/jitsu.cjs.js",
@@ -35,8 +35,8 @@
35
35
  "rollup": "^3.29.5",
36
36
  "ts-jest": "29.0.5",
37
37
  "typescript": "^5.6.3",
38
- "@jitsu/protocols": "1.9.15",
39
- "jsondiffpatch": "1.9.15"
38
+ "@jitsu/protocols": "1.9.17",
39
+ "jsondiffpatch": "1.9.17"
40
40
  },
41
41
  "dependencies": {
42
42
  "analytics": "0.8.9"
@@ -942,9 +942,14 @@ export const jitsuAnalyticsPlugin = (jitsuOptions: JitsuOptions = {}, storage: P
942
942
  };
943
943
  };
944
944
 
945
+ let seedCounter = 0;
945
946
  function getSeed() {
947
+ seedCounter = (seedCounter + 1) % Number.MAX_SAFE_INTEGER;
948
+
946
949
  const defaultSeed = Date.now() % 2147483647;
947
- return isInBrowser() ? window?.performance?.now() || defaultSeed : defaultSeed;
950
+ const seed = isInBrowser() ? window?.performance?.now() || defaultSeed : defaultSeed;
951
+
952
+ return seed + seedCounter;
948
953
  }
949
954
 
950
955
  export function randomId(hashString: string | undefined = ""): string {