Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(release): pull hotfix-release/3.40.0-SDK-2494 into main #1879

Merged
merged 6 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 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.39.0",
"version": "3.40.0",
"private": true,
"description": "Monorepo for RudderStack Analytics JS SDK",
"workspaces": [
Expand Down
10 changes: 10 additions & 0 deletions packages/analytics-js-plugins/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.4.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.4.15...@rudderstack/analytics-js-plugins@3.4.16) (2024-10-10)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.7.16`

### Bug Fixes

* avoid using requestAnimationFrame for polling ([#1878](https://github.com/rudderlabs/rudder-sdk-js/issues/1878)) ([1aca5a0](https://github.com/rudderlabs/rudder-sdk-js/commit/1aca5a0351b44d0dd1d2b91fa7475f86f330ba3f))

## [3.4.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.4.14...@rudderstack/analytics-js-plugins@3.4.15) (2024-10-03)

### Dependency Updates
Expand Down
10 changes: 7 additions & 3 deletions packages/analytics-js-plugins/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## [3.4.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.4.14...@rudderstack/analytics-js-plugins@3.4.15) (2024-10-03)
## [3.4.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.4.15...@rudderstack/analytics-js-plugins@3.4.16) (2024-10-10)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.7.14`
* `@rudderstack/analytics-js-cookies` updated to version `0.3.9`
* `@rudderstack/analytics-js` updated to version `3.7.16`

### Bug Fixes

