@newrelic/browser-agent 1.312.0 → 1.312.1-rc.1
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/CHANGELOG.md +7 -0
- package/dist/cjs/common/constants/env.cdn.js +1 -1
- package/dist/cjs/common/constants/env.npm.js +1 -1
- package/dist/cjs/common/util/script-tracker.js +3 -3
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/common/util/script-tracker.js +3 -3
- package/package.json +2 -2
- package/src/common/util/script-tracker.js +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.312.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.312.0...v1.312.1) (2026-04-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* .at causes issues in older browsers ([#1737](https://github.com/newrelic/newrelic-browser-agent/issues/1737)) ([a208566](https://github.com/newrelic/newrelic-browser-agent/commit/a20856668b26fc3b2763112a8c78a8eb2cd3a25c))
|
|
12
|
+
|
|
6
13
|
## [1.312.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.311.0...v1.312.0) (2026-03-30)
|
|
7
14
|
|
|
8
15
|
|
|
@@ -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.312.
|
|
20
|
+
const VERSION = exports.VERSION = "1.312.1-rc.1";
|
|
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.312.
|
|
20
|
+
const VERSION = exports.VERSION = "1.312.1-rc.1";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -23,9 +23,9 @@ var _browserStackMatchers = require("./browser-stack-matchers");
|
|
|
23
23
|
/** export for testing purposes */
|
|
24
24
|
let thisFile = exports.thisFile = void 0;
|
|
25
25
|
try {
|
|
26
|
-
exports.thisFile = thisFile = extractUrlsFromStack(getDeepStackTrace())
|
|
26
|
+
exports.thisFile = thisFile = extractUrlsFromStack(getDeepStackTrace())[0];
|
|
27
27
|
} catch (err) {
|
|
28
|
-
exports.thisFile = thisFile = extractUrlsFromStack(err)
|
|
28
|
+
exports.thisFile = thisFile = extractUrlsFromStack(err)[0];
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/** @type {(entry: PerformanceEntry) => boolean} - A shared function to determine if a performance entry is a valid script or link resource for evaluation */
|
|
@@ -142,7 +142,7 @@ function findScriptTimings() {
|
|
|
142
142
|
try {
|
|
143
143
|
const urls = extractUrlsFromStack(stack);
|
|
144
144
|
/** if there is exactly one url, this means the MFE script is running in the same file as the agent. Otherwise, lets strip away the known agent file from any other file lines */
|
|
145
|
-
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => !thisFile.endsWith(line) && !line.endsWith(thisFile)) : urls)
|
|
145
|
+
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => !thisFile.endsWith(line) && !line.endsWith(thisFile)) : urls)[0];
|
|
146
146
|
if (!mfeScriptUrl) return timings;
|
|
147
147
|
if (navUrl.includes(mfeScriptUrl)) {
|
|
148
148
|
// this means the stack is indicating that the registration came from an inline script or eval, so we won't find a matching script resource - return early with just the URL
|
|
@@ -15,9 +15,9 @@ import { chrome, chromeEval, gecko } from './browser-stack-matchers';
|
|
|
15
15
|
/** export for testing purposes */
|
|
16
16
|
export let thisFile;
|
|
17
17
|
try {
|
|
18
|
-
thisFile = extractUrlsFromStack(getDeepStackTrace())
|
|
18
|
+
thisFile = extractUrlsFromStack(getDeepStackTrace())[0];
|
|
19
19
|
} catch (err) {
|
|
20
|
-
thisFile = extractUrlsFromStack(err)
|
|
20
|
+
thisFile = extractUrlsFromStack(err)[0];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** @type {(entry: PerformanceEntry) => boolean} - A shared function to determine if a performance entry is a valid script or link resource for evaluation */
|
|
@@ -134,7 +134,7 @@ export function findScriptTimings() {
|
|
|
134
134
|
try {
|
|
135
135
|
const urls = extractUrlsFromStack(stack);
|
|
136
136
|
/** if there is exactly one url, this means the MFE script is running in the same file as the agent. Otherwise, lets strip away the known agent file from any other file lines */
|
|
137
|
-
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => !thisFile.endsWith(line) && !line.endsWith(thisFile)) : urls)
|
|
137
|
+
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => !thisFile.endsWith(line) && !line.endsWith(thisFile)) : urls)[0];
|
|
138
138
|
if (!mfeScriptUrl) return timings;
|
|
139
139
|
if (navUrl.includes(mfeScriptUrl)) {
|
|
140
140
|
// this means the stack is indicating that the registration came from an inline script or eval, so we won't find a matching script resource - return early with just the URL
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/browser-agent",
|
|
3
|
-
"version": "1.312.
|
|
3
|
+
"version": "1.312.1-rc.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
|
|
6
6
|
"description": "New Relic Browser Agent",
|
|
@@ -284,4 +284,4 @@
|
|
|
284
284
|
"README.md",
|
|
285
285
|
"CHANGELOG.md"
|
|
286
286
|
]
|
|
287
|
-
}
|
|
287
|
+
}
|
|
@@ -15,9 +15,9 @@ import { chrome, chromeEval, gecko } from './browser-stack-matchers'
|
|
|
15
15
|
/** export for testing purposes */
|
|
16
16
|
export let thisFile
|
|
17
17
|
try {
|
|
18
|
-
thisFile = extractUrlsFromStack(getDeepStackTrace())
|
|
18
|
+
thisFile = extractUrlsFromStack(getDeepStackTrace())[0]
|
|
19
19
|
} catch (err) {
|
|
20
|
-
thisFile = extractUrlsFromStack(err)
|
|
20
|
+
thisFile = extractUrlsFromStack(err)[0]
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
/** @type {(entry: PerformanceEntry) => boolean} - A shared function to determine if a performance entry is a valid script or link resource for evaluation */
|
|
@@ -126,7 +126,7 @@ export function findScriptTimings () {
|
|
|
126
126
|
try {
|
|
127
127
|
const urls = extractUrlsFromStack(stack)
|
|
128
128
|
/** if there is exactly one url, this means the MFE script is running in the same file as the agent. Otherwise, lets strip away the known agent file from any other file lines */
|
|
129
|
-
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => (!thisFile.endsWith(line) && !line.endsWith(thisFile))) : urls)
|
|
129
|
+
const mfeScriptUrl = (urls.length > 1 ? urls.filter(line => (!thisFile.endsWith(line) && !line.endsWith(thisFile))) : urls)[0]
|
|
130
130
|
if (!mfeScriptUrl) return timings
|
|
131
131
|
|
|
132
132
|
if (navUrl.includes(mfeScriptUrl)) {
|