Skip to content

Commit

Permalink
chore(release): 2.3.0 [skip ci]
Browse files Browse the repository at this point in the history
# [2.3.0](v2.2.0...v2.3.0) (2024-07-01)

### Bug Fixes

* adjust coverage ([d2ee48c](d2ee48c))

### Features

* improve sampleRUM error handling ([5c32dbb](5c32dbb))
  • Loading branch information
semantic-release-bot committed Jul 1, 2024
1 parent d2ee48c commit 3daa5eb
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [2.3.0](https://github.com/adobe/aem-lib/compare/v2.2.0...v2.3.0) (2024-07-01)


### Bug Fixes

* adjust coverage ([d2ee48c](https://github.com/adobe/aem-lib/commit/d2ee48c51cb962e77004bb98c7d5431989f426ee))


### Features

* improve sampleRUM error handling ([5c32dbb](https://github.com/adobe/aem-lib/commit/5c32dbba5fc62b82f2efd4aa2c2f0bab2f9110af))

# [2.2.0](https://github.com/adobe/aem-lib/compare/v2.1.2...v2.2.0) (2024-07-01)


Expand Down
20 changes: 13 additions & 7 deletions dist/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,19 @@ function init() {

['error', 'unhandledrejection'].forEach((event) => {
window.addEventListener(event, ({ reason, error }) => {
const source = (reason || error).stack
.split('\n')
.filter((line) => line.match(/https?:\/\//))
.shift()
.replace(/at ([^ ]+) \((.+)\)/, '$1@$2');
const target = (reason || error).toString();
sampleRUM('error', { source, target });
const errData = { source: 'undefined error' };
try {
errData.target = (reason || error).toString();
errData.source = (reason || error).stack
.split('\n')
.filter((line) => line.match(/https?:\/\//))
.shift()
.replace(/at ([^ ]+) \((.+)\)/, '$1@$2')
.trim();
} catch (err) {
/* error structure was not as expected */
}
sampleRUM('error', errData);
});
});
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/aem-lib",
"version": "2.2.0",
"version": "2.3.0",
"description": "AEM Library",
"type": "module",
"scripts": {
Expand Down

0 comments on commit 3daa5eb

Please sign in to comment.