* avoid using requestAnimationFrame for polling ([#1878](https://github.com/rudderlabs/rudder-sdk-js/issues/1878)) ([1aca5a0](https://github.com/rudderlabs/rudder-sdk-js/commit/1aca5a0351b44d0dd1d2b91fa7475f86f330ba3f))

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.15",
"version": "3.4.16",
"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 @@ -51,9 +51,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/analytics-js-plugins@3.4.15",
"title": "@rudderstack/analytics-js-plugins@3.4.15",
"discussion-category": "@rudderstack/analytics-js-plugins@3.4.15",
"tag": "@rudderstack/analytics-js-plugins@3.4.16",
"title": "@rudderstack/analytics-js-plugins@3.4.16",
"discussion-category": "@rudderstack/analytics-js-plugins@3.4.16",
"notesFile": "./packages/analytics-js-plugins/CHANGELOG_LATEST.md"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
const READY_CHECK_TIMEOUT_MS = 11 * 1000; // 11 seconds
const SCRIPT_LOAD_TIMEOUT_MS = 10 * 1000; // 10 seconds
const READY_CHECK_INTERVAL_MS = 100; // 100 milliseconds

const DEVICE_MODE_DESTINATIONS_PLUGIN = 'DeviceModeDestinationsPlugin';

export { READY_CHECK_TIMEOUT_MS, DEVICE_MODE_DESTINATIONS_PLUGIN, SCRIPT_LOAD_TIMEOUT_MS };
export {
READY_CHECK_TIMEOUT_MS,
DEVICE_MODE_DESTINATIONS_PLUGIN,
SCRIPT_LOAD_TIMEOUT_MS,
READY_CHECK_INTERVAL_MS,
};
34 changes: 20 additions & 14 deletions packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
import { checks } from '../shared-chunks/common';
import { eventMethodOverloads, destinations } from '../shared-chunks/deviceModeDestinations';
import type { DeviceModeDestinationsAnalyticsInstance } from './types';
import { DEVICE_MODE_DESTINATIONS_PLUGIN, READY_CHECK_TIMEOUT_MS } from './constants';
import {
DEVICE_MODE_DESTINATIONS_PLUGIN,
READY_CHECK_INTERVAL_MS,
READY_CHECK_TIMEOUT_MS,
} from './constants';
import {
DESTINATION_INIT_ERROR,
DESTINATION_INTEGRATIONS_DATA_ERROR,
Expand Down Expand Up @@ -137,24 +141,26 @@
return deviceModeDestination;
};

const isDestinationReady = (dest: Destination) =>
const isDestinationReady = (dest: Destination, time = 0) =>
new Promise((resolve, reject) => {
const instance = dest.instance as DeviceModeDestination;
let handleNumber: number;
const checkReady = () => {
if (instance.isLoaded() && (!instance.isReady || instance.isReady())) {
resolve(true);
} else {
handleNumber = globalThis.requestAnimationFrame(checkReady);
}
};
checkReady();
setTimeout(() => {
globalThis.cancelAnimationFrame(handleNumber);
if (instance.isLoaded() && (!instance.isReady || instance.isReady())) {
resolve(true);
} else if (time >= READY_CHECK_TIMEOUT_MS) {
reject(
new Error(DESTINATION_READY_TIMEOUT_ERROR(READY_CHECK_TIMEOUT_MS, dest.userFriendlyId)),
);
}, READY_CHECK_TIMEOUT_MS);
} else {
const curTime = Date.now();
wait(READY_CHECK_INTERVAL_MS)
.then(() => {
const elapsedTime = Date.now() - curTime;
isDestinationReady(dest, time + elapsedTime)
.then(resolve)
.catch(err => reject(err));
})
.catch(err => reject(err));

Check warning on line 162 in packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts

View check run for this annotation

Codecov / codecov/patch

packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts#L162

Added line #L162 was not covered by tests
}
});

/**
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.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.7.15...@rudderstack/analytics-js@3.7.16) (2024-10-10)

### Dependency Updates

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

### Bug Fixes

* source config fixture and local storage issue ([cbf0833](https://github.com/rudderlabs/rudder-sdk-js/commit/cbf08337f2a4dfdb0566ef60ef0dcf4c53ce8e00))

## [3.7.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.7.14...@rudderstack/analytics-js@3.7.15) (2024-10-03)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics-js/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## [3.7.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.7.14...@rudderstack/analytics-js@3.7.15) (2024-10-03)
## [3.7.16](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.7.15...@rudderstack/analytics-js@3.7.16) (2024-10-10)

### Dependency Updates

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

### Bug Fixes

* storage access error when cookies are blocked ([#1872](https://github.com/rudderlabs/rudder-sdk-js/issues/1872)) ([966dbc2](https://github.com/rudderlabs/rudder-sdk-js/commit/966dbc2996b0ee292a553058ef435154de73f42e))
* source config fixture and local storage issue ([cbf0833](https://github.com/rudderlabs/rudder-sdk-js/commit/cbf08337f2a4dfdb0566ef60ef0dcf4c53ce8e00))

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.15",
"version": "3.7.16",
"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 @@ -59,9 +59,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/analytics-js@3.7.15",
"title": "@rudderstack/analytics-js@3.7.15",
"discussion-category": "@rudderstack/analytics-js@3.7.15",
"tag": "@rudderstack/analytics-js@3.7.16",
"title": "@rudderstack/analytics-js@3.7.16",
"discussion-category": "@rudderstack/analytics-js@3.7.16",
"notesFile": "./packages/analytics-js/CHANGELOG_LATEST.md"
}
}
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.33](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.32...@rudderstack/analytics-js-loading-scripts@3.0.33) (2024-10-10)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.7.16`
## [3.0.32](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.31...@rudderstack/analytics-js-loading-scripts@3.0.32) (2024-10-03)

### 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.32](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.31...@rudderstack/analytics-js-loading-scripts@3.0.32) (2024-10-03)
## [3.0.33](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.32...@rudderstack/analytics-js-loading-scripts@3.0.33) (2024-10-10)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.7.15`
* `@rudderstack/analytics-js` updated to version `3.7.16`
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.32",
"version": "3.0.33",
"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 @@ -51,9 +51,9 @@
"github": {
"executor": "@jscutlery/semver:github",
"options": {
"tag": "@rudderstack/analytics-js-loading-scripts@3.0.32",
"title": "@rudderstack/analytics-js-loading-scripts@3.0.32",
"discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.32",
"tag": "@rudderstack/analytics-js-loading-scripts@3.0.33",
"title": "@rudderstack/analytics-js-loading-scripts@3.0.33",
"discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.33",
"notesFile": "./packages/loading-scripts/CHANGELOG_LATEST.md"
}
}
Expand Down
10 changes: 10 additions & 0 deletions packages/sanity-suite/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.1.24](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.23...@rudderstack/analytics-js-sanity-suite@3.1.24) (2024-10-10)

### Dependency Updates

* `@rudderstack/analytics-js` updated to version `3.7.16`

### Bug Fixes

* source config fixture and local storage issue ([cbf0833](https://github.com/rudderlabs/rudder-sdk-js/commit/cbf08337f2a4dfdb0566ef60ef0dcf4c53ce8e00))

## [3.1.23](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.22...@rudderstack/analytics-js-sanity-suite@3.1.23) (2024-10-03)

### 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.23",
"version": "3.1.24",
"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.39.0
sonar.projectVersion=3.40.0

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