New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

appcenter-analytics

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appcenter-analytics - npm Package Compare versions

Comparing version 2.5.0 to 2.6.0

11

__tests__/Analytics.js

@@ -23,2 +23,13 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

test('trackEvent with properties filters null values when sanitized', async () => {
const eventName = 'Event with null value';
const eventProperties = {
string: 'value', number: 1, boolean: true, nothing: null
};
const expectedProperties = { string: 'value', number: '1', boolean: 'true' };
const spy = jest.spyOn(NativeModules.AppCenterReactNativeAnalytics, 'trackEvent');
await Analytics.trackEvent(eventName, eventProperties);
expect(spy).toHaveBeenCalledWith(eventName, expectedProperties);
});
test('trackEvent with null properties are sanitized', async () => {

@@ -25,0 +36,0 @@ const eventName = 'Test event';

2

Analytics.js

@@ -125,3 +125,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

}
Object.keys(props).forEach((key) => {
Object.keys(props).filter((key) => props[key] !== null).forEach((key) => {
switch (typeof props[key]) {

@@ -128,0 +128,0 @@ case 'string':

{
"name": "appcenter-analytics",
"version": "2.5.0",
"version": "2.6.0",
"description": "React Native plugin for AppCenter Analytics",

@@ -23,3 +23,3 @@ "main": "Analytics.js",

"dependencies": {
"appcenter": "2.5.0"
"appcenter": "2.6.0"
},

@@ -26,0 +26,0 @@ "rnpm": {

@@ -37,4 +37,4 @@ // Copyright (c) Microsoft Corporation. All rights reserved.

[
{ pod: 'AppCenter/Analytics', version: '2.5.0' },
{ pod: 'AppCenterReactNativeShared', version: '2.5.0' } // in case people don't link appcenter (core)
{ pod: 'AppCenter/Analytics', version: '2.5.1' },
{ pod: 'AppCenterReactNativeShared', version: '2.6.0' } // in case people don't link appcenter (core)
],

@@ -41,0 +41,0 @@ { platform: 'ios', version: '9.0' }

Sorry, the diff of this file is not supported yet

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