From 6b343e78e9bfca921cef78eb504755477ecaeff9 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Tue, 20 Sep 2016 15:49:31 +0400 Subject: [PATCH] Add `cordovaDependencies` section to package.json (#1232) This reflects `engines` elements from plugin manifest to package.json to comply w/ [new plugin fetching model](https://github.com/cordova/cordova-discuss/blob/master/proposals/plugin-version-fetching.md) and corrects `engine`'s value according to [package.json format](https://docs.npmjs.com/files/package.json#engines) Its also desirable to add 'protective' entry for next major plugin version to protect end-users from fetching edge versions of the plugin by incompatible version of cordova. See corresponding [discussion on mailing list](http://apache.markmail.org/thread/p73loqtvbzvfzsv5) for more details and reasons behind this. --- package.json | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 5f9c74c05..b7ebd4d37 100644 --- a/package.json +++ b/package.json @@ -29,12 +29,18 @@ "cordova-wp8", "cordova-browser" ], - "engines": [ - { - "name": "cordova", - "version": ">=3.0.0" + "engines": { + "cordovaDependencies": { + "1.8.2": { + "cordova": ">=3.6.3", + "cordova-android": ">=4.0.0", + "cordova-ios": ">=4.1.0" + }, + "2.0.0": { + "cordova": ">100" + } } - ], + }, "author": "Adobe PhoneGap Team", "license": "APL", "scripts": {