@newrelic/browser-agent 1.323.0-rc.6 → 1.323.0-rc.8

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.
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.323.0-rc.6";
20
+ const VERSION = exports.VERSION = "1.323.0-rc.8";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -17,7 +17,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.RRWEB_PACKAGE_NAME = exports.D
17
17
  /**
18
18
  * Exposes the version of the agent
19
19
  */
20
- const VERSION = exports.VERSION = "1.323.0-rc.6";
20
+ const VERSION = exports.VERSION = "1.323.0-rc.8";
21
21
 
22
22
  /**
23
23
  * Exposes the build type of the agent
@@ -123,10 +123,13 @@ class RegisteredIframeEntity {
123
123
  return;
124
124
  }
125
125
 
126
+ /* Script timings are found by parsing the call stack for the script that called register(), so this has to run
127
+ synchronously here. By the time the registration promise resolves, that caller is no longer on the stack. */
128
+ const timings = (0, _scriptTracker.findScriptTimings)(opts);
129
+
126
130
  // Store the registration promise so other methods can wait for it
127
131
  this.#registrationPromise = this.#register(opts);
128
132
  this.#registrationPromise.then(() => {
129
- const timings = (0, _scriptTracker.findScriptTimings)();
130
133
  // Send initial timing values, skipping ones still at their "not yet known" default
131
134
  // (e.g. reportedAt: undefined, fetchStart: 0) to avoid pointless postMessage calls
132
135
  for (const [key, value] of Object.entries(timings)) {
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.323.0-rc.6";
14
+ export const VERSION = "1.323.0-rc.8";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -11,7 +11,7 @@
11
11
  /**
12
12
  * Exposes the version of the agent
13
13
  */
14
- export const VERSION = "1.323.0-rc.6";
14
+ export const VERSION = "1.323.0-rc.8";
15
15
 
16
16
  /**
17
17
  * Exposes the build type of the agent
@@ -115,10 +115,13 @@ export class RegisteredIframeEntity {
115
115
  return;
116
116
  }
117
117
 
118
+ /* Script timings are found by parsing the call stack for the script that called register(), so this has to run
119
+ synchronously here. By the time the registration promise resolves, that caller is no longer on the stack. */
120
+ const timings = findScriptTimings(opts);
121
+
118
122
  // Store the registration promise so other methods can wait for it
119
123
  this.#registrationPromise = this.#register(opts);
120
124
  this.#registrationPromise.then(() => {
121
- const timings = findScriptTimings();
122
125
  // Send initial timing values, skipping ones still at their "not yet known" default
123
126
  // (e.g. reportedAt: undefined, fetchStart: 0) to avoid pointless postMessage calls
124
127
  for (const [key, value] of Object.entries(timings)) {
@@ -1 +1 @@
1
- {"version":3,"file":"registered-iframe-entity.d.ts","sourceRoot":"","sources":["../../../src/interfaces/registered-iframe-entity.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AAEH;;;;;;GAMG;AACH;IAkDE;;;OAGG;IACH,kBAFW,sBAAsB,EAsDhC;IAzGD,kCAAkC;IAClC,UADW,mBAAmB,CAW7B;IAyBD,mBANa,OAAO,EAQnB;IAbD;;;;;;OAMG;IACH,eAFa,OAAO,CAInB;IAoTD;;;;;OAKG;IACH,oBAHW,MAAM,eACN,MAAM,QAIhB;IAED;;;;;;;OAOG;IACH,cAFa,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;;SAKK;IACL,6BAHa,MAAM,eACN,MAAM,QAIlB;IAED;;;;;;OAMG;IACH,cAJW,MAAM,YACN;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC,GACvF,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAC,CAAC,CAI7F;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,IAAI,YAC1B,OAAO,QAIjB;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,qBACZ,MAAM,QAIhB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GAAC,IAAI,iBACX,OAAO,QAIjB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,QAMrB;IAED;;;;;MAKE;IACF,aAHW,MAAM,YACN;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,CAAA;KAAC,QAIpF;;CACF;0BA9cY,OAAO,mCAAmC,EAAE,WAAW;kCACvD,OAAO,mCAAmC,EAAE,mBAAmB;qCAC/D,OAAO,mCAAmC,EAAE,sBAAsB"}
1
+ {"version":3,"file":"registered-iframe-entity.d.ts","sourceRoot":"","sources":["../../../src/interfaces/registered-iframe-entity.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AAEH;;;;;;GAMG;AACH;IAkDE;;;OAGG;IACH,kBAFW,sBAAsB,EAyDhC;IA5GD,kCAAkC;IAClC,UADW,mBAAmB,CAW7B;IAyBD,mBANa,OAAO,EAQnB;IAbD;;;;;;OAMG;IACH,eAFa,OAAO,CAInB;IAuTD;;;;;OAKG;IACH,oBAHW,MAAM,eACN,MAAM,QAIhB;IAED;;;;;;;OAOG;IACH,cAFa,OAAO,CAAC,IAAI,CAAC,CAgBzB;IAED;;;;;SAKK;IACL,6BAHa,MAAM,eACN,MAAM,QAIlB;IAED;;;;;;OAMG;IACH,cAJW,MAAM,YACN;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,eAAe,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC,GACvF,OAAO,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,CAAA;KAAC,CAAC,CAI7F;IAED;;;;;;OAMG;IACH,yBAJW,MAAM,SACN,MAAM,GAAC,MAAM,GAAC,OAAO,GAAC,IAAI,YAC1B,OAAO,QAIjB;IAED;;;;;OAKG;IACH,mBAHW,KAAK,GAAC,MAAM,qBACZ,MAAM,QAIhB;IAED;;;;;OAKG;IACH,iBAHW,MAAM,GAAC,IAAI,iBACX,OAAO,QAIjB;IAED;;;;;;;OAOG;IACH,6BAJW,MAAM,GAAC,IAAI,QAMrB;IAED;;;;;MAKE;IACF,aAHW,MAAM,YACN;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,GAAC,OAAO,GAAC,OAAO,GAAC,MAAM,GAAC,MAAM,CAAA;KAAC,QAIpF;;CACF;0BAjdY,OAAO,mCAAmC,EAAE,WAAW;kCACvD,OAAO,mCAAmC,EAAE,mBAAmB;qCAC/D,OAAO,mCAAmC,EAAE,sBAAsB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.323.0-rc.6",
3
+ "version": "1.323.0-rc.8",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -107,11 +107,14 @@ export class RegisteredIframeEntity {
107
107
  return
108
108
  }
109
109
 
110
+ /* Script timings are found by parsing the call stack for the script that called register(), so this has to run
111
+ synchronously here. By the time the registration promise resolves, that caller is no longer on the stack. */
112
+ const timings = findScriptTimings(opts)
113
+
110
114
  // Store the registration promise so other methods can wait for it
111
115
  this.#registrationPromise = this.#register(opts)
112
116
  this.#registrationPromise
113
117
  .then(() => {
114
- const timings = findScriptTimings()
115
118
  // Send initial timing values, skipping ones still at their "not yet known" default
116
119
  // (e.g. reportedAt: undefined, fetchStart: 0) to avoid pointless postMessage calls
117
120
  for (const [key, value] of Object.entries(timings)) {