diff --git a/package-lock.json b/package-lock.json index 34aa44684..f7d84c245 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.60.0", + "version": "3.61.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.60.0", + "version": "3.61.0", "hasInstallScript": true, "license": "Elastic-2.0", "workspaces": [ @@ -25284,7 +25284,7 @@ }, "packages/analytics-js": { "name": "@rudderstack/analytics-js", - "version": "3.11.8", + "version": "3.11.9", "license": "Elastic-2.0", "dependencies": { "@preact/signals-core": "1.8.0", @@ -25298,7 +25298,7 @@ }, "packages/analytics-js-common": { "name": "@rudderstack/analytics-js-common", - "version": "3.14.7", + "version": "3.14.8", "license": "Elastic-2.0", "dependencies": { "@lukeed/uuid": "2.0.1", @@ -25315,7 +25315,7 @@ }, "packages/analytics-js-cookies": { "name": "@rudderstack/analytics-js-cookies", - "version": "0.4.10", + "version": "0.4.11", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js-common": "*" @@ -25324,7 +25324,7 @@ }, "packages/analytics-js-integrations": { "name": "@rudderstack/analytics-js-integrations", - "version": "3.11.6", + "version": "3.11.7", "license": "Elastic-2.0", "dependencies": { "@lukeed/uuid": "2.0.1", @@ -25344,7 +25344,7 @@ }, "packages/analytics-js-plugins": { "name": "@rudderstack/analytics-js-plugins", - "version": "3.6.11", + "version": "3.6.12", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js-common": "*", @@ -25358,7 +25358,7 @@ }, "packages/analytics-js-service-worker": { "name": "@rudderstack/analytics-js-service-worker", - "version": "3.2.10", + "version": "3.2.11", "license": "Elastic-2.0", "dependencies": { "@lukeed/uuid": "2.0.1", @@ -25379,7 +25379,7 @@ }, "packages/analytics-v1.1": { "name": "rudder-sdk-js", - "version": "2.48.35", + "version": "2.48.36", "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.51", + "version": "3.0.52", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js": "*" @@ -25397,7 +25397,7 @@ }, "packages/sanity-suite": { "name": "@rudderstack/analytics-js-sanity-suite", - "version": "3.1.42", + "version": "3.1.43", "license": "Elastic-2.0", "dependencies": { "@rudderstack/analytics-js": "*", diff --git a/package.json b/package.json index 315e1850d..6c66f9aac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-monorepo", - "version": "3.60.0", + "version": "3.61.0", "private": true, "description": "Monorepo for RudderStack Analytics JS SDK", "workspaces": [ diff --git a/packages/analytics-js-common/CHANGELOG.md b/packages/analytics-js-common/CHANGELOG.md index b6dda3fee..317529996 100644 --- a/packages/analytics-js-common/CHANGELOG.md +++ b/packages/analytics-js-common/CHANGELOG.md @@ -2,6 +2,13 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.14.8](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-common@3.14.7...@rudderstack/analytics-js-common@3.14.8) (2024-11-22) + + +### Bug Fixes + +* sanitize data directly in plugins ([d8cc780](https://github.com/rudderlabs/rudder-sdk-js/commit/d8cc7808e21baeb26782596efb542713bd38a09f)) + ## [3.14.7](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-common@3.14.6...@rudderstack/analytics-js-common@3.14.7) (2024-11-21) diff --git a/packages/analytics-js-common/CHANGELOG_LATEST.md b/packages/analytics-js-common/CHANGELOG_LATEST.md index 10d9efa3d..8929fd384 100644 --- a/packages/analytics-js-common/CHANGELOG_LATEST.md +++ b/packages/analytics-js-common/CHANGELOG_LATEST.md @@ -1,7 +1,7 @@ -## [3.14.7](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-common@3.14.6...@rudderstack/analytics-js-common@3.14.7) (2024-11-21) +## [3.14.8](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-common@3.14.7...@rudderstack/analytics-js-common@3.14.8) (2024-11-22) ### Bug Fixes -* restore event api overloads changes ([ebb1f7c](https://github.com/rudderlabs/rudder-sdk-js/commit/ebb1f7ca924972993e2da25036ae994f24c229dd)) +* sanitize data directly in plugins ([d8cc780](https://github.com/rudderlabs/rudder-sdk-js/commit/d8cc7808e21baeb26782596efb542713bd38a09f)) diff --git a/packages/analytics-js-common/package.json b/packages/analytics-js-common/package.json index e3b6f6867..901f0547e 100644 --- a/packages/analytics-js-common/package.json +++ b/packages/analytics-js-common/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-common", - "version": "3.14.7", + "version": "3.14.8", "private": true, "description": "RudderStack JavaScript SDK common code", "module": "dist/npm/index.js", diff --git a/packages/analytics-js-common/project.json b/packages/analytics-js-common/project.json index 9137452a4..6c82a494d 100644 --- a/packages/analytics-js-common/project.json +++ b/packages/analytics-js-common/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-common@3.14.7", - "title": "@rudderstack/analytics-js-common@3.14.7", - "discussion-category": "@rudderstack/analytics-js-common@3.14.7", + "tag": "@rudderstack/analytics-js-common@3.14.8", + "title": "@rudderstack/analytics-js-common@3.14.8", + "discussion-category": "@rudderstack/analytics-js-common@3.14.8", "notesFile": "./packages/analytics-js-common/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js-common/src/utilities/eventMethodOverloads.ts b/packages/analytics-js-common/src/utilities/eventMethodOverloads.ts index 33e885792..4a7f06381 100644 --- a/packages/analytics-js-common/src/utilities/eventMethodOverloads.ts +++ b/packages/analytics-js-common/src/utilities/eventMethodOverloads.ts @@ -2,7 +2,7 @@ import { clone } from 'ramda'; import type { ApiObject } from '../types/ApiObject'; import type { ApiCallback, ApiOptions } from '../types/EventApi'; import type { Nullable } from '../types/Nullable'; -import { getSanitizedValue, isObjectLiteralAndNotNull, mergeDeepRight } from './object'; +import { isObjectLiteralAndNotNull, mergeDeepRight } from './object'; import { isDefined, isDefinedAndNotNull, isFunction, isNull, isString } from './checks'; import { tryStringify } from './string'; import type { IdentifyTraits } from '../types/traits'; @@ -56,70 +56,64 @@ const pageArgumentsToCallOptions = ( options?: Nullable | ApiCallback, callback?: ApiCallback, ): PageCallOptions => { - const sanitizedCategory = getSanitizedValue(category); - const sanitizedName = getSanitizedValue(name); - const sanitizedProperties = getSanitizedValue(properties); - const sanitizedOptions = getSanitizedValue(options); - const sanitizedCallback = getSanitizedValue(callback); - const payload: PageCallOptions = { - category: sanitizedCategory as string, - name: sanitizedName as string, - properties: sanitizedProperties as Nullable, - options: sanitizedOptions as Nullable, + category: category as string, + name: name as string, + properties: properties as Nullable, + options: options as Nullable, callback: undefined, }; - if (isFunction(sanitizedCallback)) { - payload.callback = sanitizedCallback; + if (isFunction(callback)) { + payload.callback = callback; } - if (isFunction(sanitizedOptions)) { - payload.category = sanitizedCategory as string; - payload.name = sanitizedName as string; - payload.properties = sanitizedProperties as Nullable; + if (isFunction(options)) { + payload.category = category as string; + payload.name = name as string; + payload.properties = properties as Nullable; payload.options = undefined; - payload.callback = sanitizedOptions; + payload.callback = options; } - if (isFunction(sanitizedProperties)) { - payload.category = sanitizedCategory as string; - payload.name = sanitizedName as string; + if (isFunction(properties)) { + payload.category = category as string; + payload.name = name as string; payload.properties = undefined; payload.options = undefined; - payload.callback = sanitizedProperties; + payload.callback = properties; } - if (isFunction(sanitizedName)) { - payload.category = sanitizedCategory as string; + if (isFunction(name)) { + payload.category = category as string; payload.name = undefined; payload.properties = undefined; payload.options = undefined; - payload.callback = sanitizedName; + payload.callback = name; } - if (isFunction(sanitizedCategory)) { + if (isFunction(category)) { payload.category = undefined; payload.name = undefined; payload.properties = undefined; payload.options = undefined; - payload.callback = sanitizedCategory; + payload.callback = category; } - if (isObjectLiteralAndNotNull(sanitizedCategory)) { + if (isObjectLiteralAndNotNull(category)) { payload.name = undefined; payload.category = undefined; - payload.properties = sanitizedCategory as Nullable; - if (!isFunction(sanitizedName)) { - payload.options = sanitizedName as Nullable; + payload.properties = category as Nullable; + if (!isFunction(name)) { + payload.options = name as Nullable; } else { payload.options = undefined; } - } else if (isObjectLiteralAndNotNull(sanitizedName)) { + } else if (isObjectLiteralAndNotNull(name)) { payload.name = undefined; - payload.properties = sanitizedName as Nullable; - if (!isFunction(sanitizedProperties)) { - payload.options = sanitizedProperties as Nullable; + payload.properties = name as Nullable; + if (!isFunction(properties)) { + payload.options = properties as Nullable; } else { payload.options = undefined; } @@ -127,9 +121,9 @@ const pageArgumentsToCallOptions = ( // if the category argument alone is provided b/w category and name, // use it as name and set category to undefined - if (isString(sanitizedCategory) && !isString(sanitizedName)) { + if (isString(category) && !isString(name)) { payload.category = undefined; - payload.name = sanitizedCategory; + payload.name = category; } // Rest of the code is just to clean up undefined values @@ -177,32 +171,27 @@ const trackArgumentsToCallOptions = ( options?: Nullable | ApiCallback, callback?: ApiCallback, ): TrackCallOptions => { - const sanitizedEvent = getSanitizedValue(event); - const sanitizedProperties = getSanitizedValue(properties); - const sanitizedOptions = getSanitizedValue(options); - const sanitizedCallback = getSanitizedValue(callback); - const payload: TrackCallOptions = { - name: sanitizedEvent, - properties: sanitizedProperties as Nullable, - options: sanitizedOptions as Nullable, + name: event, + properties: properties as Nullable, + options: options as Nullable, callback: undefined, }; - if (isFunction(sanitizedCallback)) { - payload.callback = sanitizedCallback; + if (isFunction(callback)) { + payload.callback = callback; } - if (isFunction(sanitizedOptions)) { - payload.properties = sanitizedProperties as Nullable; + if (isFunction(options)) { + payload.properties = properties as Nullable; payload.options = undefined; - payload.callback = sanitizedOptions; + payload.callback = options; } - if (isFunction(sanitizedProperties)) { + if (isFunction(properties)) { payload.properties = undefined; payload.options = undefined; - payload.callback = sanitizedProperties; + payload.callback = properties; } // Rest of the code is just to clean up undefined values @@ -228,43 +217,38 @@ const identifyArgumentsToCallOptions = ( options?: Nullable | ApiCallback, callback?: ApiCallback, ): IdentifyCallOptions => { - const sanitizedUserId = getSanitizedValue(userId); - const sanitizedTraits = getSanitizedValue(traits); - const sanitizedOptions = getSanitizedValue(options); - const sanitizedCallback = getSanitizedValue(callback); - const payload: IdentifyCallOptions = { - userId: sanitizedUserId as string, - traits: sanitizedTraits as Nullable, - options: sanitizedOptions as Nullable, + userId: userId as string, + traits: traits as Nullable, + options: options as Nullable, callback: undefined, }; - if (isFunction(sanitizedCallback)) { - payload.callback = sanitizedCallback; + if (isFunction(callback)) { + payload.callback = callback; } - if (isFunction(sanitizedOptions)) { - payload.userId = sanitizedUserId as string; - payload.traits = sanitizedTraits as Nullable; + if (isFunction(options)) { + payload.userId = userId as string; + payload.traits = traits as Nullable; payload.options = undefined; - payload.callback = sanitizedOptions; + payload.callback = options; } - if (isFunction(sanitizedTraits)) { - payload.userId = sanitizedUserId as string; + if (isFunction(traits)) { + payload.userId = userId as string; payload.traits = undefined; payload.options = undefined; - payload.callback = sanitizedTraits; + payload.callback = traits; } - if (isObjectLiteralAndNotNull(sanitizedUserId) || isNull(sanitizedUserId)) { + if (isObjectLiteralAndNotNull(userId) || isNull(userId)) { // Explicitly set null to prevent resetting the existing value // in the Analytics class payload.userId = null; - payload.traits = sanitizedUserId as Nullable; - if (!isFunction(sanitizedTraits)) { - payload.options = sanitizedTraits as Nullable; + payload.traits = userId as Nullable; + if (!isFunction(traits)) { + payload.options = traits as Nullable; } else { payload.options = undefined; } @@ -299,38 +283,33 @@ const aliasArgumentsToCallOptions = ( options?: Nullable | ApiCallback, callback?: ApiCallback, ): AliasCallOptions => { - const sanitizedTo = getSanitizedValue(to); - const sanitizedFrom = getSanitizedValue(from); - const sanitizedOptions = getSanitizedValue(options); - const sanitizedCallback = getSanitizedValue(callback); - const payload: AliasCallOptions = { - to: sanitizedTo, - from: sanitizedFrom as string, - options: sanitizedOptions as Nullable, + to, + from: from as string, + options: options as Nullable, callback: undefined, }; - if (isFunction(sanitizedCallback)) { - payload.callback = sanitizedCallback; + if (isFunction(callback)) { + payload.callback = callback; } - if (isFunction(sanitizedOptions)) { - payload.to = sanitizedTo; - payload.from = sanitizedFrom as string; + if (isFunction(options)) { + payload.to = to; + payload.from = from as string; payload.options = undefined; - payload.callback = sanitizedOptions; + payload.callback = options; } - if (isFunction(sanitizedFrom)) { - payload.to = sanitizedTo; + if (isFunction(from)) { + payload.to = to; payload.from = undefined; payload.options = undefined; - payload.callback = sanitizedFrom; - } else if (isObjectLiteralAndNotNull(sanitizedFrom) || isNull(sanitizedFrom)) { - payload.to = sanitizedTo; + payload.callback = from; + } else if (isObjectLiteralAndNotNull(from) || isNull(from)) { + payload.to = to; payload.from = undefined; - payload.options = sanitizedFrom as Nullable; + payload.options = from as Nullable; } // Rest of the code is just to clean up undefined values @@ -364,43 +343,38 @@ const groupArgumentsToCallOptions = ( options?: Nullable | ApiCallback, callback?: ApiCallback, ): GroupCallOptions => { - const sanitizedGroupId = getSanitizedValue(groupId); - const sanitizedTraits = getSanitizedValue(traits); - const sanitizedOptions = getSanitizedValue(options); - const sanitizedCallback = getSanitizedValue(callback); - const payload: GroupCallOptions = { - groupId: sanitizedGroupId as string, - traits: sanitizedTraits as Nullable, - options: sanitizedOptions as Nullable, + groupId: groupId as string, + traits: traits as Nullable, + options: options as Nullable, callback: undefined, }; - if (isFunction(sanitizedCallback)) { - payload.callback = sanitizedCallback; + if (isFunction(callback)) { + payload.callback = callback; } - if (isFunction(sanitizedOptions)) { - payload.groupId = sanitizedGroupId as string; - payload.traits = sanitizedTraits as Nullable; + if (isFunction(options)) { + payload.groupId = groupId as string; + payload.traits = traits as Nullable; payload.options = undefined; - payload.callback = sanitizedOptions; + payload.callback = options; } - if (isFunction(sanitizedTraits)) { - payload.groupId = sanitizedGroupId as string; + if (isFunction(traits)) { + payload.groupId = groupId as string; payload.traits = undefined; payload.options = undefined; - payload.callback = sanitizedTraits; + payload.callback = traits; } - if (isObjectLiteralAndNotNull(sanitizedGroupId) || isNull(sanitizedGroupId)) { + if (isObjectLiteralAndNotNull(groupId) || isNull(groupId)) { // Explicitly set null to prevent resetting the existing value // in the Analytics class payload.groupId = null; - payload.traits = sanitizedGroupId as Nullable; - if (!isFunction(sanitizedTraits)) { - payload.options = sanitizedTraits as Nullable; + payload.traits = groupId as Nullable; + if (!isFunction(traits)) { + payload.options = traits as Nullable; } else { payload.options = undefined; } diff --git a/packages/analytics-js-cookies/CHANGELOG.md b/packages/analytics-js-cookies/CHANGELOG.md index b680d9a5f..a9ea16c94 100644 --- a/packages/analytics-js-cookies/CHANGELOG.md +++ b/packages/analytics-js-cookies/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [0.4.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-cookies@0.4.10...@rudderstack/analytics-js-cookies@0.4.11) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-common` updated to version `3.14.8` ## [0.4.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-cookies@0.4.9...@rudderstack/analytics-js-cookies@0.4.10) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-js-cookies/CHANGELOG_LATEST.md b/packages/analytics-js-cookies/CHANGELOG_LATEST.md index c09ad5055..9db7d3d09 100644 --- a/packages/analytics-js-cookies/CHANGELOG_LATEST.md +++ b/packages/analytics-js-cookies/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [0.4.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-cookies@0.4.9...@rudderstack/analytics-js-cookies@0.4.10) (2024-11-21) +## [0.4.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-cookies@0.4.10...@rudderstack/analytics-js-cookies@0.4.11) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.7` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` diff --git a/packages/analytics-js-cookies/package.json b/packages/analytics-js-cookies/package.json index 18a41226e..90b07ae38 100644 --- a/packages/analytics-js-cookies/package.json +++ b/packages/analytics-js-cookies/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-cookies", - "version": "0.4.10", + "version": "0.4.11", "description": "RudderStack JavaScript SDK Cookies Utilities", "main": "dist/npm/modern/cjs/index.cjs", "module": "dist/npm/modern/esm/index.mjs", diff --git a/packages/analytics-js-cookies/project.json b/packages/analytics-js-cookies/project.json index b1fd9dd74..17f71dc01 100644 --- a/packages/analytics-js-cookies/project.json +++ b/packages/analytics-js-cookies/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-cookies@0.4.10", - "title": "@rudderstack/analytics-js-cookies@0.4.10", - "discussion-category": "@rudderstack/analytics-js-cookies@0.4.10", + "tag": "@rudderstack/analytics-js-cookies@0.4.11", + "title": "@rudderstack/analytics-js-cookies@0.4.11", + "discussion-category": "@rudderstack/analytics-js-cookies@0.4.11", "notesFile": "./packages/analytics-js-cookies/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js-integrations/CHANGELOG.md b/packages/analytics-js-integrations/CHANGELOG.md index 044c7175e..7317bcdc2 100644 --- a/packages/analytics-js-integrations/CHANGELOG.md +++ b/packages/analytics-js-integrations/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.11.7](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.11.6...@rudderstack/analytics-js-integrations@3.11.7) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-common` updated to version `3.14.8` ## [3.11.6](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.11.5...@rudderstack/analytics-js-integrations@3.11.6) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-js-integrations/CHANGELOG_LATEST.md b/packages/analytics-js-integrations/CHANGELOG_LATEST.md index d640423c0..eda2c682b 100644 --- a/packages/analytics-js-integrations/CHANGELOG_LATEST.md +++ b/packages/analytics-js-integrations/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [3.11.6](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.11.5...@rudderstack/analytics-js-integrations@3.11.6) (2024-11-21) +## [3.11.7](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-integrations@3.11.6...@rudderstack/analytics-js-integrations@3.11.7) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.7` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` diff --git a/packages/analytics-js-integrations/package.json b/packages/analytics-js-integrations/package.json index a0aac53c3..c93515818 100644 --- a/packages/analytics-js-integrations/package.json +++ b/packages/analytics-js-integrations/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-integrations", - "version": "3.11.6", + "version": "3.11.7", "private": true, "description": "RudderStack JavaScript SDK device mode integrations", "main": "dist/npm/modern/cjs/index.js", diff --git a/packages/analytics-js-integrations/project.json b/packages/analytics-js-integrations/project.json index e6d968fb1..fadd5f090 100644 --- a/packages/analytics-js-integrations/project.json +++ b/packages/analytics-js-integrations/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-integrations@3.11.6", - "title": "@rudderstack/analytics-js-integrations@3.11.6", - "discussion-category": "@rudderstack/analytics-js-integrations@3.11.6", + "tag": "@rudderstack/analytics-js-integrations@3.11.7", + "title": "@rudderstack/analytics-js-integrations@3.11.7", + "discussion-category": "@rudderstack/analytics-js-integrations@3.11.7", "notesFile": "./packages/analytics-js-integrations/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js-plugins/CHANGELOG.md b/packages/analytics-js-plugins/CHANGELOG.md index 7c50c9c0c..357d63aab 100644 --- a/packages/analytics-js-plugins/CHANGELOG.md +++ b/packages/analytics-js-plugins/CHANGELOG.md @@ -2,6 +2,18 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.6.12](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.11...@rudderstack/analytics-js-plugins@3.6.12) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-common` updated to version `3.14.8` +* `@rudderstack/analytics-js` updated to version `3.11.8` +* `@rudderstack/analytics-js-cookies` updated to version `0.4.10` + +### Bug Fixes + +* sanitize data directly in plugins ([d8cc780](https://github.com/rudderlabs/rudder-sdk-js/commit/d8cc7808e21baeb26782596efb542713bd38a09f)) + ## [3.6.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.10...@rudderstack/analytics-js-plugins@3.6.11) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-js-plugins/CHANGELOG_LATEST.md b/packages/analytics-js-plugins/CHANGELOG_LATEST.md index f78809a35..ba7e65522 100644 --- a/packages/analytics-js-plugins/CHANGELOG_LATEST.md +++ b/packages/analytics-js-plugins/CHANGELOG_LATEST.md @@ -1,7 +1,12 @@ -## [3.6.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.10...@rudderstack/analytics-js-plugins@3.6.11) (2024-11-21) +## [3.6.12](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-plugins@3.6.11...@rudderstack/analytics-js-plugins@3.6.12) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.7` -* `@rudderstack/analytics-js` updated to version `3.11.7` -* `@rudderstack/analytics-js-cookies` updated to version `0.4.9` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` +* `@rudderstack/analytics-js` updated to version `3.11.8` +* `@rudderstack/analytics-js-cookies` updated to version `0.4.10` + +### Bug Fixes + +* sanitize data directly in plugins ([d8cc780](https://github.com/rudderlabs/rudder-sdk-js/commit/d8cc7808e21baeb26782596efb542713bd38a09f)) + diff --git a/packages/analytics-js-plugins/package.json b/packages/analytics-js-plugins/package.json index 235ef9356..f902ef39e 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.11", + "version": "3.6.12", "private": true, "description": "RudderStack JavaScript SDK plugins", "main": "dist/npm/modern/cjs/index.cjs", diff --git a/packages/analytics-js-plugins/project.json b/packages/analytics-js-plugins/project.json index 3d4cc2fcb..bdd400794 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.11", - "title": "@rudderstack/analytics-js-plugins@3.6.11", - "discussion-category": "@rudderstack/analytics-js-plugins@3.6.11", + "tag": "@rudderstack/analytics-js-plugins@3.6.12", + "title": "@rudderstack/analytics-js-plugins@3.6.12", + "discussion-category": "@rudderstack/analytics-js-plugins@3.6.12", "notesFile": "./packages/analytics-js-plugins/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts b/packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts index bd6d8dfc1..ba9ebff27 100644 --- a/packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts +++ b/packages/analytics-js-plugins/src/deviceModeDestinations/utils.ts @@ -1,7 +1,7 @@ /* eslint-disable no-param-reassign */ /* eslint-disable @typescript-eslint/no-unused-vars */ import { clone } from 'ramda'; -import { mergeDeepRight } from '@rudderstack/analytics-js-common/utilities/object'; +import { getSanitizedValue, mergeDeepRight } from '@rudderstack/analytics-js-common/utilities/object'; import type { Destination, DeviceModeDestination, @@ -79,11 +79,11 @@ const createDestinationInstance = ( ) => analytics.page( eventMethodOverloads.pageArgumentsToCallOptions( - category, - name, - properties, - options, - callback, + getSanitizedValue(category), + getSanitizedValue(name), + getSanitizedValue(properties), + getSanitizedValue(options), + getSanitizedValue(callback), ), ), track: ( @@ -93,7 +93,7 @@ const createDestinationInstance = ( callback?: ApiCallback, ) => analytics.track( - eventMethodOverloads.trackArgumentsToCallOptions(event, properties, options, callback), + eventMethodOverloads.trackArgumentsToCallOptions(getSanitizedValue(event), getSanitizedValue(properties), getSanitizedValue(options), getSanitizedValue(callback)), ), identify: ( userId: string | number | Nullable, @@ -102,7 +102,7 @@ const createDestinationInstance = ( callback?: ApiCallback, ) => analytics.identify( - eventMethodOverloads.identifyArgumentsToCallOptions(userId, traits, options, callback), + eventMethodOverloads.identifyArgumentsToCallOptions(getSanitizedValue(userId), getSanitizedValue(traits), getSanitizedValue(options), getSanitizedValue(callback)), ), alias: ( to: string, @@ -111,7 +111,7 @@ const createDestinationInstance = ( callback?: ApiCallback, ) => analytics.alias( - eventMethodOverloads.aliasArgumentsToCallOptions(to, from, options, callback), + eventMethodOverloads.aliasArgumentsToCallOptions(getSanitizedValue(to), getSanitizedValue(from), getSanitizedValue(options), getSanitizedValue(callback)), ), group: ( groupId: string | number | Nullable, @@ -120,9 +120,9 @@ const createDestinationInstance = ( callback?: ApiCallback, ) => analytics.group( - eventMethodOverloads.groupArgumentsToCallOptions(groupId, traits, options, callback), + eventMethodOverloads.groupArgumentsToCallOptions(getSanitizedValue(groupId), getSanitizedValue(traits), getSanitizedValue(options), getSanitizedValue(callback)), ), - getAnonymousId: (options?: AnonymousIdOptions) => analytics.getAnonymousId(options), + getAnonymousId: (options?: AnonymousIdOptions) => analytics.getAnonymousId(getSanitizedValue(options)), getUserId: () => analytics.getUserId(), getUserTraits: () => analytics.getUserTraits(), getGroupId: () => analytics.getGroupId(), diff --git a/packages/analytics-js-service-worker/CHANGELOG.md b/packages/analytics-js-service-worker/CHANGELOG.md index b3f30779a..3e296d3f6 100644 --- a/packages/analytics-js-service-worker/CHANGELOG.md +++ b/packages/analytics-js-service-worker/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.2.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-service-worker@3.2.10...@rudderstack/analytics-js-service-worker@3.2.11) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-common` updated to version `3.14.8` ## [3.2.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-service-worker@3.2.9...@rudderstack/analytics-js-service-worker@3.2.10) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-js-service-worker/CHANGELOG_LATEST.md b/packages/analytics-js-service-worker/CHANGELOG_LATEST.md index b38ae44f1..14f1b402b 100644 --- a/packages/analytics-js-service-worker/CHANGELOG_LATEST.md +++ b/packages/analytics-js-service-worker/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [3.2.10](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-service-worker@3.2.9...@rudderstack/analytics-js-service-worker@3.2.10) (2024-11-21) +## [3.2.11](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-service-worker@3.2.10...@rudderstack/analytics-js-service-worker@3.2.11) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.7` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` diff --git a/packages/analytics-js-service-worker/package.json b/packages/analytics-js-service-worker/package.json index 959ee36f4..5e57e51b7 100644 --- a/packages/analytics-js-service-worker/package.json +++ b/packages/analytics-js-service-worker/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js-service-worker", - "version": "3.2.10", + "version": "3.2.11", "description": "RudderStack JavaScript Service Worker SDK", "main": "dist/npm/modern/cjs/index.cjs", "module": "dist/npm/modern/esm/index.mjs", diff --git a/packages/analytics-js-service-worker/project.json b/packages/analytics-js-service-worker/project.json index 58045e99b..d3eb36608 100644 --- a/packages/analytics-js-service-worker/project.json +++ b/packages/analytics-js-service-worker/project.json @@ -51,9 +51,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "@rudderstack/analytics-js-service-worker@3.2.10", - "title": "rudderstack/analytics-js-service-worker@3.2.10", - "discussion-category": "rudderstack/analytics-js-service-worker@3.2.10", + "tag": "@rudderstack/analytics-js-service-worker@3.2.11", + "title": "rudderstack/analytics-js-service-worker@3.2.11", + "discussion-category": "rudderstack/analytics-js-service-worker@3.2.11", "notesFile": "./packages/analytics-js-service-worker/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-js/CHANGELOG.md b/packages/analytics-js/CHANGELOG.md index 464a8ea11..47a387b52 100644 --- a/packages/analytics-js/CHANGELOG.md +++ b/packages/analytics-js/CHANGELOG.md @@ -2,6 +2,13 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.11.9](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.8...@rudderstack/analytics-js@3.11.9) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-cookies` updated to version `0.4.11` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` +* `@rudderstack/analytics-js-plugins` updated to version `3.6.12` ## [3.11.8](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.7...@rudderstack/analytics-js@3.11.8) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-js/CHANGELOG_LATEST.md b/packages/analytics-js/CHANGELOG_LATEST.md index 364e4db6f..b3a7d4085 100644 --- a/packages/analytics-js/CHANGELOG_LATEST.md +++ b/packages/analytics-js/CHANGELOG_LATEST.md @@ -1,7 +1,7 @@ -## [3.11.8](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.7...@rudderstack/analytics-js@3.11.8) (2024-11-21) +## [3.11.9](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js@3.11.8...@rudderstack/analytics-js@3.11.9) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-cookies` updated to version `0.4.10` -* `@rudderstack/analytics-js-common` updated to version `3.14.7` -* `@rudderstack/analytics-js-plugins` updated to version `3.6.11` +* `@rudderstack/analytics-js-cookies` updated to version `0.4.11` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` +* `@rudderstack/analytics-js-plugins` updated to version `3.6.12` diff --git a/packages/analytics-js/package.json b/packages/analytics-js/package.json index 7e58bb7ab..bdf57dc4f 100644 --- a/packages/analytics-js/package.json +++ b/packages/analytics-js/package.json @@ -1,6 +1,6 @@ { "name": "@rudderstack/analytics-js", - "version": "3.11.8", + "version": "3.11.9", "description": "RudderStack JavaScript SDK", "main": "dist/npm/modern/cjs/index.cjs", "module": "dist/npm/modern/esm/index.mjs", diff --git a/packages/analytics-js/project.json b/packages/analytics-js/project.json index 3d4dc26dc..ce6d23b7b 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.8", - "title": "@rudderstack/analytics-js@3.11.8", - "discussion-category": "@rudderstack/analytics-js@3.11.8", + "tag": "@rudderstack/analytics-js@3.11.9", + "title": "@rudderstack/analytics-js@3.11.9", + "discussion-category": "@rudderstack/analytics-js@3.11.9", "notesFile": "./packages/analytics-js/CHANGELOG_LATEST.md" } } diff --git a/packages/analytics-v1.1/CHANGELOG.md b/packages/analytics-v1.1/CHANGELOG.md index 06a3f197c..814f55c1a 100644 --- a/packages/analytics-v1.1/CHANGELOG.md +++ b/packages/analytics-v1.1/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [2.48.36](https://github.com/rudderlabs/rudder-sdk-js/compare/rudder-sdk-js@2.48.35...rudder-sdk-js@2.48.36) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js-common` updated to version `3.14.8` ## [2.48.35](https://github.com/rudderlabs/rudder-sdk-js/compare/rudder-sdk-js@2.48.34...rudder-sdk-js@2.48.35) (2024-11-21) ### Dependency Updates diff --git a/packages/analytics-v1.1/CHANGELOG_LATEST.md b/packages/analytics-v1.1/CHANGELOG_LATEST.md index 0b1cc3cf9..ba90e0268 100644 --- a/packages/analytics-v1.1/CHANGELOG_LATEST.md +++ b/packages/analytics-v1.1/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [2.48.35](https://github.com/rudderlabs/rudder-sdk-js/compare/rudder-sdk-js@2.48.34...rudder-sdk-js@2.48.35) (2024-11-21) +## [2.48.36](https://github.com/rudderlabs/rudder-sdk-js/compare/rudder-sdk-js@2.48.35...rudder-sdk-js@2.48.36) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js-common` updated to version `3.14.7` +* `@rudderstack/analytics-js-common` updated to version `3.14.8` diff --git a/packages/analytics-v1.1/package.json b/packages/analytics-v1.1/package.json index ef5305f8f..313a5ee97 100644 --- a/packages/analytics-v1.1/package.json +++ b/packages/analytics-v1.1/package.json @@ -1,6 +1,6 @@ { "name": "rudder-sdk-js", - "version": "2.48.35", + "version": "2.48.36", "description": "RudderStack JavaScript SDK", "main": "dist/npm/index.js", "module": "dist/npm/index.es.js", diff --git a/packages/analytics-v1.1/project.json b/packages/analytics-v1.1/project.json index 563e9a3d7..dee9a515b 100644 --- a/packages/analytics-v1.1/project.json +++ b/packages/analytics-v1.1/project.json @@ -59,9 +59,9 @@ "github": { "executor": "@jscutlery/semver:github", "options": { - "tag": "rudder-sdk-js@2.48.35", - "title": "rudder-sdk-js@2.48.35", - "discussion-category": "rudder-sdk-js@2.48.35", + "tag": "rudder-sdk-js@2.48.36", + "title": "rudder-sdk-js@2.48.36", + "discussion-category": "rudder-sdk-js@2.48.36", "notesFile": "./packages/analytics-v1.1/CHANGELOG_LATEST.md" } } diff --git a/packages/loading-scripts/CHANGELOG.md b/packages/loading-scripts/CHANGELOG.md index dca548090..28ccda77f 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.52](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.51...@rudderstack/analytics-js-loading-scripts@3.0.52) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js` updated to version `3.11.9` ## [3.0.51](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.50...@rudderstack/analytics-js-loading-scripts@3.0.51) (2024-11-21) ### Dependency Updates diff --git a/packages/loading-scripts/CHANGELOG_LATEST.md b/packages/loading-scripts/CHANGELOG_LATEST.md index d13acdb9b..8598e8ed2 100644 --- a/packages/loading-scripts/CHANGELOG_LATEST.md +++ b/packages/loading-scripts/CHANGELOG_LATEST.md @@ -1,5 +1,5 @@ -## [3.0.51](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.50...@rudderstack/analytics-js-loading-scripts@3.0.51) (2024-11-21) +## [3.0.52](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-loading-scripts@3.0.51...@rudderstack/analytics-js-loading-scripts@3.0.52) (2024-11-22) ### Dependency Updates -* `@rudderstack/analytics-js` updated to version `3.11.8` +* `@rudderstack/analytics-js` updated to version `3.11.9` diff --git a/packages/loading-scripts/package.json b/packages/loading-scripts/package.json index bb86ef621..37b54cf14 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.51", + "version": "3.0.52", "private": true, "description": "Loading script for RudderStack JavaScript SDK", "main": "./src/index.js", diff --git a/packages/loading-scripts/project.json b/packages/loading-scripts/project.json index 427cbc7b6..f1eb40fcb 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.51", - "title": "@rudderstack/analytics-js-loading-scripts@3.0.51", - "discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.51", + "tag": "@rudderstack/analytics-js-loading-scripts@3.0.52", + "title": "@rudderstack/analytics-js-loading-scripts@3.0.52", + "discussion-category": "@rudderstack/analytics-js-loading-scripts@3.0.52", "notesFile": "./packages/loading-scripts/CHANGELOG_LATEST.md" } } diff --git a/packages/sanity-suite/CHANGELOG.md b/packages/sanity-suite/CHANGELOG.md index 588f0432f..5a3da88e8 100644 --- a/packages/sanity-suite/CHANGELOG.md +++ b/packages/sanity-suite/CHANGELOG.md @@ -2,6 +2,11 @@ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver). +## [3.1.43](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.42...@rudderstack/analytics-js-sanity-suite@3.1.43) (2024-11-22) + +### Dependency Updates + +* `@rudderstack/analytics-js` updated to version `3.11.9` ## [3.1.42](https://github.com/rudderlabs/rudder-sdk-js/compare/@rudderstack/analytics-js-sanity-suite@3.1.41...@rudderstack/analytics-js-sanity-suite@3.1.42) (2024-11-21) ### Dependency Updates diff --git a/packages/sanity-suite/package.json b/packages/sanity-suite/package.json index 2282a7307..077e6b209 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.42", + "version": "3.1.43", "private": true, "description": "Sanity suite for testing JS SDK package", "main": "./dist/v3/cdn/testBook.js", diff --git a/sonar-project.properties b/sonar-project.properties index f18f93062..1c6dcaf88 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.60.0 +sonar.projectVersion=3.61.0 # Meta-data for the project sonar.links.scm=https://github.com/rudderlabs/rudder-sdk-js