Skip to content

Commit

Permalink
Merge branch 'main' into rum-js-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
kptdobe committed Jul 10, 2024
2 parents ca30120 + 3daa5eb commit 181db84
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 55 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next'
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -29,10 +29,6 @@ jobs:
with:
node-version: 20
- run: npm ci
- name: Sync next branch
run: sh sync.sh
env:
GITHUB_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
- run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .releaserc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ module.exports = {
"publishCmd": "./publish.sh ${nextRelease.version} ${nextRelease.type}"
}],
],
branches: ["main", "next"],
branches: ["main"],
};
3 changes: 1 addition & 2 deletions .renovaterc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"github>adobe/helix-shared"
],
"baseBranches": [
"main",
"2.x"
"main"
],
"packageRules": [
{
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# [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)


### Features

* remove the next logic ([f009296](https://github.com/adobe/aem-lib/commit/f00929696e58cc7da8445fc404a022d345f7d0fc))

## [2.1.2](https://github.com/adobe/aem-lib/compare/v2.1.1...v2.1.2) (2024-06-12)


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
44 changes: 33 additions & 11 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@adobe/aem-lib",
"version": "2.1.2",
"version": "2.3.0",
"description": "AEM Library",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -47,7 +47,7 @@
"semantic-release": "24.0.0",
"sinon": "18.0.0",
"stylelint": "16.6.1",
"stylelint-config-standard": "36.0.0"
"stylelint-config-standard": "36.0.1"
},
"dependencies": {
"@adobe/helix-rum-js": "1.9.0"
Expand Down
6 changes: 0 additions & 6 deletions publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ TYPE=$2 # can be major, minor, patch
VERSION_DASH=${VERSION//./-}
BRANCH=update-lib-aem-$TYPE-$VERSION_DASH

# if the version is 2.0.0 or greater, exit gracefully now
if [[ $VERSION == 2.* ]]; then
echo "Version $VERSION is 2.0.0 or greater, exiting gracefully"
exit 0
fi

cd ..
echo "Using gh version: $(gh --version)"
gh repo clone $ORG/$REPO
Expand Down
3 changes: 1 addition & 2 deletions src/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ export function setup() {
/**
* Auto initializiation.
*/
/* c8 ignore next 14 */
/* c8 ignore next 18 */
export function init() {
setup();
sampleRUM();
window.addEventListener('hlx:section:loaded', sampleRUM.enhance, { once: true });
}
19 changes: 0 additions & 19 deletions sync.sh

This file was deleted.

0 comments on commit 181db84

Please sign in to comment.