From 3798faeb7ba88e137b4deb8b94b1c8c4aa99be32 Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Tue, 31 Dec 2024 22:58:59 +0900 Subject: [PATCH 1/5] refactor(ios): remove unused method, cordovaVersion --- src/ios/CDVDevice.h | 2 -- src/ios/CDVDevice.m | 6 ------ 2 files changed, 8 deletions(-) diff --git a/src/ios/CDVDevice.h b/src/ios/CDVDevice.h index a146d882..5c63dcb2 100644 --- a/src/ios/CDVDevice.h +++ b/src/ios/CDVDevice.h @@ -23,8 +23,6 @@ @interface CDVDevice : CDVPlugin {} -+ (NSString*)cordovaVersion; - - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; @end diff --git a/src/ios/CDVDevice.m b/src/ios/CDVDevice.m index 73154897..bc81c2f5 100644 --- a/src/ios/CDVDevice.m +++ b/src/ios/CDVDevice.m @@ -93,17 +93,11 @@ - (NSDictionary*)deviceProperties @"platform": @"iOS", @"version": [device systemVersion], @"uuid": [self uniqueAppInstanceIdentifier:device], - @"cordova": [[self class] cordovaVersion], @"isVirtual": @([self isVirtual]), @"isiOSAppOnMac": @([self isiOSAppOnMac]) }; } -+ (NSString*)cordovaVersion -{ - return CDV_VERSION; -} - - (BOOL)isVirtual { #if TARGET_OS_SIMULATOR From b25442d9857db471d18c8e65726bda91c921df52 Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Tue, 31 Dec 2024 23:09:44 +0900 Subject: [PATCH 2/5] refactor: remove unused property --- src/browser/DeviceProxy.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/browser/DeviceProxy.js b/src/browser/DeviceProxy.js index 881d3914..7ba6f6b3 100644 --- a/src/browser/DeviceProxy.js +++ b/src/browser/DeviceProxy.js @@ -70,7 +70,6 @@ module.exports = { getDeviceInfo: function (success, error) { setTimeout(function () { success({ - cordova: browser.cordovaVersion, platform: getPlatform(), model: getModel(), version: getVersion(), From a988c1888671a798b9a8918bac6b5741649402fd Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Tue, 31 Dec 2024 23:20:34 +0900 Subject: [PATCH 3/5] chore: remove TODO comment --- www/device.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/device.js b/www/device.js index 7e67edbd..2256e75c 100644 --- a/www/device.js +++ b/www/device.js @@ -50,8 +50,6 @@ function Device () { channel.onCordovaReady.subscribe(function () { me.getInfo( function (info) { - // ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js - // TODO: CB-5105 native implementations should not return info.cordova var buildLabel = cordova.version; me.available = true; me.platform = info.platform; From b84096e145fd4eab8a4e677c016977fce8a18699 Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Sun, 4 May 2025 02:04:02 +0900 Subject: [PATCH 4/5] fix: remove cordova.version tests --- tests/tests.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/tests.js b/tests/tests.js index 734d1a10..23b9eeb3 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -49,15 +49,6 @@ exports.defineAutoTests = function () { expect(String(window.device.cordova).length > 0).toBe(true); }); - it('should depend on the presence of cordova.version string', function () { - expect(window.cordova.version).toBeDefined(); - expect(String(window.cordova.version).length > 0).toBe(true); - }); - - it('should contain device.cordova equal to cordova.version', function () { - expect(window.device.cordova).toBe(window.cordova.version); - }); - it('should contain a model specification that is a string', function () { expect(window.device.model).toBeDefined(); expect(String(window.device.model).length > 0).toBe(true); From bca8dd203516fc3f478989496da7533427726918 Mon Sep 17 00:00:00 2001 From: kumo01GitHub Date: Sat, 10 May 2025 19:57:56 +0900 Subject: [PATCH 5/5] fix: lint --- src/browser/DeviceProxy.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/browser/DeviceProxy.js b/src/browser/DeviceProxy.js index 7ba6f6b3..e80522e2 100644 --- a/src/browser/DeviceProxy.js +++ b/src/browser/DeviceProxy.js @@ -18,8 +18,6 @@ * under the License. * */ -var browser = require('cordova/platform'); - function getPlatform () { return 'browser'; }