You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ni...@apache.org on 2022/03/06 11:00:49 UTC

[cordova-osx] branch master updated (a4f2a51 -> e866c09)

This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-osx.git.


    from a4f2a51  Prepare release 7.0.0 (#117)
     add c6f24fd  Update RELEASENOTES & version for release 7.0.0
     add ab10e76  Added 7.0.0 to CDVAvailability.h (via coho).
     new e4aa5af  Set VERSION to 7.1.0-dev (via coho)
     new e866c09  Update JS snapshot to version 7.1.0-dev (via coho)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../CordovaLib/Classes/Commands/CDVAvailability.h  |   3 +-
 CordovaLib/VERSION                                 |   2 +-
 CordovaLib/cordova.js                              | 103 +++++++--------------
 RELEASENOTES.md                                    |  10 ++
 bin/templates/scripts/cordova/version              |   2 +-
 package-lock.json                                  |   2 +-
 package.json                                       |   2 +-
 7 files changed, 51 insertions(+), 73 deletions(-)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-osx] 01/02: Set VERSION to 7.1.0-dev (via coho)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-osx.git

commit e4aa5af6ec941a100792caed54f464e624b177d7
Author: Niklas Merz <ni...@apache.org>
AuthorDate: Sun Mar 6 11:36:03 2022 +0100

    Set VERSION to 7.1.0-dev (via coho)
---
 CordovaLib/VERSION                    | 2 +-
 bin/templates/scripts/cordova/version | 2 +-
 package.json                          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CordovaLib/VERSION b/CordovaLib/VERSION
index 4b740cb..f7446a0 100644
--- a/CordovaLib/VERSION
+++ b/CordovaLib/VERSION
@@ -1 +1 @@
-6.1.0-dev
+7.1.0-dev
diff --git a/bin/templates/scripts/cordova/version b/bin/templates/scripts/cordova/version
index f7f99ad..9939f0f 100755
--- a/bin/templates/scripts/cordova/version
+++ b/bin/templates/scripts/cordova/version
@@ -26,7 +26,7 @@
 */
 
 // Coho updates this line
-const VERSION = '6.1.0-dev';
+const VERSION = '7.1.0-dev';
 
 module.exports.version = VERSION;
 
diff --git a/package.json b/package.json
index f3c82f1..6ba20fc 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova-osx",
-  "version": "7.0.0",
+  "version": "7.1.0-dev",
   "description": "cordova-osx release",
   "main": "bin/templates/scripts/cordova/Api.js",
   "repository": "github:apache/cordova-osx",

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[cordova-osx] 02/02: Update JS snapshot to version 7.1.0-dev (via coho)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

niklasmerz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-osx.git

commit e866c09d8d5f3c8e4a6dfef401a1a878bd5640ad
Author: Niklas Merz <ni...@apache.org>
AuthorDate: Sun Mar 6 11:36:05 2022 +0100

    Update JS snapshot to version 7.1.0-dev (via coho)
---
 CordovaLib/cordova.js | 103 +++++++++++++++++---------------------------------
 1 file changed, 35 insertions(+), 68 deletions(-)

diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index 9794136..7c940fb 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -1,5 +1,5 @@
 // Platform: osx
-// 538a985db128858c0a0eb4dd40fb9c8e5433fc94
+// cordova-js rel/6.1.0-3-g7c2f8304
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
  under the License.
 */
 ;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '6.1.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '7.1.0-dev';
 // file: src/scripts/require.js
 var require;
 var define;
