Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mparticle/web-sdk

Package Overview
Dependencies
Maintainers
10
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mparticle/web-sdk - npm Package Compare versions

Comparing version 2.11.15 to 2.11.16

7

CHANGELOG.md

@@ -5,2 +5,9 @@ ## Releases

#### 2.11.16 - 2020-10-26
- Remove eventsApiModels.ts in favor of js-events npm module
- Feat - Add event and product context to sanitized attributes
- Add logic to handle Media Events as Custom Events
- Add additional tests for app name change in config
#### 2.11.15 - 2020-06-30

@@ -7,0 +14,0 @@

4

package.json
{
"name": "@mparticle/web-sdk",
"version": "2.11.15",
"version": "2.11.16",
"description": "mParticle core SDK for web applications",

@@ -67,3 +67,3 @@ "license": "Apache-2.0",

"@babel/preset-typescript": "^7.6.0",
"@mparticle/event-models": "^1.1.1",
"@mparticle/event-models": "^1.1.2",
"@types/chai": "^4.2.3",

@@ -70,0 +70,0 @@ "@types/mocha": "^5.2.7",

@@ -244,3 +244,3 @@ import Types from './types';

) {
attributes = mpInstance._Helpers.sanitizeAttributes(attributes);
attributes = mpInstance._Helpers.sanitizeAttributes(attributes, name);

@@ -247,0 +247,0 @@ if (typeof name !== 'string') {

@@ -13,5 +13,2 @@ import Types from './types';

if (mpInstance._Helpers.canLog()) {
if (event.data) {
event.data = mpInstance._Helpers.sanitizeAttributes(event.data);
}
var uploadObject = mpInstance._ServerModel.createEventObject(event);

@@ -288,3 +285,6 @@ mpInstance._APIClient.sendEventToServer(uploadObject);

attrs = mpInstance._Helpers.sanitizeAttributes(attrs);
attrs = mpInstance._Helpers.sanitizeAttributes(
attrs,
commerceEvent.EventName
);

@@ -291,0 +291,0 @@ if (mpInstance._Helpers.canLog()) {

@@ -506,3 +506,3 @@ import Types from './types';

this.sanitizeAttributes = function(attrs) {
this.sanitizeAttributes = function(attrs, name) {
if (!attrs || !self.isObject(attrs)) {

@@ -523,5 +523,7 @@ return null;

mpInstance.Logger.warning(
'The corresponding attribute value of ' +
"For '" +
name +
"', the corresponding attribute value of '" +
prop +
' must be a string, number, boolean, or null.'
"' must be a string, number, boolean, or null."
);

@@ -528,0 +530,0 @@ }

@@ -6,3 +6,3 @@ // This file is used ONLY for the mParticle ESLint plugin. It should NOT be used otherwise!

import { convertEvents } from './sdkToEventsApiConverter';
import * as EventsApi from './eventsApiModels';
import * as EventsApi from '@mparticle/event-models';
export default class _BatchValidator {

@@ -9,0 +9,0 @@ private getMPInstance() {

@@ -219,2 +219,3 @@ import {

case Types.MessageType.PageEvent:
// Note: Media Events are also sent as PageEvents/CustomEvents
return convertCustomEvent(sdkEvent);

@@ -551,2 +552,4 @@ case Types.MessageType.PageView:

return EventsApi.CustomEventDataCustomEventTypeEnum.userPreference;
case Types.EventType.Media:
return EventsApi.CustomEventDataCustomEventTypeEnum.media;
case Types.CommerceEventType.ProductAddToCart:

@@ -553,0 +556,0 @@ return EventsApi.CommerceEventDataCustomEventTypeEnum.addToCart;

@@ -179,3 +179,4 @@ import Types from './types';

EventAttributes: mpInstance._Helpers.sanitizeAttributes(
event.data
event.data,
event.name
),

@@ -182,0 +183,0 @@ EventDataType: event.messageType,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc