From 6b0f66f61745542f2b01c02c99b7514fd468db80 Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju <88789928+saikumarrs@users.noreply.github.com> Date: Sat, 30 Nov 2024 19:57:33 +0530 Subject: [PATCH 1/8] fix: preload events not processed with detached load call (#1953) * fix: preload events not processed with detached load call * chore: fix issues to load on legacy browsers * test: fix test suite --- .../__tests__/app/RudderAnalytics.test.ts | 28 ++++--------------- .../analytics-js/src/app/RudderAnalytics.ts | 23 ++++++--------- .../public/v3/manualLoadCall/index-cdn.html | 2 +- .../public/v3/manualLoadCall/index-local.html | 2 +- .../ignoredProperties/ignoredProperties.js | 2 ++ 5 files changed, 18 insertions(+), 39 deletions(-) diff --git a/packages/analytics-js/__tests__/app/RudderAnalytics.test.ts b/packages/analytics-js/__tests__/app/RudderAnalytics.test.ts index 690c96114..a60398986 100644 --- a/packages/analytics-js/__tests__/app/RudderAnalytics.test.ts +++ b/packages/analytics-js/__tests__/app/RudderAnalytics.test.ts @@ -55,27 +55,6 @@ describe('Core - Rudder Analytics Facade', () => { ]); }); - it('should return an empty array when globalThis.rudderanalytics is not an array', () => { - const rudderAnalyticsInstance = new RudderAnalytics(); - (globalThis as typeof window).rudderanalytics = undefined; - const result = rudderAnalyticsInstance.getPreloadedEvents(); - expect(result).toEqual([]); - }); - - it('should return buffered events array when globalThis.rudderanalytics is an array', () => { - const bufferedEvents = [ - ['track'], - ['consent', { sendPageEvent: true }], - ['load', 'dummyWriteKey', 'dummyDataPlaneUrl', { option1: true }], - ['consent', { sendPageEvent: false }], - ['track'], - ]; - (window as any).rudderanalytics = bufferedEvents; - const rudderAnalyticsInstance = new RudderAnalytics(); - const result = rudderAnalyticsInstance.getPreloadedEvents(); - expect(result).toEqual(bufferedEvents); - }); - it('should return the global singleton if it exists', () => { const globalSingleton = rudderAnalytics; rudderAnalytics = new RudderAnalytics(); @@ -850,7 +829,12 @@ describe('Core - Rudder Analytics Facade', () => { enabled: true, }, }); - expect(rudderAnalyticsInstance.trackPageLifecycleEvents).toHaveBeenCalledWith([], { + expect(rudderAnalyticsInstance.trackPageLifecycleEvents).toHaveBeenCalledWith([ + ['consent', { sendPageEvent: true }], + ['consent', { sendPageEvent: false }], + ['track'], + ['track'], + ], { autoTrack: { enabled: true, }, diff --git a/packages/analytics-js/src/app/RudderAnalytics.ts b/packages/analytics-js/src/app/RudderAnalytics.ts index 05733142b..6d94926a7 100644 --- a/packages/analytics-js/src/app/RudderAnalytics.ts +++ b/packages/analytics-js/src/app/RudderAnalytics.ts @@ -31,7 +31,7 @@ import { promotePreloadedConsentEventsToTop, } from '../components/preloadBuffer'; import type { PreloadedEventCall } from '../components/preloadBuffer/types'; -import { setExposedGlobal } from '../components/utilities/globals'; +import { getExposedGlobal, setExposedGlobal } from '../components/utilities/globals'; import type { IAnalytics } from '../components/core/IAnalytics'; import { Analytics } from '../components/core/Analytics'; import { defaultLogger } from '../services/Logger/Logger'; @@ -158,7 +158,9 @@ class RudderAnalytics implements IRudderAnalytics { } this.setDefaultInstanceKey(writeKey); - const preloadedEventsArray = this.getPreloadedEvents(); + // Get the preloaded events array from global buffer instead of window.rudderanalytics + // as the constructor must have already pushed the events to the global buffer + const preloadedEventsArray = getExposedGlobal(GLOBAL_PRELOAD_BUFFER) as PreloadedEventCall[]; // Track page loaded lifecycle event if enabled this.trackPageLifecycleEvents(preloadedEventsArray, loadOptions); @@ -179,17 +181,6 @@ class RudderAnalytics implements IRudderAnalytics { } } - /** - * A function to get preloaded events array from global object - * @returns preloaded events array - */ - // eslint-disable-next-line class-methods-use-this - getPreloadedEvents() { - return Array.isArray((globalThis as typeof window).rudderanalytics) - ? ((globalThis as typeof window).rudderanalytics as unknown as PreloadedEventCall[]) - : ([] as PreloadedEventCall[]); - } - /** * A function to track page lifecycle events like page loaded and page unloaded * @param preloadedEventsArray @@ -298,7 +289,9 @@ class RudderAnalytics implements IRudderAnalytics { * remaining preloaded events array in global object */ triggerBufferedLoadEvent() { - const preloadedEventsArray = this.getPreloadedEvents(); + const preloadedEventsArray = Array.isArray((globalThis as typeof window).rudderanalytics) + ? ((globalThis as typeof window).rudderanalytics as unknown as PreloadedEventCall[]) + : ([] as PreloadedEventCall[]); // Get any load method call that is buffered if any // BTW, load method is also removed from the array @@ -306,7 +299,7 @@ class RudderAnalytics implements IRudderAnalytics { const loadEvent: PreloadedEventCall = getPreloadedLoadEvent(preloadedEventsArray); // Set the final preloaded events array in global object - setExposedGlobal(GLOBAL_PRELOAD_BUFFER, clone(preloadedEventsArray)); + setExposedGlobal(GLOBAL_PRELOAD_BUFFER, clone([...preloadedEventsArray])); // Process load method if present in the buffered requests if (loadEvent.length > 0) { diff --git a/packages/sanity-suite/public/v3/manualLoadCall/index-cdn.html b/packages/sanity-suite/public/v3/manualLoadCall/index-cdn.html index eefb6197c..5ee868ab6 100644 --- a/packages/sanity-suite/public/v3/manualLoadCall/index-cdn.html +++ b/packages/sanity-suite/public/v3/manualLoadCall/index-cdn.html @@ -176,7 +176,7 @@ window.manualLoad( $('#writeKey').val(), $('#dataplaneURL').val(), - JSON.parse($('#loadOptions').val() ? $('#loadOptions').val() : {}), + JSON.parse($('#loadOptions').val() ? $('#loadOptions').val() : {}) ); }); }); diff --git a/packages/sanity-suite/public/v3/manualLoadCall/index-local.html b/packages/sanity-suite/public/v3/manualLoadCall/index-local.html index b4c862bba..8be3e6c88 100644 --- a/packages/sanity-suite/public/v3/manualLoadCall/index-local.html +++ b/packages/sanity-suite/public/v3/manualLoadCall/index-local.html @@ -179,7 +179,7 @@ window.manualLoad( $('#writeKey').val(), $('#dataplaneURL').val(), - JSON.parse($('#loadOptions').val() ? $('#loadOptions').val() : {}), + JSON.parse($('#loadOptions').val() ? $('#loadOptions').val() : {}) ); }); }); diff --git a/packages/sanity-suite/src/ignoredProperties/ignoredProperties.js b/packages/sanity-suite/src/ignoredProperties/ignoredProperties.js index 5b8767fc8..f2412de62 100644 --- a/packages/sanity-suite/src/ignoredProperties/ignoredProperties.js +++ b/packages/sanity-suite/src/ignoredProperties/ignoredProperties.js @@ -150,10 +150,12 @@ const ignoredProperties = [ { key: `message.integrations.Google Analytics 4 (GA4).sessionId`, type: 'number', + optional: true, }, { key: `message.integrations.Google Analytics 4 (GA4).clientId`, type: 'string', + optional: true, }, { key: `message.integrations.Google Analytics 4 (GA4).sessionNumber`, From 3526c4dceac48d642a00682c4f9f849619aa817f Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Sat, 30 Nov 2024 14:31:44 +0000 Subject: [PATCH 2/8] chore(@rudderstack/analytics-js-plugins): release version 3.6.17 --- packages/analytics-js-plugins/CHANGELOG.md | 6 ++++++ packages/analytics-js-plugins/package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/analytics-js-plugins/CHANGELOG.md b/packages/analytics-js-plugins/CHANGELOG.md index 64aa7b180..c9390e509 100644 --- a/packages/analytics-js-plugins/CHANGELOG.md +++ b/packages/analytics-js-plugins/CHANGELOG.md @@ -2,6 +2,12 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.6.17](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.16...@rudderstack/analytics-js-plugins@3.6.17) (2024-11-30) + +### Dependency Updates + +* `@rudderstack/analytics-js` updated to version `3.11.13` +* `@rudderstack/analytics-js-cookies` updated to version `0.4.15` ## [3.6.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.15...@rudderstack/analytics-js-plugins@3.6.16) (2024-11-22) ### Dependency Updates diff --git a/packages/analytics-js-plugins/package.json b/packages/analytics-js-plugins/package.json index 28ae26705..d1029dd74 100644 --- a/packages/analytics-js-plugins/package.json +++ b/packages/analytics-js-plugins/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-plugins", - "version": "3.6.16", + "version": "3.6.17", "private": true, "description": "RudderStack JavaScript SDK plugins", "main": "dist/npm/modern/cjs/index.cjs", From 9e32ce35c3afaa3dc59c907549582c1341b06058 Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Sat, 30 Nov 2024 14:31:45 +0000 Subject: [PATCH 3/8] chore(@rudderstack/analytics-js): release version 3.11.14 --- packages/analytics-js/CHANGELOG.md | 10 ++++++++++ packages/analytics-js/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/analytics-js/CHANGELOG.md b/packages/analytics-js/CHANGELOG.md index c30f24e00..454955f82 100644 --- a/packages/analytics-js/CHANGELOG.md +++ b/packages/analytics-js/CHANGELOG.md @@ -2,6 +2,16 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.11.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.13...@rudderstack/analytics-js@3.11.14) (2024-11-30) + +### Dependency Updates + +* `@rudderstack/analytics-js-plugins` updated to version `3.6.17` + +### Bug Fixes + +* preload events not processed with detached load call ([#1953](https://github.com/rudderlabs/rudder-sdk-js/issues/1953)) ([6b0f66f](https://github.com/rudderlabs/rudder-sdk-js/commit/6b0f66f61745542f2b01c02c99b7514fd468db80)) + ## [3.11.13](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.12...@rudderstack/analytics-js@3.11.13) (2024-11-22) ### Dependency Updates diff --git a/packages/analytics-js/package.json b/packages/analytics-js/package.json index ee19d56e0..105f9c6c6 100644 --- a/packages/analytics-js/package.json +++ b/packages/analytics-js/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js", - "version": "3.11.13", + "version": "3.11.14", "description": "RudderStack JavaScript SDK", "main": "dist/npm/modern/cjs/index.cjs", "module": "dist/npm/modern/esm/index.mjs", From 6804fb1cadd24498d495ef07c73235a69cadd8f2 Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Sat, 30 Nov 2024 14:31:46 +0000 Subject: [PATCH 4/8] chore(@rudderstack/analytics-js-sanity-suite): release version 3.1.48 --- packages/sanity-suite/CHANGELOG.md | 10 ++++++++++ packages/sanity-suite/package.json | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/sanity-suite/CHANGELOG.md b/packages/sanity-suite/CHANGELOG.md index 94b81b67e..2aa48a473 100644 --- a/packages/sanity-suite/CHANGELOG.md +++ b/packages/sanity-suite/CHANGELOG.md @@ -2,6 +2,16 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.1.48](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.47...@rudderstack/analytics-js-sanity-suite@3.1.48) (2024-11-30) + +### Dependency Updates + +* `@rudderstack/analytics-js` updated to version `3.11.14` + +### Bug Fixes + +* preload events not processed with detached load call ([#1953](https://github.com/rudderlabs/rudder-sdk-js/issues/1953)) ([6b0f66f](https://github.com/rudderlabs/rudder-sdk-js/commit/6b0f66f61745542f2b01c02c99b7514fd468db80)) + ## [3.1.47](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.46...@rudderstack/analytics-js-sanity-suite@3.1.47) (2024-11-22) ### Dependency Updates diff --git a/packages/sanity-suite/package.json b/packages/sanity-suite/package.json index 54da24018..0c9ee468c 100644 --- a/packages/sanity-suite/package.json +++ b/packages/sanity-suite/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-sanity-suite", - "version": "3.1.47", + "version": "3.1.48", "private": true, "description": "Sanity suite for testing JS SDK package", "main": "./dist/v3/cdn/testBook.js", From 6de394c24758a3e9e9d52f06c8e2bff6bdf5b1e3 Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Sat, 30 Nov 2024 14:31:47 +0000 Subject: [PATCH 5/8] chore(@rudderstack/analytics-js-loading-scripts): release version 3.0.57 --- packages/loading-scripts/CHANGELOG.md | 5 +++++ packages/loading-scripts/package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/loading-scripts/CHANGELOG.md b/packages/loading-scripts/CHANGELOG.md index e6707a851..7e0e50a78 100644 --- a/packages/loading-scripts/CHANGELOG.md +++ b/packages/loading-scripts/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.0.57](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.56...@rudderstack/analytics-js-loading-scripts@3.0.57) (2024-11-30) + +### Dependency Updates + +* `@rudderstack/analytics-js` updated to version `3.11.14` ## [3.0.56](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.55...@rudderstack/analytics-js-loading-scripts@3.0.56) (2024-11-22) ### Dependency Updates diff --git a/packages/loading-scripts/package.json b/packages/loading-scripts/package.json index cbac6d587..2ec010597 100644 --- a/packages/loading-scripts/package.json +++ b/packages/loading-scripts/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-loading-scripts", - "version": "3.0.56", + "version": "3.0.57", "private": true, "description": "Loading script for RudderStack JavaScript SDK", "main": "./src/index.js", From 8e52f8adad94621c3615b5e22a8d3662d24228bf Mon Sep 17 00:00:00 2001 From: GitHub actions Date: Sat, 30 Nov 2024 14:31:57 +0000 Subject: [PATCH 6/8] chore(monorepo): sync versions and generate release logs --- package-lock.json | 12 ++++++------ package.json | 2 +- packages/analytics-js-plugins/CHANGELOG_LATEST.md | 7 +++---- packages/analytics-js-plugins/project.json | 6 +++--- packages/analytics-js/CHANGELOG_LATEST.md | 11 +++++++---- packages/analytics-js/project.json | 6 +++--- packages/loading-scripts/CHANGELOG_LATEST.md | 4 ++-- packages/loading-scripts/project.json | 6 +++--- sonar-project.properties | 2 +- 9 files changed, 29 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1711bcdfc..649b27499 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.65.0", + "version": "3.66.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.65.0", + "version": "3.66.0", "hasInstallScript": true, "license": "Elastic-2.0", "workspaces": [ @@ -25284,7 +25284,7 @@ }, "packages/analytics-js": { "name": "@rudderstack/analytics-js", - "version": "3.11.13", + "version": "3.11.14", "license": "Elastic-2.0", "dependencies": { "@preact/signals-core": "1.8.0", @@ -25344,7 +25344,7 @@ }, "packages/analytics-js-plugins": { "name": "@rudderstack/analytics-js-plugins", - "version": "3.6.16", + "version": "3.6.17", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js-common": "*", @@ -25388,7 +25388,7 @@ }, "packages/loading-scripts": { "name": "@rudderstack/analytics-js-loading-scripts", - "version": "3.0.56", + "version": "3.0.57", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js": "*" @@ -25397,7 +25397,7 @@ }, "packages/sanity-suite": { "name": "@rudderstack/analytics-js-sanity-suite", - "version": "3.1.47", + "version": "3.1.48", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js": "*", diff --git a/package.json b/package.json index 47d079a83..f8a3a2aa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.65.0", + "version": "3.66.0", "private": true, "description": "Monorepo for RudderStack Analytics JS SDK", "workspaces": [ diff --git a/packages/analytics-js-plugins/CHANGELOG_LATEST.md b/packages/analytics-js-plugins/CHANGELOG_LATEST.md index 5440e480e..f162ea230 100644 --- a/packages/analytics-js-plugins/CHANGELOG_LATEST.md +++ b/packages/analytics-js-plugins/CHANGELOG_LATEST.md @@ -1,7 +1,6 @@ -## [3.6.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.15...@rudderstack/analytics-js-plugins@3.6.16) (2024-11-22) +## [3.6.17](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.16...@rudderstack/analytics-js-plugins@3.6.17) (2024-11-30) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.12` -* `@rudderstack/analytics-js` updated to version `3.11.12` -* `@rudderstack/analytics-js-cookies` updated to version `0.4.14` +* `@rudderstack/analytics-js` updated to version `3.11.13` +* `@rudderstack/analytics-js-cookies` updated to version `0.4.15` diff --git a/packages/analytics-js-plugins/project.json b/packages/analytics-js-plugins/project.json index fd1c60f27..a2686e444 100644 --- a/packages/analytics-js-plugins/project.json +++ b/packages/analytics-js-plugins/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-plugins@3.6.16", - "title": "@rudderstack/analytics-js-plugins@3.6.16", - "discussion-category": "@rudderstack/analytics-js-plugins@3.6.16", + "tag": "@rudderstack/analytics-js-plugins@3.6.17", + "title": "@rudderstack/analytics-js-plugins@3.6.17", + "discussion-category": "@rudderstack/analytics-js-plugins@3.6.17", "notesFile": "./packages/analytics-js-plugins/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js/CHANGELOG_LATEST.md b/packages/analytics-js/CHANGELOG_LATEST.md index 6736f9384..bfd8ae1f1 100644 --- a/packages/analytics-js/CHANGELOG_LATEST.md +++ b/packages/analytics-js/CHANGELOG_LATEST.md @@ -1,7 +1,10 @@ -## [3.11.13](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.12...@rudderstack/analytics-js@3.11.13) (2024-11-22) +## [3.11.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.13...@rudderstack/analytics-js@3.11.14) (2024-11-30) ### Dependency Updates -* `@rudderstack/analytics-js-cookies` updated to version `0.4.15` -* `@rudderstack/analytics-js-common` updated to version `3.14.12` -* `@rudderstack/analytics-js-plugins` updated to version `3.6.16` +* `@rudderstack/analytics-js-plugins` updated to version `3.6.17` + +### Bug Fixes + +* preload events not processed with detached load call ([#1953](https://github.com/rudderlabs/rudder-sdk-js/issues/1953)) ([6b0f66f](https://github.com/rudderlabs/rudder-sdk-js/commit/6b0f66f61745542f2b01c02c99b7514fd468db80)) + diff --git a/packages/analytics-js/project.json b/packages/analytics-js/project.json index 22f7f54d5..8737e14ab 100644 --- a/packages/analytics-js/project.json +++ b/packages/analytics-js/project.json @@ -59,9 +59,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js@3.11.13", - "title": "@rudderstack/analytics-js@3.11.13", - "discussion-category": "@rudderstack/analytics-js@3.11.13", + "tag": "@rudderstack/analytics-js@3.11.14", + "title": "@rudderstack/analytics-js@3.11.14", + "discussion-category": "@rudderstack/analytics-js@3.11.14", "notesFile": "./packages/analytics-js/CHANGELOG_LATEST.md" } } diff --git a/packages/loading-scripts/CHANGELOG_LATEST.md b/packages/loading-scripts/CHANGELOG_LATEST.md index 218385319..a100572a2 100644 --- a/packages/loading-scripts/CHANGELOG_LATEST.md +++ b/packages/loading-scripts/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [3.0.56](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.55...@rudderstack/analytics-js-loading-scripts@3.0.56) (2024-11-22) +## [3.0.57](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.56...@rudderstack/analytics-js-loading-scripts@3.0.57) (2024-11-30) ### Dependency Updates -* `@rudderstack/analytics-js` updated to version `3.11.13` +* `@rudderstack/analytics-js` updated to version `3.11.14` diff --git a/packages/loading-scripts/project.json b/packages/loading-scripts/project.json index c87476a1e..ecd1671a0 100644 --- a/packages/loading-scripts/project.json +++ b/packages/loading-scripts/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-loading-scripts@3.0.56", - "title": "@rudderstack/analytics-js-loading-scripts@3.0.56", - "discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.56", + "tag": "@rudderstack/analytics-js-loading-scripts@3.0.57", + "title": "@rudderstack/analytics-js-loading-scripts@3.0.57", + "discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.57", "notesFile": "./packages/loading-scripts/CHANGELOG_LATEST.md" } } diff --git a/sonar-project.properties b/sonar-project.properties index 9603d8674..769605adc 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -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.65.0 +sonar.projectVersion=3.66.0 # Meta-data for the project sonar.links.scm=https://github.com/rudderlabs/rudder-sdk-js From 5a070008789c75275d1f9068a7da24835dcd1cc5 Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Sat, 30 Nov 2024 20:09:42 +0530 Subject: [PATCH 7/8] chore: fix source config response --- packages/sanity-suite/__fixtures__/sourceConfig1.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sanity-suite/__fixtures__/sourceConfig1.json b/packages/sanity-suite/__fixtures__/sourceConfig1.json index e6b932d3a..a50a8e54c 100644 --- a/packages/sanity-suite/__fixtures__/sourceConfig1.json +++ b/packages/sanity-suite/__fixtures__/sourceConfig1.json @@ -358,7 +358,7 @@ "piiProperty": "" } ], - "overrideClientAndSessionId": true, + "overrideClientAndSessionId": false, "oneTrustCookieCategories": [ { "oneTrustCookieCategory": "" From c3157ee535b0191a252669dc0ace9cdd75df052b Mon Sep 17 00:00:00 2001 From: Sai Kumar Battinoju Date: Sun, 1 Dec 2024 12:13:21 +0530 Subject: [PATCH 8/8] chore: update sanity suite app to fix intermittent failures --- packages/sanity-suite/src/testBook/TestBook.js | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/sanity-suite/src/testBook/TestBook.js b/packages/sanity-suite/src/testBook/TestBook.js index 0110d2252..f99a505d5 100644 --- a/packages/sanity-suite/src/testBook/TestBook.js +++ b/packages/sanity-suite/src/testBook/TestBook.js @@ -319,10 +319,6 @@ class TestBook { const statusElement = document.getElementById(`test-case-status-${testCaseId}`); statusElement.textContent = assertionResult; statusElement.className = `badge badge-${assertionResult} testCaseStatus`; - statusElement.scrollIntoView({ - behavior: 'smooth', - block: 'center', - }); const viewDiffElement = document.getElementById(`view-diff-${testCaseId}`); if (assertionResult === 'success') { @@ -360,16 +356,6 @@ class TestBook { const resultStatusElement = document.getElementById('resultStatus'); resultStatusElement.innerHTML = finalStatus; resultStatusElement.className = `badge badge-${finalStatus}`; - - // We need to use a timeout to ensure the scrollIntoView is called after the - // last test case result scrolling has been completed - // Otherwise the scrollIntoView will not work as expected - setTimeout(() => { - resultStatusElement.scrollIntoView({ - behavior: 'smooth', - block: 'center', - }); - }, 1000); } executeNextTestCase() {