cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-lib git commit: CB-10081 pinned plugin versions
Date Tue, 01 Dec 2015 23:56:18 GMT
Repository: cordova-lib
Updated Branches:
  refs/heads/master 531b9913e -> b704e7870


CB-10081 pinned plugin versions


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/b704e787
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/b704e787
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/b704e787

Branch: refs/heads/master
Commit: b704e7870a8a3af413fbf2db3e6f9d83d1677abd
Parents: 531b991
Author: Steve Gill <stevengill97@gmail.com>
Authored: Mon Nov 30 22:45:18 2015 -0800
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Mon Nov 30 22:45:18 2015 -0800

----------------------------------------------------------------------
 cordova-lib/package.json          | 24 ++++++++++++++++++++++++
 cordova-lib/src/cordova/plugin.js | 10 +++++++++-
 2 files changed, 33 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b704e787/cordova-lib/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/package.json b/cordova-lib/package.json
index c8aa06a..f9f7f71 100644
--- a/cordova-lib/package.json
+++ b/cordova-lib/package.json
@@ -16,6 +16,30 @@
     "node": ">=0.9.9"
   },
   "engineStrict": true,
+  "cordovaPlugins" : {
+    "cordova-plugin-battery-status": "~1.1.1",
+    "cordova-plugin-camera": "~2.0.0",
+    "cordova-plugin-console": "~1.0.2",
+    "cordova-plugin-contacts": "~2.0.0",
+    "cordova-plugin-device": "~1.1.0",
+    "cordova-plugin-device-motion": "~1.2.0",
+    "cordova-plugin-device-orientation": "~1.0.2",
+    "cordova-plugin-dialogs": "~1.2.0",
+    "cordova-plugin-file": "~4.0.0",
+    "cordova-plugin-file-transfer": "~1.4.0",
+    "cordova-plugin-geolocation": "~2.0.0",
+    "cordova-plugin-globalization": "~1.0.2",
+    "cordova-plugin-inappbrowser": "~1.1.0",
+    "cordova-plugin-legacy-whitelist": "~1.1.1",
+    "cordova-plugin-media": "~2.0.0",
+    "cordova-plugin-media-capture": "~1.1.0",
+    "cordova-plugin-network-information": "~1.1.0",
+    "cordova-plugin-splashscreen": "~3.0.0",
+    "cordova-plugin-statusbar": "~2.0.0",
+    "cordova-plugin-test-framework": "~1.1.0",
+    "cordova-plugin-vibration": "~2.0.0",
+    "cordova-plugin-whitelist": "~1.2.0"
+  },
   "dependencies": {
     "aliasify": "^1.7.2",
     "cordova-app-hello-world": "3.10.0",

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/b704e787/cordova-lib/src/cordova/plugin.js
----------------------------------------------------------------------
diff --git a/cordova-lib/src/cordova/plugin.js b/cordova-lib/src/cordova/plugin.js
index f3abee5..aca74fb 100644
--- a/cordova-lib/src/cordova/plugin.js
+++ b/cordova-lib/src/cordova/plugin.js
@@ -32,6 +32,7 @@ var cordova_util  = require('./util'),
     events        = require('cordova-common').events,
     metadata      = require('../plugman/util/metadata'),
     chainMap      = require('../util/promise-util').Q_chainmap,
+    pkgJson       = require('../../package.json'),
     opener        = require('opener');
 
 // Returns a promise.
@@ -129,7 +130,14 @@ module.exports = function plugin(command, targets, opts) {
                             if (cordova_util.isUrl(ver) || cordova_util.isDirectory(ver))
{
                                 target = ver;
                             } else {
-                                target = ver ? (id + '@' + ver) : target;
+                                //if version exists from config.xml, use that
+                                if(ver) {
+                                    target = ver ? (id + '@' + ver) : target;
+                                } else {
+                                    //fetch pinned version from cordova-lib
+                                    var pinnedVer = pkgJson.cordovaPlugins[id];
+                                    target = pinnedVer ? (id + '@' + pinnedVer) : target;
+                                }
                             }
                         }
 


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


Mime
View raw message