branch-sdk
Advanced tools
Comparing version 2.52.1 to 2.52.2
@@ -8,3 +8,3 @@ { | ||
"description": "The Branch Web SDK provides an easy way to interact with the Branch API, to track and attribute mobile app downloads and referrals.", | ||
"version": "2.52.1", | ||
"version": "2.52.2", | ||
"main": "dist/build.min.js", | ||
@@ -39,3 +39,3 @@ "license": "https://github.com/BranchMetrics/Web-SDK/blob/master/LICENSE", | ||
], | ||
"build": "2.52.1" | ||
"build": "2.52.2" | ||
} |
@@ -7,2 +7,6 @@ # Change Log | ||
## [2.52.2] - 2019-10-29 | ||
- Fixes a bug with a type validation function that is used in logEvent() | ||
- Adds the ability to identify an iPad running iOS 13 in Safari | ||
## [2.52.1] - 2019-10-22 | ||
@@ -9,0 +13,0 @@ - Surfaces error in callback for .link() call |
{ | ||
"name": "branch-sdk", | ||
"version": "2.52.1", | ||
"version": "2.52.2", | ||
"description": "Branch Metrics Deep Linking/Smart Banner Web SDK", | ||
@@ -38,3 +38,3 @@ "main": "dist/build.min.js", | ||
}, | ||
"build": "2.52.1" | ||
"build": "2.52.2" | ||
} |
@@ -9,2 +9,2 @@ /** | ||
config.api_endpoint = 'https://api2.branch.io'; | ||
config.version = '2.52.1'; | ||
config.version = '2.52.2'; |
@@ -423,2 +423,35 @@ /** | ||
function isSafariBrowser(ua) { | ||
return !!/^((?!chrome|android|crios|fxios).)*safari/i.test(ua); | ||
} | ||
function isMacintoshDesktop(ua) { | ||
return ua && ua.indexOf('Macintosh') > -1; | ||
} | ||
function isGTEVersion(ua, v) { | ||
v = v || 11; | ||
var match = /version\/([^ ]*)/i.exec(ua); | ||
if (match && match[1]) { | ||
try { | ||
var version = parseFloat(match[1]); | ||
if (version >= v) { | ||
return true; | ||
} | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
return false; | ||
} | ||
function isSafari13OrGreateriPad(ua) { | ||
return ua && | ||
isSafariBrowser(ua) && | ||
isMacintoshDesktop(ua) && | ||
isGTEVersion(ua, 13) && | ||
screen.height > screen.width; | ||
} | ||
utils.mobileUserAgent = function() { | ||
@@ -429,3 +462,4 @@ var ua = navigator.userAgent; | ||
} | ||
if (ua.match(/ipad/i)) { | ||
if (ua.match(/ipad/i) || | ||
isSafari13OrGreateriPad(ua)) { | ||
return 'ipad'; | ||
@@ -460,23 +494,2 @@ } | ||
function isSafariBrowser(ua) { | ||
return !!/^((?!chrome|android|crios|fxios).)*safari/i.test(ua); | ||
} | ||
function isGreaterThanVersion(ua, v) { | ||
v = v || 11; | ||
var match = /version\/([^ ]*)/i.exec(ua); | ||
if (match && match[1]) { | ||
try { | ||
var version = parseFloat(match[1]); | ||
if (version >= v) { | ||
return true; | ||
} | ||
} catch (e) { | ||
return false; | ||
} | ||
} | ||
return false; | ||
} | ||
/** | ||
@@ -491,3 +504,3 @@ * Returns true if browser is safari version 11 or greater | ||
if (isSafari) { | ||
return isGreaterThanVersion(ua, 11); | ||
return isGTEVersion(ua, 11); | ||
} | ||
@@ -965,3 +978,3 @@ | ||
utils.isStandardEvent = function(eventName) { | ||
return BRANCH_STANDARD_EVENTS.indexOf(eventName) > -1; | ||
return eventName && BRANCH_STANDARD_EVENTS.indexOf(eventName) > -1; | ||
}; | ||
@@ -989,3 +1002,3 @@ | ||
utils.validateParameterType = function(parameter, type) { | ||
if (!type) { | ||
if (!type || (parameter === null && type === 'object')) { | ||
return false; | ||
@@ -1058,3 +1071,3 @@ } | ||
if (!utils.validateParameterType(objectToConvert, 'object') || Object.keys(objectToConvert).length === 0) { | ||
return; | ||
return {}; | ||
} | ||
@@ -1061,0 +1074,0 @@ for (var key in objectToConvert) { |
@@ -624,8 +624,8 @@ 'use strict'; | ||
}); | ||
it('should return undefined', function() { | ||
it('should return empty object', function() { | ||
var initial = {}; | ||
assert.deepEqual( | ||
undefined, | ||
{}, | ||
utils.convertObjectValuesToString(initial), | ||
"return value is not undefined" | ||
"should return empty object" | ||
); | ||
@@ -632,0 +632,0 @@ }); |
// jscs:disable | ||
// This file was autogenerated by calcdeps.py | ||
goog.addDependency("../../../../../src/journeys_utils.js", ['journeys_utils'], ['banner_utils', 'safejson', 'utils']); | ||
goog.addDependency("../../../../../test/web-config.js", ['config'], []); | ||
goog.addDependency("../../../../../src/3_banner_utils.js", ['banner_utils'], ['storage', 'utils', 'safejson']); | ||
goog.addDependency("../../../../../src/4_banner_html.js", ['banner_html'], ['banner_utils', 'utils', 'session', 'storage']); | ||
goog.addDependency("../../../../../src/4_banner_css.js", ['banner_css'], ['banner_utils', 'utils']); | ||
goog.addDependency("../../../../../src/1_utils.js", ['utils'], ['goog.json', 'config', 'safejson']); | ||
goog.addDependency("../../../../../src/6_branch.js", ['Branch'], ['goog.json', 'utils', 'resources', 'Server', 'banner', 'task_queue', 'storage', 'session', 'config', 'safejson', 'branch_view', 'appindexing', 'journeys_utils']); | ||
goog.addDependency("../../../../../src/1_utils.js", ['utils'], ['goog.json', 'config', 'safejson']); | ||
goog.addDependency("../../../../../src/onpage.js", [], []); | ||
goog.addDependency("../../../../../src/0_jsonparse.js", ['safejson'], ['goog.json']); | ||
goog.addDependency("../../../../../src/2_session.js", ['session'], ['goog.json', 'utils', 'safejson', 'storage']); | ||
goog.addDependency("../../../../../src/7_initialization.js", ['branch_instance'], ['Branch', 'config']); | ||
goog.addDependency("../../../../../src/branch_view.js", ['branch_view'], ['utils', 'banner_css', 'safejson', 'journeys_utils']); | ||
goog.addDependency("../../../../../test/web-config.js", ['config'], []); | ||
goog.addDependency("../../../../../src/extern.js", [], []); | ||
goog.addDependency("../../../../../src/4_banner_html.js", ['banner_html'], ['banner_utils', 'utils', 'session', 'storage']); | ||
goog.addDependency("../../../../../src/3_api.js", ['Server'], ['utils', 'goog.json', 'storage', 'safejson']); | ||
goog.addDependency("../../../../../src/journeys_utils.js", ['journeys_utils'], ['banner_utils', 'safejson', 'utils']); | ||
goog.addDependency("../../../../../src/0_queue.js", ['task_queue'], []); | ||
goog.addDependency("../../../../../src/4_banner_css.js", ['banner_css'], ['banner_utils', 'utils']); | ||
goog.addDependency("../../../../../src/2_storage.js", ['storage'], ['goog.json', 'utils']); | ||
goog.addDependency("../../../../../src/appindexing.js", ['appindexing'], ['safejson', 'utils']); | ||
goog.addDependency("../../../../../src/branch_view.js", ['branch_view'], ['utils', 'banner_css', 'safejson', 'journeys_utils']); | ||
goog.addDependency("../../../../../src/2_resources.js", ['resources'], ['utils', 'config']); | ||
goog.addDependency("../../../../../src/5_banner.js", ['banner'], ['utils', 'banner_utils', 'banner_css', 'banner_html']); | ||
goog.addDependency("../../../../../src/0_jsonparse.js", ['safejson'], ['goog.json']); | ||
goog.addDependency("../../../../../src/onpage.js", [], []); | ||
goog.addDependency("../../../../../src/2_resources.js", ['resources'], ['utils', 'config']); | ||
goog.addDependency("../../../../../src/3_api.js", ['Server'], ['utils', 'goog.json', 'storage', 'safejson']); | ||
goog.addDependency("../../../../../src/extern.js", [], []); | ||
goog.addDependency("../../../../../src/7_initialization.js", ['branch_instance'], ['Branch', 'config']); | ||
goog.addDependency("../../../../../src/2_storage.js", ['storage'], ['goog.json', 'utils']); | ||
goog.addDependency("../../../../../test/blob-banner.js", [], []); | ||
goog.addDependency("../../../../../test/test-utils.js", [], []); | ||
goog.addDependency("../../../../../test/1_utils.js", [], ['utils', 'journeys_utils']); | ||
goog.addDependency("../../../../../test/6_branch.js", [], ['utils', 'Branch', 'resources', 'config', 'storage', 'session', 'banner_utils', 'banner_html', 'safejson', 'goog.json']); | ||
goog.addDependency("../../../../../test/journeys.js", [], ['utils', 'Branch', 'resources', 'config', 'storage', 'session', 'branch_view', 'banner_utils', 'goog.json']); | ||
goog.addDependency("../../../../../test/6_branch.js", [], ['utils', 'Branch', 'resources', 'config', 'storage', 'session', 'banner_utils', 'banner_html', 'safejson', 'goog.json']); | ||
goog.addDependency("../../../../../test/1_utils.js", [], ['utils', 'journeys_utils']); | ||
goog.addDependency("../../../../../test/saucelabs.js", [], []); | ||
goog.addDependency("../../../../../test/7_integration.js", [], ['config', 'goog.json']); | ||
goog.addDependency("../../../../../test/3_api.js", [], ['utils', 'Server', 'resources', 'storage', 'config', 'safejson']); | ||
goog.addDependency("../../../../../test/web-config.js", ['config'], []); | ||
goog.addDependency("../../../../../test/blob-interstitial.js", [], []); | ||
goog.addDependency("../../../../../test/test-utils.js", [], []); | ||
goog.addDependency("../../../../../test/0_queue.js", [], ['task_queue']); | ||
goog.addDependency("../../../../../test/blob-interstitial.js", [], []); | ||
goog.addDependency("../../../../../test/3_api.js", [], ['utils', 'Server', 'resources', 'storage', 'config', 'safejson']); | ||
goog.addDependency("../../../../../test/saucelabs.js", [], []); | ||
goog.addDependency("../../../../../test/2_storage.js", [], ['storage']); | ||
goog.addDependency("../../../../../test/7_integration.js", [], ['config', 'goog.json']); |
@@ -9,4 +9,4 @@ /** | ||
config.api_endpoint = 'https://api.branch.io'; | ||
config.version = '2.52.1'; | ||
config.version = '2.52.2'; | ||
window.DEBUG = false; |
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 not supported yet
Sorry, the diff of this file is too big to display
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
28166532
15172