@newrelic/browser-agent 1.305.0-rc.2 → 1.305.0-rc.4
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/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/constants/runtime.js +1 -1
- package/dist/cjs/common/vitals/time-to-first-byte.js +1 -0
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/constants/runtime.js +1 -1
- package/dist/esm/common/vitals/time-to-first-byte.js +1 -0
- package/dist/types/common/constants/runtime.d.ts +1 -1
- package/dist/types/common/constants/runtime.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/common/constants/runtime.js +1 -1
- package/src/common/vitals/time-to-first-byte.js +1 -0
|
@@ -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.305.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.305.0-rc.4";
|
|
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.305.0-rc.
|
|
20
|
+
const VERSION = exports.VERSION = "1.305.0-rc.4";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -54,5 +54,5 @@ const ffVersion = exports.ffVersion = (() => {
|
|
|
54
54
|
* @type {number}
|
|
55
55
|
*/
|
|
56
56
|
const originTime = exports.originTime = Date.now() - (0, _now.now)();
|
|
57
|
-
const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.
|
|
57
|
+
const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.[0]?.responseStart;
|
|
58
58
|
exports.supportsNavTimingL2 = supportsNavTimingL2;
|
|
@@ -21,6 +21,7 @@ const timeToFirstByte = exports.timeToFirstByte = new _vitalMetric.VitalMetric(_
|
|
|
21
21
|
* - in browsers that do not support PerformanceNavigationTiming API
|
|
22
22
|
* - in an iOS browser
|
|
23
23
|
* - cross-origin iframes specifically in firefox and safari
|
|
24
|
+
* - onTTFB relies on a truthy `responseStart` value, should ensure that exists before relying on it (seen to be falsy in certain Electron.js cases for instance)
|
|
24
25
|
*/
|
|
25
26
|
if (_runtime.isBrowserScope && (0, _runtime.supportsNavTimingL2)() && !_runtime.isiOS && window === window.parent) {
|
|
26
27
|
(0, _attribution.onTTFB)(({
|
|
@@ -49,4 +49,4 @@ export const ffVersion = (() => {
|
|
|
49
49
|
* @type {number}
|
|
50
50
|
*/
|
|
51
51
|
export const originTime = Date.now() - now();
|
|
52
|
-
export const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.
|
|
52
|
+
export const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.[0]?.responseStart;
|
|
@@ -14,6 +14,7 @@ export const timeToFirstByte = new VitalMetric(VITAL_NAMES.TIME_TO_FIRST_BYTE);
|
|
|
14
14
|
* - in browsers that do not support PerformanceNavigationTiming API
|
|
15
15
|
* - in an iOS browser
|
|
16
16
|
* - cross-origin iframes specifically in firefox and safari
|
|
17
|
+
* - onTTFB relies on a truthy `responseStart` value, should ensure that exists before relying on it (seen to be falsy in certain Electron.js cases for instance)
|
|
17
18
|
*/
|
|
18
19
|
if (isBrowserScope && supportsNavTimingL2() && !isiOS && window === window.parent) {
|
|
19
20
|
onTTFB(({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/runtime.js"],"names":[],"mappings":"AAcA;;GAEG;AACH,qCAEqB;AAErB;;GAEG;AACH,oCAeK;AAEL,oDAUI;AAEJ,oDAA6F;AAE7F,sCAA2F;AAE3F,qCAAyD;AAEzD,4BAA8E;AAE9E;;;;;;GAMG;AACH,iCAAwE;AAExE,+BAOI;AAEJ;;;;GAIG;AACH,yBAFU,MAAM,CAE4B;AAErC
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/runtime.js"],"names":[],"mappings":"AAcA;;GAEG;AACH,qCAEqB;AAErB;;GAEG;AACH,oCAeK;AAEL,oDAUI;AAEJ,oDAA6F;AAE7F,sCAA2F;AAE3F,qCAAyD;AAEzD,4BAA8E;AAE9E;;;;;;GAMG;AACH,iCAAwE;AAExE,+BAOI;AAEJ;;;;GAIG;AACH,yBAFU,MAAM,CAE4B;AAErC,2CAAoK"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/browser-agent",
|
|
3
|
-
"version": "1.305.0-rc.
|
|
3
|
+
"version": "1.305.0-rc.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
|
|
6
6
|
"description": "New Relic Browser Agent",
|
|
@@ -195,6 +195,7 @@
|
|
|
195
195
|
"build:npm": "npm run npm:build:esm && npm run npm:build:cjs && npm run npm:build:types && npm run npm:pack",
|
|
196
196
|
"cdn:build": "npm run cdn:build:prod",
|
|
197
197
|
"cdn:build:local": "npm run cdn:webpack",
|
|
198
|
+
"cdn:build:local-external": "npm run cdn:webpack -- --env mode=local-external",
|
|
198
199
|
"cdn:build:prod": "npm run cdn:webpack -- --env mode=prod",
|
|
199
200
|
"cdn:build:dev": "npm run cdn:webpack -- --env mode=dev",
|
|
200
201
|
"cdn:build:experiment": "npm run cdn:webpack -- --env mode=experiment",
|
|
@@ -84,4 +84,4 @@ export const ffVersion = (() => {
|
|
|
84
84
|
*/
|
|
85
85
|
export const originTime = Date.now() - now()
|
|
86
86
|
|
|
87
|
-
export const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.
|
|
87
|
+
export const supportsNavTimingL2 = () => typeof PerformanceNavigationTiming !== 'undefined' && globalScope?.performance?.getEntriesByType('navigation')?.[0]?.responseStart
|
|
@@ -15,6 +15,7 @@ export const timeToFirstByte = new VitalMetric(VITAL_NAMES.TIME_TO_FIRST_BYTE)
|
|
|
15
15
|
* - in browsers that do not support PerformanceNavigationTiming API
|
|
16
16
|
* - in an iOS browser
|
|
17
17
|
* - cross-origin iframes specifically in firefox and safari
|
|
18
|
+
* - onTTFB relies on a truthy `responseStart` value, should ensure that exists before relying on it (seen to be falsy in certain Electron.js cases for instance)
|
|
18
19
|
*/
|
|
19
20
|
if (isBrowserScope && supportsNavTimingL2() && !isiOS && window === window.parent) {
|
|
20
21
|
onTTFB(({ value, attribution }) => {
|