Skip to content

Commit

Permalink
chore(release): pull main into develop post release v3.45.0 (#1900)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoumitaM authored Oct 22, 2024
2 parents 2365e1c + 13b50df commit f5ddc6c
Show file tree
Hide file tree
Showing 39 changed files with 168 additions and 99 deletions.
22 changes: 11 additions & 11 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.44.0",
"version": "3.45.0",
"private": true,
"description": "Monorepo for RudderStack Analytics JS SDK",
"workspaces": [
Expand Down
7 changes: 7 additions & 0 deletions packages/analytics-js-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

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

## [3.10.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-21)


### Features

* iubenda consent manager plugin ([#1809](https://github.com/rudderlabs/rudder-sdk-js/issues/1809)) ([7ea300c](https://github.com/rudderlabs/rudder-sdk-js/commit/7ea300c61ead9cc094c3f1985e0ef3165b0fcb59))

## [3.9.5](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-18)


Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-common/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## [3.9.5](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].4...@rudderstack/analytics-js-common@3.9.5) (2024-10-18)
## [3.10.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].5...@rudderstack/analytics-js-common@3.10.0) (2024-10-21)


### Bug Fixes
### Features

* add xpixel missing name mapping ([#1895](https://github.com/rudderlabs/rudder-sdk-js/issues/1895)) ([0800f36](https://github.com/rudderlabs/rudder-sdk-js/commit/0800f361b6a9b9866ba47d9a393cf7c2063b3815))
* iubenda consent manager plugin ([#1809](https://github.com/rudderlabs/rudder-sdk-js/issues/1809)) ([7ea300c](https://github.com/rudderlabs/rudder-sdk-js/commit/7ea300c61ead9cc094c3f1985e0ef3165b0fcb59))

2 changes: 1 addition & 1 deletion packages/analytics-js-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-common",
"version": "3.9.5",
"version": "3.10.0",
"private": true,
"description": "RudderStack JavaScript SDK common code",
"module": "dist/npm/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-common/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-common@3.9.5",
"title": "@rudderstack/analytics-js-common@3.9.5",
"discussion-category": "@rudderstack/analytics-js-common@3.9.5",
"tag": "@rudderstack/analytics-js-common@3.10.0",
"title": "@rudderstack/analytics-js-common@3.10.0",
"discussion-category": "@rudderstack/analytics-js-common@3.10.0",
"notesFile": "./packages/analytics-js-common/CHANGELOG_LATEST.md"
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics-js-cookies/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).

## [0.3.12](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.10.0`
## [0.3.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-18)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics-js-cookies/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [0.3.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].10...@rudderstack/[email protected].11) (2024-10-18)
## [0.3.12](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].11...@rudderstack/[email protected].12) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.5`
* `@rudderstack/analytics-js-common` updated to version `3.10.0`
2 changes: 1 addition & 1 deletion packages/analytics-js-cookies/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-cookies",
"version": "0.3.11",
"version": "0.3.12",
"description": "RudderStack JavaScript SDK Cookies Utilities",
"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-cookies/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/[email protected].11",
"title": "@rudderstack/[email protected].11",
"discussion-category": "@rudderstack/[email protected].11",
"tag": "@rudderstack/[email protected].12",
"title": "@rudderstack/[email protected].12",
"discussion-category": "@rudderstack/[email protected].12",
"notesFile": "./packages/analytics-js-cookies/CHANGELOG_LATEST.md"
}
}
Expand Down
5 changes: 5 additions & 0 deletions packages/analytics-js-integrations/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.9.3](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.10.0`
## [3.9.2](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-18)

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

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.5`
* `@rudderstack/analytics-js-common` updated to version `3.10.0`
2 changes: 1 addition & 1 deletion packages/analytics-js-integrations/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rudderstack/analytics-js-integrations",
"version": "3.9.2",
"version": "3.9.3",
"private": true,
"description": "RudderStack JavaScript SDK device mode integrations",
"main": "dist/npm/modern/cjs/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-js-integrations/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/[email protected].2",
"title": "@rudderstack/[email protected].2",
"discussion-category": "@rudderstack/[email protected].2",
"tag": "@rudderstack/[email protected].3",
"title": "@rudderstack/[email protected].3",
"discussion-category": "@rudderstack/[email protected].3",
"notesFile": "./packages/analytics-js-integrations/CHANGELOG_LATEST.md"
}
}
Expand Down
12 changes: 12 additions & 0 deletions packages/analytics-js-plugins/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

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

## [3.5.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.10.0`
* `@rudderstack/analytics-js` updated to version `3.7.19`
* `@rudderstack/analytics-js-cookies` updated to version `0.3.11`

### Features

* iubenda consent manager plugin ([#1809](https://github.com/rudderlabs/rudder-sdk-js/issues/1809)) ([7ea300c](https://github.com/rudderlabs/rudder-sdk-js/commit/7ea300c61ead9cc094c3f1985e0ef3165b0fcb59))

## [3.4.19](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-18)

### Dependency Updates
Expand Down
12 changes: 9 additions & 3 deletions packages/analytics-js-plugins/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## [3.4.19](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].18...@rudderstack/analytics-js-plugins@3.4.19) (2024-10-18)
## [3.5.0](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].19...@rudderstack/analytics-js-plugins@3.5.0) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.5`
* `@rudderstack/analytics-js` updated to version `3.7.18`
* `@rudderstack/analytics-js-common` updated to version `3.10.0`
* `@rudderstack/analytics-js` updated to version `3.7.19`
* `@rudderstack/analytics-js-cookies` updated to version `0.3.11`

### Features

* iubenda consent manager plugin ([#1809](https://github.com/rudderlabs/rudder-sdk-js/issues/1809)) ([7ea300c](https://github.com/rudderlabs/rudder-sdk-js/commit/7ea300c61ead9cc094c3f1985e0ef3165b0fcb59))

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.19",
"version": "3.5.0",
"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.19",
"title": "@rudderstack/analytics-js-plugins@3.4.19",
"discussion-category": "@rudderstack/analytics-js-plugins@3.4.19",
"tag": "@rudderstack/analytics-js-plugins@3.5.0",
"title": "@rudderstack/analytics-js-plugins@3.5.0",
"discussion-category": "@rudderstack/analytics-js-plugins@3.5.0",
"notesFile": "./packages/analytics-js-plugins/CHANGELOG_LATEST.md"
}
}
Expand Down
58 changes: 30 additions & 28 deletions packages/analytics-js-plugins/src/iubendaConsentManager/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,37 @@ import type { ILogger } from '@rudderstack/analytics-js-common/types/Logger';
import type { ApplicationState } from '@rudderstack/analytics-js-common/types/ApplicationState';
import type { ConsentsInfo } from '@rudderstack/analytics-js-common/types/Consent';
import { isDefined } from '@rudderstack/analytics-js-common/utilities/checks';
import { checks, storages, string } from '../shared-chunks/common';
import { IUBENDA_CONSENT_COOKIE_READ_ERROR, IUBENDA_CONSENT_COOKIE_PARSE_ERROR } from './logMessages';
import { checks, storages } from '../shared-chunks/common';
import {
IUBENDA_CONSENT_COOKIE_READ_ERROR,
IUBENDA_CONSENT_COOKIE_PARSE_ERROR,
} from './logMessages';
import { IUBENDA_CONSENT_MANAGER_PLUGIN, IUBENDA_CONSENT_COOKIE_NAME_PATTERN } from './constants';
import type { IubendaConsentData, IubendaConsentCookieData} from './types'
import type { IubendaConsentData, IubendaConsentCookieData } from './types';

const getIubendaCookieName = (logger?: ILogger): string => {
try {
// Retrieve cookies as a string and split them into an array
const cookies = document.cookie.split('; ');

// Find the cookie that matches the iubenda cookie pattern
const matchedCookie = cookies.find(cookie => {
const [name] = cookie.split('=');
return IUBENDA_CONSENT_COOKIE_NAME_PATTERN.test((name || '').trim());
});

if (!matchedCookie) {
throw new Error('Iubenda Cookie not found with the specified pattern.');
}

// Extract and return the cookie name
const [name] = matchedCookie.split('=');
return name || '';
} catch (err) {
logger?.error(IUBENDA_CONSENT_COOKIE_READ_ERROR(IUBENDA_CONSENT_MANAGER_PLUGIN), err);
return '';
}
};

/**
* Gets the consent data from the Iubenda's consent cookie
Expand All @@ -21,14 +48,12 @@ const getIubendaConsentData = (
): IubendaConsentData | undefined => {
let rawConsentCookieData = null;
try {

const dataStore = storeManager?.setStore({
id: IUBENDA_CONSENT_MANAGER_PLUGIN,
name: IUBENDA_CONSENT_MANAGER_PLUGIN,
type: storages.COOKIE_STORAGE,
});
rawConsentCookieData = dataStore?.engine.getItem(getIubendaCookieName(logger));

} catch (err) {
logger?.error(IUBENDA_CONSENT_COOKIE_READ_ERROR(IUBENDA_CONSENT_MANAGER_PLUGIN), err);
return undefined;
Expand Down Expand Up @@ -87,28 +112,5 @@ const updateConsentStateFromData = (
state.consents.initialized.value = isDefined(iubendaConsentData);
state.consents.data.value = consentData;
};
const getIubendaCookieName = ( logger?: ILogger ): string => {
try {
// Retrieve cookies as a string and split them into an array
const cookies = document.cookie.split('; ');

// Find the cookie that matches the iubenda cookie pattern
const matchedCookie = cookies.find(cookie => {
const [name] = cookie.split('=');
return IUBENDA_CONSENT_COOKIE_NAME_PATTERN.test((name || "").trim());
});

if (!matchedCookie) {
throw new Error('Iubenda Cookie not found with the specified pattern.');
}

// Extract and return the cookie name
const [name] = matchedCookie.split('=');
return name || "";
} catch (err) {
logger?.error(IUBENDA_CONSENT_COOKIE_READ_ERROR(IUBENDA_CONSENT_MANAGER_PLUGIN), err);
return "";
}
};

export { getIubendaConsentData, getConsentData, updateConsentStateFromData, getIubendaCookieName };
5 changes: 5 additions & 0 deletions packages/analytics-js-service-worker/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.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.10.0`
## [3.1.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected]...@rudderstack/[email protected]) (2024-10-18)

### Dependency Updates
Expand Down
4 changes: 2 additions & 2 deletions packages/analytics-js-service-worker/CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## [3.1.14](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].13...@rudderstack/[email protected].14) (2024-10-18)
## [3.1.15](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/[email protected].14...@rudderstack/[email protected].15) (2024-10-21)

### Dependency Updates

* `@rudderstack/analytics-js-common` updated to version `3.9.5`
* `@rudderstack/analytics-js-common` updated to version `3.10.0`
Loading

0 comments on commit f5ddc6c

Please sign in to comment.