@newrelic/browser-agent 1.270.2 → 1.270.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/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.270.3](https://github.com/newrelic/newrelic-browser-agent/compare/v1.270.2...v1.270.3) (2024-10-31)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Ensure all lazy loaded modules issue warning instead of errors ([#1234](https://github.com/newrelic/newrelic-browser-agent/issues/1234)) ([cdfdab7](https://github.com/newrelic/newrelic-browser-agent/commit/cdfdab701bda6266416ad27750e63e8e9e0e075b))
12
+
6
13
  ## [1.270.2](https://github.com/newrelic/newrelic-browser-agent/compare/v1.270.1...v1.270.2) (2024-10-28)
7
14
 
8
15
 
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.270.2";
15
+ const VERSION = exports.VERSION = "1.270.3";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -12,7 +12,7 @@ exports.VERSION = exports.RRWEB_VERSION = exports.DIST_METHOD = exports.BUILD_EN
12
12
  /**
13
13
  * Exposes the version of the agent
14
14
  */
15
- const VERSION = exports.VERSION = "1.270.2";
15
+ const VERSION = exports.VERSION = "1.270.3";
16
16
 
17
17
  /**
18
18
  * Exposes the build type of the agent
@@ -95,20 +95,20 @@ class InstrumentBase extends _featureBase.FeatureBase {
95
95
  if (this.featureName === _features.FEATURE_NAMES.sessionReplay) this.abortHandler?.(); // SR should stop recording if session DNE
96
96
  }
97
97
 
98
- // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
99
- if (!agentRef.sharedAggregator) {
100
- agentRef.sharedAggregator = Promise.resolve().then(() => _interopRequireWildcard(require(/* webpackChunkName: "shared-aggregator" */'../../common/aggregate/aggregator')));
101
- const {
102
- Aggregator
103
- } = await agentRef.sharedAggregator;
104
- agentRef.sharedAggregator = new Aggregator();
105
- } else await agentRef.sharedAggregator; // if another feature is already importing the aggregator, wait for it to finish
106
-
107
98
  /**
108
99
  * Note this try-catch differs from the one in Agent.run() in that it's placed later in a page's lifecycle and
109
100
  * it's only responsible for aborting its one specific feature, rather than all.
110
101
  */
111
102
  try {
103
+ // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
104
+ if (!agentRef.sharedAggregator) {
105
+ agentRef.sharedAggregator = Promise.resolve().then(() => _interopRequireWildcard(require(/* webpackChunkName: "shared-aggregator" */'../../common/aggregate/aggregator')));
106
+ const {
107
+ Aggregator
108
+ } = await agentRef.sharedAggregator;
109
+ agentRef.sharedAggregator = new Aggregator();
110
+ } else await agentRef.sharedAggregator; // if another feature is already importing the aggregator, wait for it to finish
111
+
112
112
  if (!this.#shouldImportAgg(this.featureName, session)) {
113
113
  (0, _drain.drain)(this.agentIdentifier, this.featureName);
114
114
  loadedSuccessfully(false); // aggregate module isn't loaded at all
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Exposes the version of the agent
8
8
  */
9
- export const VERSION = "1.270.2";
9
+ export const VERSION = "1.270.3";
10
10
 
11
11
  /**
12
12
  * Exposes the build type of the agent
@@ -6,7 +6,7 @@
6
6
  /**
7
7
  * Exposes the version of the agent
8
8
  */
9
- export const VERSION = "1.270.2";
9
+ export const VERSION = "1.270.3";
10
10
 
11
11
  /**
12
12
  * Exposes the build type of the agent
@@ -90,20 +90,20 @@ export class InstrumentBase extends FeatureBase {
90
90
  if (this.featureName === FEATURE_NAMES.sessionReplay) this.abortHandler?.(); // SR should stop recording if session DNE
91
91
  }
92
92
 
93
- // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
94
- if (!agentRef.sharedAggregator) {
95
- agentRef.sharedAggregator = import(/* webpackChunkName: "shared-aggregator" */'../../common/aggregate/aggregator');
96
- const {
97
- Aggregator
98
- } = await agentRef.sharedAggregator;
99
- agentRef.sharedAggregator = new Aggregator();
100
- } else await agentRef.sharedAggregator; // if another feature is already importing the aggregator, wait for it to finish
101
-
102
93
  /**
103
94
  * Note this try-catch differs from the one in Agent.run() in that it's placed later in a page's lifecycle and
104
95
  * it's only responsible for aborting its one specific feature, rather than all.
105
96
  */
106
97
  try {
98
+ // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
99
+ if (!agentRef.sharedAggregator) {
100
+ agentRef.sharedAggregator = import(/* webpackChunkName: "shared-aggregator" */'../../common/aggregate/aggregator');
101
+ const {
102
+ Aggregator
103
+ } = await agentRef.sharedAggregator;
104
+ agentRef.sharedAggregator = new Aggregator();
105
+ } else await agentRef.sharedAggregator; // if another feature is already importing the aggregator, wait for it to finish
106
+
107
107
  if (!this.#shouldImportAgg(this.featureName, session)) {
108
108
  drain(this.agentIdentifier, this.featureName);
109
109
  loadedSuccessfully(false); // aggregate module isn't loaded at all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/browser-agent",
3
- "version": "1.270.2",
3
+ "version": "1.270.3",
4
4
  "private": false,
5
5
  "author": "New Relic Browser Agent Team <browser-agent@newrelic.com>",
6
6
  "description": "New Relic Browser Agent",
@@ -90,18 +90,18 @@ export class InstrumentBase extends FeatureBase {
90
90
  if (this.featureName === FEATURE_NAMES.sessionReplay) this.abortHandler?.() // SR should stop recording if session DNE
91
91
  }
92
92
 
93
- // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
94
- if (!agentRef.sharedAggregator) {
95
- agentRef.sharedAggregator = import(/* webpackChunkName: "shared-aggregator" */ '../../common/aggregate/aggregator')
96
- const { Aggregator } = await agentRef.sharedAggregator
97
- agentRef.sharedAggregator = new Aggregator()
98
- } else await agentRef.sharedAggregator // if another feature is already importing the aggregator, wait for it to finish
99
-
100
93
  /**
101
94
  * Note this try-catch differs from the one in Agent.run() in that it's placed later in a page's lifecycle and
102
95
  * it's only responsible for aborting its one specific feature, rather than all.
103
96
  */
104
97
  try {
98
+ // Create a single Aggregator for this agent if DNE yet; to be used by jserror endpoint features.
99
+ if (!agentRef.sharedAggregator) {
100
+ agentRef.sharedAggregator = import(/* webpackChunkName: "shared-aggregator" */ '../../common/aggregate/aggregator')
101
+ const { Aggregator } = await agentRef.sharedAggregator
102
+ agentRef.sharedAggregator = new Aggregator()
103
+ } else await agentRef.sharedAggregator // if another feature is already importing the aggregator, wait for it to finish
104
+
105
105
  if (!this.#shouldImportAgg(this.featureName, session)) {
106
106
  drain(this.agentIdentifier, this.featureName)
107
107
  loadedSuccessfully(false) // aggregate module isn't loaded at all