@newrelic/browser-agent 1.313.0 → 1.313.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/loaders/api/register.js +8 -1
- package/dist/esm/common/constants/env.cdn.js +1 -1
- package/dist/esm/common/constants/env.npm.js +1 -1
- package/dist/esm/loaders/api/register.js +8 -1
- package/dist/types/loaders/api/register.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/loaders/api/register.js +14 -1
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.313.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.313.0...v1.313.1) (2026-04-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Fix method names for MFE methods ([#1758](https://github.com/newrelic/newrelic-browser-agent/issues/1758)) ([8442a5b](https://github.com/newrelic/newrelic-browser-agent/commit/8442a5b0db01a929315dd7c7e3bd4817e6525200))
|
|
12
|
+
|
|
6
13
|
## [1.313.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.312.1...v1.313.0) (2026-04-14)
|
|
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.313.
|
|
20
|
+
const VERSION = exports.VERSION = "1.313.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.313.
|
|
20
|
+
const VERSION = exports.VERSION = "1.313.1-rc.1";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Exposes the build type of the agent
|
|
@@ -33,6 +33,12 @@ var _uniqueId = require("../../common/ids/unique-id");
|
|
|
33
33
|
|
|
34
34
|
const PROTECTED_KEYS = ['name', 'id', 'type'];
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Map of API methods to their names (prevents minification from breaking method name references)
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
const METHOD_NAMES = new Map([[_addPageAction.addPageAction, 'addPageAction'], [_log.log, 'log'], [_measure.measure, 'measure'], [_noticeError.noticeError, 'noticeError'], [_recordCustomEvent.recordCustomEvent, 'recordCustomEvent']]);
|
|
41
|
+
|
|
36
42
|
/**
|
|
37
43
|
* Warning functions that only fire once - can be reset in tests
|
|
38
44
|
* @private
|
|
@@ -239,7 +245,8 @@ function register(agentRef, target) {
|
|
|
239
245
|
if (isBlocked() && methodToCall !== register) return;
|
|
240
246
|
/** set the timestamp before the async part of waiting for the rum response for better accuracy */
|
|
241
247
|
const timestamp = (0, _now.now)();
|
|
242
|
-
|
|
248
|
+
const methodName = METHOD_NAMES.get(methodToCall) || 'unknown';
|
|
249
|
+
(0, _handle.handle)(_constants.SUPPORTABILITY_METRIC_CHANNEL, ["API/register/".concat(methodName, "/called")], undefined, _features.FEATURE_NAMES.metrics, agentRef.ee);
|
|
243
250
|
try {
|
|
244
251
|
return methodToCall(...args, target, timestamp); // always report to target
|
|
245
252
|
} catch (err) {
|
|
@@ -26,6 +26,12 @@ import { generateRandomHexString } from '../../common/ids/unique-id';
|
|
|
26
26
|
|
|
27
27
|
const PROTECTED_KEYS = ['name', 'id', 'type'];
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Map of API methods to their names (prevents minification from breaking method name references)
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
const METHOD_NAMES = new Map([[addPageAction, 'addPageAction'], [log, 'log'], [measure, 'measure'], [noticeError, 'noticeError'], [recordCustomEvent, 'recordCustomEvent']]);
|
|
34
|
+
|
|
29
35
|
/**
|
|
30
36
|
* Warning functions that only fire once - can be reset in tests
|
|
31
37
|
* @private
|
|
@@ -232,7 +238,8 @@ function register(agentRef, target) {
|
|
|
232
238
|
if (isBlocked() && methodToCall !== register) return;
|
|
233
239
|
/** set the timestamp before the async part of waiting for the rum response for better accuracy */
|
|
234
240
|
const timestamp = now();
|
|
235
|
-
|
|
241
|
+
const methodName = METHOD_NAMES.get(methodToCall) || 'unknown';
|
|
242
|
+
handle(SUPPORTABILITY_METRIC_CHANNEL, ["API/register/".concat(methodName, "/called")], undefined, FEATURE_NAMES.metrics, agentRef.ee);
|
|
236
243
|
try {
|
|
237
244
|
return methodToCall(...args, target, timestamp); // always report to target
|
|
238
245
|
} catch (err) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/loaders/api/register.js"],"names":[],"mappings":"AAmDA;;;;GAIG;AACH,mDAIC;;;;;;;0BArCY,OAAO,sBAAsB,EAAE,WAAW"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newrelic/browser-agent",
|
|
3
|
-
"version": "1.313.
|
|
3
|
+
"version": "1.313.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
|
+
}
|
|
@@ -26,6 +26,18 @@ import { generateRandomHexString } from '../../common/ids/unique-id'
|
|
|
26
26
|
|
|
27
27
|
const PROTECTED_KEYS = ['name', 'id', 'type']
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Map of API methods to their names (prevents minification from breaking method name references)
|
|
31
|
+
* @private
|
|
32
|
+
*/
|
|
33
|
+
const METHOD_NAMES = new Map([
|
|
34
|
+
[addPageAction, 'addPageAction'],
|
|
35
|
+
[log, 'log'],
|
|
36
|
+
[measure, 'measure'],
|
|
37
|
+
[noticeError, 'noticeError'],
|
|
38
|
+
[recordCustomEvent, 'recordCustomEvent']
|
|
39
|
+
])
|
|
40
|
+
|
|
29
41
|
/**
|
|
30
42
|
* Warning functions that only fire once - can be reset in tests
|
|
31
43
|
* @private
|
|
@@ -203,7 +215,8 @@ function register (agentRef, target) {
|
|
|
203
215
|
if (isBlocked() && methodToCall !== register) return
|
|
204
216
|
/** set the timestamp before the async part of waiting for the rum response for better accuracy */
|
|
205
217
|
const timestamp = now()
|
|
206
|
-
|
|
218
|
+
const methodName = METHOD_NAMES.get(methodToCall) || 'unknown'
|
|
219
|
+
handle(SUPPORTABILITY_METRIC_CHANNEL, [`API/register/${methodName}/called`], undefined, FEATURE_NAMES.metrics, agentRef.ee)
|
|
207
220
|
try {
|
|
208
221
|
return methodToCall(...args, target, timestamp) // always report to target
|
|
209
222
|
} catch (err) {
|