Skip to content

Commit 687b2c1

Browse files
Merge branch 'main' into test-server-to-bam
2 parents 5939e2f + 6fccaad commit 687b2c1

File tree

67 files changed

+897
-890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+897
-890
lines changed

.github/workflows/publish-dev.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@ jobs:
2525
with:
2626
coverage: true
2727

28-
# wdio-coverage:
29-
# if: github.ref == 'refs/heads/main'
30-
# name: WDIO coverage
31-
# uses: ./.github/workflows/wdio-single-browser.yml
32-
# with:
33-
# browser-target: chrome@latest
34-
# coverage: true
35-
# secrets: inherit
36-
3728
# Build and publish the latest code from the main branch
3829
publish-dev-to-s3:
3930
needs: [jest-tests]

.github/workflows/pull-request-checks.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,6 @@ jobs:
253253
Checking merge of (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}) into [${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_ref }}](https://github.com/newrelic/newrelic-browser-agent/compare/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}..${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }}) (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }})
254254
comment_tag: <!-- browser_agent pull request checks -->
255255

256-
# wdio-coverage:
257-
# name: WDIO coverage
258-
# if: github.event_name == 'workflow_dispatch'
259-
# needs: find-pull-request
260-
# uses: ./.github/workflows/wdio-single-browser.yml
261-
# with:
262-
# ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge'
263-
# browser-target: chrome@latest
264-
# coverage: true
265-
# secrets: inherit
266-
267256
wdio:
268257
name: WDIO
269258
if: github.event_name == 'workflow_dispatch'
@@ -277,7 +266,6 @@ jobs:
277266
complete-status-comment-pull-request:
278267
name: Comment pull request
279268
if: always() && github.event_name == 'workflow_dispatch' && needs.find-pull-request.result == 'success'
280-
# needs: [find-pull-request,wdio-coverage,wdio]
281269
needs: [find-pull-request,wdio]
282270
runs-on: ubuntu-latest
283271
defaults:

.github/workflows/wdio-single-browser.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ on:
1111
description: 'Additional flags to pass to the wdio cli'
1212
required: false
1313
type: string
14-
coverage:
15-
description: 'Enable code coverage'
16-
required: false
17-
type: boolean
18-
default: false
1914
concurrency:
2015
description: 'The number of test runner threads to spawn for a run'
2116
required: false
@@ -31,11 +26,6 @@ on:
3126
description: 'Additional flags to pass to the wdio cli'
3227
required: false
3328
type: string
34-
coverage:
35-
description: 'Enable code coverage'
36-
required: false
37-
type: boolean
38-
default: false
3929
ref:
4030
description: 'Github branch ref to checkout and run tests on'
4131
required: false
@@ -73,7 +63,6 @@ jobs:
7363
run: npm ci
7464
- name: Build agent
7565
run: |
76-
${{ inputs.coverage && 'COVERAGE=true' || '' }} \
7766
npm run build:all
7867
- name: Run WDIO Tests
7968
run: |
@@ -82,43 +71,13 @@ jobs:
8271
-b '${{ inputs.browser-target }}' \
8372
--concurrent ${{ inputs.concurrency }} \
8473
${{ runner.debug && '-v -L -D -d' || '' }} \
85-
${{ inputs.coverage && '--coverage' || '' }} \
8674
${{ inputs.additional-flags || '' }}
87-
- name: Find pull request
88-
id: pull-request-target
89-
if: ${{ !cancelled() && inputs.coverage }}
90-
uses: ./.github/actions/find-pull-request
91-
with:
92-
token: ${{ secrets.GITHUB_TOKEN }}
93-
- name: Upload pr code coverage
94-
if: ${{ !cancelled() && inputs.coverage && steps.pull-request-target.outputs.results }}
95-
uses: codecov/codecov-action@v4
96-
with:
97-
token: ${{ secrets.CODECOV_TOKEN }}
98-
override_commit: ${{ fromJSON(steps.pull-request-target.outputs.results).head_sha }}
99-
override_branch: refs/pull/${{ fromJSON(steps.pull-request-target.outputs.results).pr_number }}/merge
100-
override_pr: ${{ fromJSON(steps.pull-request-target.outputs.results).pr_number }}
101-
flags: integration-tests
102-
verbose: true
103-
- name: Upload branch code coverage
104-
if: ${{ !cancelled() && inputs.coverage && !steps.pull-request-target.outputs.results }}
105-
uses: codecov/codecov-action@v4
106-
with:
107-
token: ${{ secrets.CODECOV_TOKEN }}
108-
flags: integration-tests
109-
verbose: true
110-
- name: Archive code coverage results
111-
if: ${{ !cancelled() && inputs.coverage }}
112-
uses: actions/upload-artifact@v4
113-
with:
114-
name: integration-code-coverage-report
115-
path: coverage-e2e/
11675
- name: Generate wdio tunnel log archive name
11776
if: ${{ always() }}
11877
id: wdio-tunnel-log-archive-name
11978
run: |
12079
browser=${{ inputs.browser-target }}
121-
echo "results=${browser/\*/all}${{ inputs.coverage && '-coverage' || '' }}${{ contains(inputs.additional-flags, '--webview') && '-webview' || '' }}-wdio-tunnel-logs" >> "$GITHUB_OUTPUT"
80+
echo "results=${browser/\*/all}${{ contains(inputs.additional-flags, '--webview') && '-webview' || '' }}-wdio-tunnel-logs" >> "$GITHUB_OUTPUT"
12281
- name: Archive wdio tunnel logs
12382
if: ${{ always() }}
12483
uses: actions/upload-artifact@v4

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.297.1](https://github.com/newrelic/newrelic-browser-agent/compare/v1.297.0...v1.297.1) (2025-09-17)
7+
8+
9+
### Bug Fixes
10+
11+
* Prevent double import of Session Replay aggregate class ([#1558](https://github.com/newrelic/newrelic-browser-agent/issues/1558)) ([ffc647c](https://github.com/newrelic/newrelic-browser-agent/commit/ffc647c2c757034b14d56bac9b0103b2016c5fbb))
12+
613
## [1.297.0](https://github.com/newrelic/newrelic-browser-agent/compare/v1.296.0...v1.297.0) (2025-09-10)
714

815

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ browserAgent.recordCustomEvent(...)
245245

246246
## Deploying one or more "micro" agents per page
247247

248+
> **ℹ️ Note:**
249+
> This loader strategy is slated to be deprecated and eventually removed in a future product release. For better memory usage, build size impacts, entity management and relationships -- a new strategy focused around using a single centralized browser agent instance is actively being worked on. Reach out by email to [email protected] for more information or if you would like to participate in a limited preview when the feature is ready for early adoption.
250+
248251
The examples above use the `Agent` class at their core, which is ideal for most cases as it will automatically detect page-level events across your web application.
249252

250253
Using the `MicroAgent` class, it is possible to skip the "auto" instrumentation phases of the other loader types, and provide a *very small* agent designed for capturing data in a controlled manner via the API interfaces. The `MicroAgent` captures a distinct `PageView` event when instantiated, and additional `PageAction` and `JavaScriptError` events may be captured by calling the `noticeError` and `addPageAction` methods.

THIRD_PARTY_NOTICES.md

Lines changed: 0 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ code, the source code can be found at [https://github.com/newrelic/newrelic-brow
5959
* [glob](#glob)
6060
* [html-webpack-plugin](#html-webpack-plugin)
6161
* [husky](#husky)
62-
* [istanbul-lib-coverage](#istanbul-lib-coverage)
63-
* [istanbul-lib-instrument](#istanbul-lib-instrument)
64-
* [istanbul-lib-report](#istanbul-lib-report)
65-
* [istanbul-reports](#istanbul-reports)
6662
* [jest-environment-jsdom](#jest-environment-jsdom)
6763
* [jest-extended](#jest-extended)
6864
* [jest](#jest)
@@ -1996,134 +1992,6 @@ SOFTWARE.
19961992
19971993
```
19981994

1999-
### istanbul-lib-coverage
2000-
2001-
This product includes source derived from [istanbul-lib-coverage](https://github.com/istanbuljs/istanbuljs) ([v3.2.2](https://github.com/istanbuljs/istanbuljs/tree/v3.2.2)), distributed under the [BSD-3-Clause License](https://github.com/istanbuljs/istanbuljs/blob/v3.2.2/LICENSE):
2002-
2003-
```
2004-
Copyright 2012-2015 Yahoo! Inc.
2005-
All rights reserved.
2006-
2007-
Redistribution and use in source and binary forms, with or without
2008-
modification, are permitted provided that the following conditions are met:
2009-
* Redistributions of source code must retain the above copyright
2010-
notice, this list of conditions and the following disclaimer.
2011-
* Redistributions in binary form must reproduce the above copyright
2012-
notice, this list of conditions and the following disclaimer in the
2013-
documentation and/or other materials provided with the distribution.
2014-
* Neither the name of the Yahoo! Inc. nor the
2015-
names of its contributors may be used to endorse or promote products
2016-
derived from this software without specific prior written permission.
2017-
2018-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2019-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2020-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2021-
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
2022-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2023-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2024-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2025-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2026-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2027-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2028-
2029-
```
2030-
2031-
### istanbul-lib-instrument
2032-
2033-
This product includes source derived from [istanbul-lib-instrument](https://github.com/istanbuljs/istanbuljs) ([v6.0.3](https://github.com/istanbuljs/istanbuljs/tree/v6.0.3)), distributed under the [BSD-3-Clause License](https://github.com/istanbuljs/istanbuljs/blob/v6.0.3/LICENSE):
2034-
2035-
```
2036-
Copyright 2012-2015 Yahoo! Inc.
2037-
All rights reserved.
2038-
2039-
Redistribution and use in source and binary forms, with or without
2040-
modification, are permitted provided that the following conditions are met:
2041-
* Redistributions of source code must retain the above copyright
2042-
notice, this list of conditions and the following disclaimer.
2043-
* Redistributions in binary form must reproduce the above copyright
2044-
notice, this list of conditions and the following disclaimer in the
2045-
documentation and/or other materials provided with the distribution.
2046-
* Neither the name of the Yahoo! Inc. nor the
2047-
names of its contributors may be used to endorse or promote products
2048-
derived from this software without specific prior written permission.
2049-
2050-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2051-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2052-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2053-
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
2054-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2055-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2056-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2057-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2058-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2059-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2060-
2061-
```
2062-
2063-
### istanbul-lib-report
2064-
2065-
This product includes source derived from [istanbul-lib-report](https://github.com/istanbuljs/istanbuljs) ([v3.0.1](https://github.com/istanbuljs/istanbuljs/tree/v3.0.1)), distributed under the [BSD-3-Clause License](https://github.com/istanbuljs/istanbuljs/blob/v3.0.1/LICENSE):
2066-
2067-
```
2068-
Copyright 2012-2015 Yahoo! Inc.
2069-
All rights reserved.
2070-
2071-
Redistribution and use in source and binary forms, with or without
2072-
modification, are permitted provided that the following conditions are met:
2073-
* Redistributions of source code must retain the above copyright
2074-
notice, this list of conditions and the following disclaimer.
2075-
* Redistributions in binary form must reproduce the above copyright
2076-
notice, this list of conditions and the following disclaimer in the
2077-
documentation and/or other materials provided with the distribution.
2078-
* Neither the name of the Yahoo! Inc. nor the
2079-
names of its contributors may be used to endorse or promote products
2080-
derived from this software without specific prior written permission.
2081-
2082-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2083-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2084-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2085-
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
2086-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2087-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2088-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2089-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2090-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2091-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2092-
2093-
```
2094-
2095-
### istanbul-reports
2096-
2097-
This product includes source derived from [istanbul-reports](https://github.com/istanbuljs/istanbuljs) ([v3.1.7](https://github.com/istanbuljs/istanbuljs/tree/v3.1.7)), distributed under the [BSD-3-Clause License](https://github.com/istanbuljs/istanbuljs/blob/v3.1.7/LICENSE):
2098-
2099-
```
2100-
Copyright 2012-2015 Yahoo! Inc.
2101-
All rights reserved.
2102-
2103-
Redistribution and use in source and binary forms, with or without
2104-
modification, are permitted provided that the following conditions are met:
2105-
* Redistributions of source code must retain the above copyright
2106-
notice, this list of conditions and the following disclaimer.
2107-
* Redistributions in binary form must reproduce the above copyright
2108-
notice, this list of conditions and the following disclaimer in the
2109-
documentation and/or other materials provided with the distribution.
2110-
* Neither the name of the Yahoo! Inc. nor the
2111-
names of its contributors may be used to endorse or promote products
2112-
derived from this software without specific prior written permission.
2113-
2114-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2115-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2116-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2117-
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
2118-
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2119-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2120-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2121-
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2122-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2123-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2124-
2125-
```
2126-
21271995
### jest-environment-jsdom
21281996

21291997
This product includes source derived from [jest-environment-jsdom](https://github.com/jestjs/jest) ([v29.7.0](https://github.com/jestjs/jest/tree/v29.7.0)), distributed under the [MIT License](https://github.com/jestjs/jest/blob/v29.7.0/LICENSE):

changelog.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
{
22
"repository": "newrelic/newrelic-browser-agent",
33
"entries": [
4+
{
5+
"changes": [
6+
{
7+
"type": "fix",
8+
"sha": "ffc647c2c757034b14d56bac9b0103b2016c5fbb",
9+
"message": "Prevent double import of Session Replay aggregate class",
10+
"issues": [
11+
"1558"
12+
]
13+
}
14+
],
15+
"version": "1.297.1",
16+
"language": "JAVASCRIPT",
17+
"artifactName": "@newrelic/browser-agent",
18+
"id": "1fb522d1-9248-4e6a-9dc3-b6f46061eb72",
19+
"createTime": "2025-09-17T19:41:05.967Z"
20+
},
421
{
522
"changes": [
623
{
@@ -3165,5 +3182,5 @@
31653182
"createTime": "2023-05-08T21:11:35.144Z"
31663183
}
31673184
],
3168-
"updateTime": "2025-09-10T21:46:13.910Z"
3185+
"updateTime": "2025-09-17T19:41:05.967Z"
31693186
}

package-lock.json

Lines changed: 5 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@newrelic/browser-agent",
3-
"version": "1.297.0",
3+
"version": "1.297.1",
44
"private": false,
55
"author": "New Relic Browser Agent Team <[email protected]>",
66
"description": "New Relic Browser Agent",
@@ -264,10 +264,6 @@
264264
"glob": "^11.0.0",
265265
"html-webpack-plugin": "^5.6.0",
266266
"husky": "^8.0.3",
267-
"istanbul-lib-coverage": "^3.2.2",
268-
"istanbul-lib-instrument": "^6.0.1",
269-
"istanbul-lib-report": "^3.0.1",
270-
"istanbul-reports": "^3.1.6",
271267
"jest": "^29.7.0",
272268
"jest-environment-jsdom": "29.7.0",
273269
"jest-extended": "^4.0.2",

src/common/constants/agent-constants.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
export const IDEAL_PAYLOAD_SIZE = 16000
66
export const MAX_PAYLOAD_SIZE = 1000000
77
export const DEFAULT_KEY = 'NR_CONTAINER_AGENT'
8+
export const SESSION_ERROR = 'SESSION_ERROR'

0 commit comments

Comments
 (0)