From 9cb8149f782ee3f138b57d6f035400da62d59a36 Mon Sep 17 00:00:00 2001 From: Vladimir Kotikov Date: Mon, 19 Sep 2016 15:21:01 +0300 Subject: [PATCH] Add `cordovaDependencies` section to package.json 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). This also adds a '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 | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index d3a32c1a..619baaf2 100644 --- a/package.json +++ b/package.json @@ -25,16 +25,17 @@ "cordova-ios", "cordova-windows" ], - "engines": [ - { - "name": "cordova-plugman", - "version": ">=5.0.0" - }, - { - "name": "cordova-android", - "version": ">=5.0.0" + "engines": { + "cordovaDependencies": { + "4.2.0": { + "cordova": ">=5.0.0", + "cordova-android": ">=5.0.0" + }, + "5.0.0": { + "cordova": ">=100" + } } - ], + }, "author": "Rand Dusing", "license": "MIT", "bugs": {