Skip to content

Commit

Permalink
chore(release): pull hotfix-release/3.25.0 into main (#1801)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikumarrs authored Jul 23, 2024
2 parents 3e43a00 + 6e6c4b9 commit 5747055
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 62 deletions.
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": "@rudderstack/analytics-js-monorepo",
"version": "3.24.0",
"version": "3.25.0",
"private": true,
"description": "Monorepo for RudderStack Analytics JS SDK",
"workspaces": [
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics-js-plugins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.4.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.4.3`
## [3.4.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics-js-plugins/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [3.4.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].2...@rudderstack/[email protected].3) (2024-07-23)
## [3.4.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].3...@rudderstack/[email protected].4) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.4.2`
* `@rudderstack/analytics-js` updated to version `3.4.3`
2 changes: 1 addition & 1 deletion packages/analytics-js-plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-plugins",
"version": "3.4.3",
"version": "3.4.4",
"private": true,
"description": "RudderStack JavaScript SDK plugins",
"main": "dist/npm/modern/cjs/index.cjs",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-plugins/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"tag": "@rudderstack/[email protected].4",
"title": "@rudderstack/[email protected].4",
"discussion-category": "@rudderstack/[email protected].4",
"notesFile": "./packages/analytics-js-plugins/CHANGELOG_LATEST.md"
}
}
Expand Down
10 changes: 10 additions & 0 deletions packages/analytics-js/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.7.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js-plugins` updated to version `3.7.3`

### Bug Fixes

* filter non errors ([#1800](https://github.com/rudderlabs/rudder-sdk-js/issues/1800)) ([73de1cc](https://github.com/rudderlabs/rudder-sdk-js/commit/73de1ccc264e9afcbae3e6d7f66e120aca81e49a))

## [3.7.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## [3.7.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].2...@rudderstack/[email protected].3) (2024-07-23)
## [3.7.4](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].3...@rudderstack/[email protected].4) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js-plugins` updated to version `3.7.2`
* `@rudderstack/analytics-js-plugins` updated to version `3.7.3`

### Bug Fixes

