[
https://issues.apache.org/jira/browse/CB-10679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190176#comment-15190176
]
ASF GitHub Bot commented on CB-10679:
-------------------------------------
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-cli/pull/241#discussion_r55768334
--- Diff: doc/readme.md ---
@@ -337,6 +337,18 @@ There are a number of ways to specify a plugin:
| commit-ish | Commit/tag/branch reference. If none is specified,
'master' is used
| subdir | Sub-directory to find plugin.xml for the specified plugin.
+### Algorithm for choosing which plugin version to fetch from npm
+
+When adding a plugin to a project from npm, the CLI will choose which
version
+of the plugin to fetch based on the following criteria (listed in order of
+precedence):
+
+1. The plugin version specified in the command (e.g. `cordova plugin add
plugin@version`)
+2. The plugin version saved in config.xml (i.e. if the plugin was
previously added with `--save`)
+3. The latest plugin version that the current project can support (only
applies to plugins that list their [Cordova dependencies] in their
`package.json`)
--- End diff --
"As for version 6.1, ..."
> Update plugin add behavior to allow plugins to list engine constraints
> ----------------------------------------------------------------------
>
> Key: CB-10679
> URL: https://issues.apache.org/jira/browse/CB-10679
> Project: Apache Cordova
> Issue Type: Improvement
> Components: CordovaLib
> Reporter: Richard B Knoll
> Assignee: Richard B Knoll
> Labels: triaged
>
> Let plugins specify their Cordova related dependencies in their package.json
> so that the CLI can choose a compatible version for the current project.
> Full specification is here:
> https://github.com/cordova/cordova-discuss/pull/30
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]