Comparing version 4.3.0 to 4.4.3
@@ -27,7 +27,2 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
export class CustomProperties { | ||
set(key: string, value: string | number | boolean | Date): CustomProperties; | ||
clear(key: string): CustomProperties; | ||
} | ||
export function setLogLevel(logLevel: LogLevel | AppCenterLogLevel): Promise<void>; | ||
@@ -42,2 +37,1 @@ export function getLogLevel(): Promise<LogLevel | AppCenterLogLevel>; | ||
export function getInstallId(): Promise<string>; | ||
export function setCustomProperties(properties: CustomProperties): Promise<void>; |
@@ -10,4 +10,2 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
const logTag = 'AppCenter'; | ||
const AppCenter = { | ||
@@ -104,12 +102,2 @@ LogLevel: { | ||
// async - returns a Promise | ||
setCustomProperties(properties) { | ||
if (properties instanceof AppCenter.CustomProperties) { | ||
return AppCenterReactNative.setCustomProperties(properties); | ||
} | ||
const type = Object.prototype.toString.apply(properties); | ||
AppCenterLog.error(logTag, `SetCustomProperties: Invalid type, expected CustomProperties but got ${type}.`); | ||
return Promise.resolve(null); | ||
}, | ||
getSdkVersion() { | ||
@@ -120,40 +108,2 @@ return PackageJson.version; | ||
AppCenter.CustomProperties = class { | ||
set(key, value) { | ||
if (typeof key === 'string') { | ||
const type = typeof value; | ||
switch (type) { | ||
case 'string': | ||
case 'number': | ||
case 'boolean': | ||
this[key] = { type, value }; | ||
break; | ||
case 'object': | ||
if (value instanceof Date) { | ||
this[key] = { type: 'date-time', value: value.getTime() }; | ||
} else { | ||
AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.'); | ||
} | ||
break; | ||
default: | ||
AppCenterLog.error(logTag, 'CustomProperties: Invalid value type, expected string|number|boolean|Date.'); | ||
} | ||
} else { | ||
AppCenterLog.error(logTag, 'CustomProperties: Invalid key type, expected string.'); | ||
} | ||
return this; | ||
} | ||
clear(key) { | ||
if (typeof key === 'string') { | ||
this[key] = { type: 'clear' }; | ||
} else { | ||
AppCenterLog.error(logTag, 'CustomProperties: Invalid key type, expected string.'); | ||
} | ||
return this; | ||
} | ||
}; | ||
module.exports = AppCenter; |
{ | ||
"name": "appcenter", | ||
"version": "4.3.0", | ||
"version": "4.4.3", | ||
"description": "Node module that contains common functionality needed to appcenter-* modules", | ||
@@ -22,3 +22,3 @@ "main": "AppCenter.js", | ||
"dependencies": { | ||
"appcenter-link-scripts": "4.3.0" | ||
"appcenter-link-scripts": "4.4.3" | ||
}, | ||
@@ -42,3 +42,2 @@ "rnpm": { | ||
"eslint-plugin-react": "7.21.5", | ||
"jest": "24.8.0", | ||
"react": "16.6.3", | ||
@@ -48,11 +47,4 @@ "react-native": "0.57.3" | ||
"scripts": { | ||
"lint": "./node_modules/.bin/eslint .", | ||
"test": "jest" | ||
}, | ||
"jest": { | ||
"preset": "react-native", | ||
"transform": { | ||
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js" | ||
} | ||
"lint": "./node_modules/.bin/eslint ." | ||
} | ||
} |
@@ -35,3 +35,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
return rnpmlink.ios.addPodDeps( | ||
[{ pod: 'AppCenterReactNativeShared', version: '4.3.0' }], | ||
[{ pod: 'AppCenterReactNativeShared', version: '4.4.1' }], | ||
{ platform: 'ios', version: '9.0' } | ||
@@ -38,0 +38,0 @@ ); |
@@ -11,4 +11,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
setEnabled: jest.fn(), | ||
setCustomProperties: jest.fn(), | ||
getSdkVersion: jest.fn() | ||
})); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10
35284
20
213
+ Addedappcenter-link-scripts@4.4.3(transitive)
- Removedappcenter-link-scripts@4.3.0(transitive)
Updatedappcenter-link-scripts@4.4.3