@openreplay/tracker 3.6.2 → 3.6.3

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/cjs/app/index.js CHANGED
@@ -32,7 +32,7 @@ class App {
32
32
  this.stopCallbacks = [];
33
33
  this.commitCallbacks = [];
34
34
  this.activityState = ActivityState.NotActive;
35
- this.version = '3.6.2'; // TODO: version compatability check inside each plugin.
35
+ this.version = '3.6.3'; // TODO: version compatability check inside each plugin.
36
36
  this.projectKey = projectKey;
37
37
  this.options = Object.assign({
38
38
  revID: '',
@@ -120,9 +120,9 @@ class App {
120
120
  return;
121
121
  }
122
122
  this.messages.push(message);
123
- // TODO: commit on start if there were `urgent` sends;
123
+ // TODO: commit on start if there were `urgent` sends;
124
124
  // Clearify where urgent can be used for;
125
- // Clearify workflow for each type of message in case it was sent before start
125
+ // Clearify workflow for each type of message in case it was sent before start
126
126
  // (like Fetch before start; maybe add an option "preCapture: boolean" or sth alike)
127
127
  if (this.activityState === ActivityState.Active && urgent) {
128
128
  this.commit();
@@ -172,6 +172,9 @@ class App {
172
172
  const reqVer = version.split(/[.-]/);
173
173
  const ver = this.version.split(/[.-]/);
174
174
  for (let i = 0; i < 3; i++) {
175
+ if (Number(ver[i]) > Number(reqVer[i])) {
176
+ return true;
177
+ }
175
178
  if (Number(ver[i]) < Number(reqVer[i]) || isNaN(Number(ver[i])) || isNaN(Number(reqVer[i]))) {
176
179
  return false;
177
180
  }
@@ -266,7 +269,7 @@ class App {
266
269
  };
267
270
  this.worker.postMessage(startWorkerMsg);
268
271
  this.session.update({
269
- // "updating" with old metadata in order to trigger session's UpdateCallbacks.
272
+ // "updating" with old metadata in order to trigger session's UpdateCallbacks.
270
273
  // (for the case of internal .start() calls, like on "restart" webworker signal or assistent connection in tracker-assist )
271
274
  metadata: startOpts.metadata || this.session.getInfo().metadata,
272
275
  userID: startOpts.userID,
package/cjs/index.js CHANGED
@@ -127,7 +127,7 @@ class API {
127
127
  // no-cors issue only with text/plain or not-set Content-Type
128
128
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
129
129
  req.send(JSON.stringify({
130
- trackerVersion: '3.6.2',
130
+ trackerVersion: '3.6.3',
131
131
  projectKey: options.projectKey,
132
132
  doNotTrack,
133
133
  // TODO: add precise reason (an exact API missing)
package/lib/app/index.js CHANGED
@@ -29,7 +29,7 @@ export default class App {
29
29
  this.stopCallbacks = [];
30
30
  this.commitCallbacks = [];
31
31
  this.activityState = ActivityState.NotActive;
32
- this.version = '3.6.2'; // TODO: version compatability check inside each plugin.
32
+ this.version = '3.6.3'; // TODO: version compatability check inside each plugin.
33
33
  this.projectKey = projectKey;
34
34
  this.options = Object.assign({
35
35
  revID: '',
@@ -117,9 +117,9 @@ export default class App {
117
117
  return;
118
118
  }
119
119
  this.messages.push(message);
120
- // TODO: commit on start if there were `urgent` sends;
120
+ // TODO: commit on start if there were `urgent` sends;
121
121
  // Clearify where urgent can be used for;
122
- // Clearify workflow for each type of message in case it was sent before start
122
+ // Clearify workflow for each type of message in case it was sent before start
123
123
  // (like Fetch before start; maybe add an option "preCapture: boolean" or sth alike)
124
124
  if (this.activityState === ActivityState.Active && urgent) {
125
125
  this.commit();
@@ -169,6 +169,9 @@ export default class App {
169
169
  const reqVer = version.split(/[.-]/);
170
170
  const ver = this.version.split(/[.-]/);
171
171
  for (let i = 0; i < 3; i++) {
172
+ if (Number(ver[i]) > Number(reqVer[i])) {
173
+ return true;
174
+ }
172
175
  if (Number(ver[i]) < Number(reqVer[i]) || isNaN(Number(ver[i])) || isNaN(Number(reqVer[i]))) {
173
176
  return false;
174
177
  }
@@ -263,7 +266,7 @@ export default class App {
263
266
  };
264
267
  this.worker.postMessage(startWorkerMsg);
265
268
  this.session.update({
266
- // "updating" with old metadata in order to trigger session's UpdateCallbacks.
269
+ // "updating" with old metadata in order to trigger session's UpdateCallbacks.
267
270
  // (for the case of internal .start() calls, like on "restart" webworker signal or assistent connection in tracker-assist )
268
271
  metadata: startOpts.metadata || this.session.getInfo().metadata,
269
272
  userID: startOpts.userID,
package/lib/index.js CHANGED
@@ -123,7 +123,7 @@ export default class API {
123
123
  // no-cors issue only with text/plain or not-set Content-Type
124
124
  // req.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
125
125
  req.send(JSON.stringify({
126
- trackerVersion: '3.6.2',
126
+ trackerVersion: '3.6.3',
127
127
  projectKey: options.projectKey,
128
128
  doNotTrack,
129
129
  // TODO: add precise reason (an exact API missing)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "3.6.2",
4
+ "version": "3.6.3",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"