@openreplay/tracker 16.1.0-beta.10 → 16.1.0-beta.2

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/cjs/entry.js CHANGED
@@ -725,9 +725,7 @@ class StringDictionary {
725
725
  this.backDict = {};
726
726
  this.getKey = (str) => {
727
727
  let isNew = false;
728
- // avoiding potential native object properties
729
- const safeKey = `__${str}`;
730
- if (!this.backDict[safeKey]) {
728
+ if (!this.backDict[str]) {
731
729
  isNew = true;
732
730
  // shaving the first 2 digits of the timestamp (since they are irrelevant for next millennia)
733
731
  const shavedTs = Date.now() % 10 ** (13 - 2);
@@ -739,10 +737,10 @@ class StringDictionary {
739
737
  else {
740
738
  this.lastSuffix = 1;
741
739
  }
742
- this.backDict[safeKey] = id;
740
+ this.backDict[str] = id;
743
741
  this.lastTs = shavedTs;
744
742
  }
745
- return [this.backDict[safeKey], isNew];
743
+ return [this.backDict[str], isNew];
746
744
  };
747
745
  }
748
746
  }
@@ -4712,7 +4710,7 @@ class App {
4712
4710
  this.stopCallbacks = [];
4713
4711
  this.commitCallbacks = [];
4714
4712
  this.activityState = ActivityState.NotActive;
4715
- this.version = '16.1.0-beta.10'; // TODO: version compatability check inside each plugin.
4713
+ this.version = '16.1.0-beta.2'; // TODO: version compatability check inside each plugin.
4716
4714
  this.socketMode = false;
4717
4715
  this.compressionThreshold = 24 * 1000;
4718
4716
  this.bc = null;
@@ -5351,15 +5349,8 @@ class App {
5351
5349
  this.worker?.postMessage(this.messages);
5352
5350
  }
5353
5351
  catch (e) {
5352
+ console.log(this.messages.join('$___$'));
5354
5353
  console.error(e);
5355
- this.messages.forEach(m => {
5356
- try {
5357
- this.worker?.postMessage([m]);
5358
- }
5359
- catch (e) {
5360
- console.error(m, e);
5361
- }
5362
- });
5363
5354
  }
5364
5355
  this.commitCallbacks.forEach((cb) => cb(this.messages));
5365
5356
  this.messages.length = 0;
@@ -9188,7 +9179,7 @@ class API {
9188
9179
  this.signalStartIssue = (reason, missingApi) => {
9189
9180
  const doNotTrack = this.checkDoNotTrack();
9190
9181
  console.log("Tracker couldn't start due to:", JSON.stringify({
9191
- trackerVersion: '16.1.0-beta.10',
9182
+ trackerVersion: '16.1.0-beta.2',
9192
9183
  projectKey: this.options.projectKey,
9193
9184
  doNotTrack,
9194
9185
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,