@@ -429,62 +429,30 @@ define("cordova/base64", function(require, exports, module) {
 var base64 = exports;
 
 base64.fromArrayBuffer = function (arrayBuffer) {
-    var array = new Uint8Array(arrayBuffer);
-    return uint8ToBase64(array);
+    return btoa(bufferToBinaryString(arrayBuffer));
 };
 
 base64.toArrayBuffer = function (str) {
-    var decodedStr = atob(str);
-    var arrayBuffer = new ArrayBuffer(decodedStr.length);
-    var array = new Uint8Array(arrayBuffer);
-    for (var i = 0, len = decodedStr.length; i < len; i++) {
-        array[i] = decodedStr.charCodeAt(i);
-    }
-    return arrayBuffer;
+    return binaryStringToBuffer(atob(str));
 };
 
-// ------------------------------------------------------------------------------
-
-/* This code is based on the performance tests at http://jsperf.com/b64tests
- * This 12-bit-at-a-time algorithm was the best performing version on all
- * platforms tested.
- */
-
-var b64_6bit = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
-var b64_12bit;
-
-var b64_12bitTable = function () {
-    b64_12bit = [];
-    for (var i = 0; i < 64; i++) {
-        for (var j = 0; j < 64; j++) {
-            b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j];
-        }
+function bufferToBinaryString (buffer) {
+    var bytes = new Uint8Array(buffer);
+    var CHUNK_SIZE = 1 << 15;
+    var string = '';
+    for (var i = 0; i < bytes.length; i += CHUNK_SIZE) {
+        var chunk = bytes.subarray(i, i + CHUNK_SIZE);
+        string += String.fromCharCode.apply(null, chunk);
     }
-    b64_12bitTable = function () { return b64_12bit; };
-    return b64_12bit;
-};
+    return string;
+}
 
-function uint8ToBase64 (rawData) {
-    var numBytes = rawData.byteLength;
-    var output = '';
-    var segment;
-    var table = b64_12bitTable();
-    for (var i = 0; i < numBytes - 2; i += 3) {
-        segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2];
-        output += table[segment >> 12];
-        output += table[segment & 0xfff];
+function binaryStringToBuffer (binaryString) {
+    var bytes = new Uint8Array(binaryString.length);
+    for (var i = 0; i < bytes.length; i++) {
+        bytes[i] = binaryString.charCodeAt(i);
     }
-    if (numBytes - i === 2) {
-        segment = (rawData[i] << 16) + (rawData[i + 1] << 8);
-        output += table[segment >> 12];
-        output += b64_6bit[(segment & 0xfff) >> 6];
-        output += '=';
-    } else if (numBytes - i === 1) {
-        segment = (rawData[i] << 16);
-        output += table[segment >> 12];
-        output += '==';
-    }
-    return output;
+    return bytes.buffer;
 }
 
 });
@@ -874,20 +842,20 @@ define("cordova/exec", function(require, exports, module) {
 
  * @private
  */
-var cordova = require('cordova');
-var utils = require('cordova/utils');
-var base64 = require('cordova/base64');
+const cordova = require('cordova');
+const utils = require('cordova/utils');
+const base64 = require('cordova/base64');
 
 function massageMessageNativeToJs (message) {
     if (message.CDVType === 'ArrayBuffer') {
-        var stringToArrayBuffer = function (str) {
-            var ret = new Uint8Array(str.length);
-            for (var i = 0; i < str.length; i++) {
+        const stringToArrayBuffer = function (str) {
+            const ret = new Uint8Array(str.length);
+            for (let i = 0; i < str.length; i++) {
                 ret[i] = str.charCodeAt(i);
             }
             return ret.buffer;
         };
-        var base64ToArrayBuffer = function (b64) {
+        const base64ToArrayBuffer = function (b64) {
             return stringToArrayBuffer(atob(b64));
         };
         message = base64ToArrayBuffer(message.data);
@@ -896,7 +864,7 @@ function massageMessageNativeToJs (message) {
 }
 
 function convertMessageToArgsNativeToJs (message) {
-    var args = [];
+    const args = [];
     if (!message || !Object.prototype.hasOwnProperty.call(message, 'CDVType')) {
         args.push(message);
     } else if (message.CDVType === 'MultiPart') {
@@ -913,7 +881,7 @@ function massageArgsJsToNative (args) {
     if (!args || utils.typeName(args) !== 'Array') {
         return args;
     }
-    var ret = [];
+    const ret = [];
     args.forEach(function (arg, i) {
         if (utils.typeName(arg) === 'ArrayBuffer') {
             ret.push({
@@ -928,14 +896,13 @@ function massageArgsJsToNative (args) {
 }
 
 function OSXExec () {
-    var successCallback, failCallback, service, action, actionArgs;
-    var callbackId = 'INVALID';
+    let callbackId = 'INVALID';
 
-    successCallback = arguments[0];
-    failCallback = arguments[1];
-    service = arguments[2];
-    action = arguments[3];
-    actionArgs = arguments[4];
+    const successCallback = arguments[0];
+    const failCallback = arguments[1];
+    const service = arguments[2];
+    const action = arguments[3];
+    let actionArgs = arguments[4];
 
     // Register the callbacks and add the callbackId to the positional
     // arguments if given.
@@ -955,8 +922,8 @@ function OSXExec () {
 }
 
 OSXExec.nativeCallback = function (callbackId, status, message, keepCallback) {
-    var success = status === 0 || status === 1;
-    var args = convertMessageToArgsNativeToJs(message);
+    const success = status === 0 || status === 1;
+    const args = convertMessageToArgsNativeToJs(message);
     cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
 };
 

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org