* filter unhandled errors by message ([#1797](https://github.com/rudderlabs/rudder-sdk-js/issues/1797)) ([2f45d00](https://github.com/rudderlabs/rudder-sdk-js/commit/2f45d001e7d9dbb70b12b017fc73bc740135e870))
* filter non errors ([#1800](https://github.com/rudderlabs/rudder-sdk-js/issues/1800)) ([73de1cc](https://github.com/rudderlabs/rudder-sdk-js/commit/73de1ccc264e9afcbae3e6d7f66e120aca81e49a))

Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ describe('ErrorHandler', () => {
it('should attach error listeners', () => {
const unhandledRejectionListener = jest.spyOn(window, 'addEventListener');
errorHandlerInstance.attachErrorListeners();
expect(unhandledRejectionListener).toHaveBeenCalledTimes(1);
expect(unhandledRejectionListener).toHaveBeenCalledTimes(2);
expect(unhandledRejectionListener).toHaveBeenCalledWith('error', expect.any(Function));
// expect(unhandledRejectionListener).toHaveBeenCalledWith(
// 'unhandledrejection',
// expect.any(Function),
// );
expect(unhandledRejectionListener).toHaveBeenCalledWith(
'unhandledrejection',
expect.any(Function),
);
});

it('should notify buffered errors once Error reporting plugin is loaded', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('ErrorHandler - getNormalizedErrorForUnhandledError', () => {
expect(normalizedError).toBeUndefined();
});

it('should return error instance for Event argument value with SDK script target', () => {
it.skip('should return error instance for Event argument value with SDK script target', () => {
const event = new Event('dummyError');
const targetElement = document.createElement('script');
targetElement.dataset.loader = 'RS_JS_SDK';
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js",
"version": "3.7.3",
"version": "3.7.4",
"description": "RudderStack JavaScript SDK",
"main": "dist/npm/modern/cjs/index.cjs",
"module": "dist/npm/modern/esm/index.mjs",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"tag": "@rudderstack/[email protected].4",
"title": "@rudderstack/[email protected].4",
"discussion-category": "@rudderstack/[email protected].4",
"notesFile": "./packages/analytics-js/CHANGELOG_LATEST.md"
}
}
Expand Down
19 changes: 7 additions & 12 deletions packages/analytics-js/src/services/ErrorHandler/ErrorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,12 @@ class ErrorHandler implements IErrorHandler {
this.onError(event, undefined, undefined, undefined, ErrorType.UNHANDLEDEXCEPTION);
});

// TODO: uncomment this when we have a way to handle unhandledrejection for non-Error objects
// (globalThis as typeof window).addEventListener(
// 'unhandledrejection',
// (event: PromiseRejectionEvent) => {
// if (!(event.reason instanceof Error)) {
// // Prevent the default handling by the browser
// event.preventDefault();
// }
// this.onError(event, undefined, undefined, undefined, ErrorType.UNHANDLEDREJECTION);
// },
// );
(globalThis as typeof window).addEventListener(
'unhandledrejection',
(event: PromiseRejectionEvent) => {
this.onError(event, undefined, undefined, undefined, ErrorType.UNHANDLEDREJECTION);

Check warning on line 70 in packages/analytics-js/src/services/ErrorHandler/ErrorHandler.ts

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js/src/services/ErrorHandler/ErrorHandler.ts#L70

Added line #L70 was not covered by tests
},
);
} else {
this.logger?.debug(`Failed to attach global error listeners.`);
}
Expand Down Expand Up @@ -159,7 +154,7 @@ class ErrorHandler implements IErrorHandler {
error: normalizedError,
errorState,
});
} else {
} else if (normalizedError) {
this.notifyError(normalizedError, errorState);
}
}
Expand Down
40 changes: 20 additions & 20 deletions packages/analytics-js/src/services/ErrorHandler/processError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,26 @@ const getNormalizedErrorForUnhandledError = (error: SDKError): SDKError | undefi
return error;
}
// TODO: remove this block once all device mode integrations start using the v3 script loader module (TS)
if (error instanceof Event) {
const eventTarget = error.target as ErrorTarget;
// Discard all the non-script loading errors
if (eventTarget && eventTarget.localName !== 'script') {
return undefined;
}
// Discard script errors that are not originated at SDK or from native SDKs
if (
eventTarget?.dataset &&
(eventTarget.dataset.loader !== LOAD_ORIGIN ||
eventTarget.dataset.isnonnativesdk !== 'true')
) {
return undefined;
}
const errorMessage = `Error in loading a third-party script from URL ${eventTarget?.src} with ID ${eventTarget?.id}.`;
return Object.create(error, {
message: { value: errorMessage },
});
}
return error;
// if (error instanceof Event) {
// const eventTarget = error.target as ErrorTarget;
// // Discard all the non-script loading errors
// if (eventTarget && eventTarget.localName !== 'script') {
// return undefined;
// }
// // Discard script errors that are not originated at SDK or from native SDKs
// if (
// eventTarget?.dataset &&
// (eventTarget.dataset.loader !== LOAD_ORIGIN ||
// eventTarget.dataset.isnonnativesdk !== 'true')
// ) {
// return undefined;
// }
// const errorMessage = `Error in loading a third-party script from URL ${eventTarget?.src} with ID ${eventTarget?.id}.`;
// return Object.create(error, {
// message: { value: errorMessage },
// });
// }
return undefined;
} catch (e) {
return e;
}
Expand Down
5 changes: 5 additions & 0 deletions packages/loading-scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.0.21](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.0.20`
## [3.0.20](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/loading-scripts/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [3.0.20](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].19...@rudderstack/[email protected].20) (2024-07-23)
## [3.0.21](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].20...@rudderstack/[email protected].21) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.0.19`
* `@rudderstack/analytics-js` updated to version `3.0.20`
2 changes: 1 addition & 1 deletion packages/loading-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-loading-scripts",
"version": "3.0.20",
"version": "3.0.21",
"private": true,
"description": "Loading script for RudderStack JavaScript SDK",
"main": "./src/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/loading-scripts/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/[email protected].20",
"title": "@rudderstack/[email protected].20",
"discussion-category": "@rudderstack/[email protected].20",
"tag": "@rudderstack/[email protected].21",
"title": "@rudderstack/[email protected].21",
"discussion-category": "@rudderstack/[email protected].21",
"notesFile": "./packages/loading-scripts/CHANGELOG_LATEST.md"
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/sanity-suite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

## [3.1.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.1.10`
## [3.1.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-07-23)

### Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity-suite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-sanity-suite",
"version": "3.1.10",
"version": "3.1.11",
"private": true,
"description": "Sanity suite for testing JS SDK package",
"main": "./dist/v3/cdn/testBook.js",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sonar.qualitygate.wait=false
sonar.projectKey=rudderlabs_rudder-sdk-js
sonar.organization=rudderlabs
sonar.projectName=rudder-sdk-js
sonar.projectVersion=3.24.0
sonar.projectVersion=3.25.0

# Meta-data for the project
sonar.links.scm=https://github.com/rudderlabs/rudder-sdk-js
Expand Down

0 comments on commit 5747055

Please sign in to comment.