cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-10679) Update plugin add behavior to allow plugins to list engine constraints
Date Fri, 18 Mar 2016 00:20:33 GMT


ASF GitHub Bot commented on CB-10679:

Github user nikhilkh commented on a diff in the pull request:
    --- Diff: www/docs/en/dev/guide/hybrid/plugins/ ---
    @@ -239,3 +239,105 @@ For example, for a plugin that supports android, iOS & Windows,
the keywords in
     For more detailed example of a package.json, review the [package.json file of cordova-plugin-device](
    +### Specifying Cordova Dependencies
    +**Cordova 6.1.0** added support for specifying the Cordova-related dependencies of a
    +as part of the plugin's `package.json` file. Plugins may list the dependencies for multiple
    +releases so as to provide guidance to the Cordova CLI when it is selecting the version
of a
    +plugin to fetch from npm. The CLI will choose the latest release of a plugin that is
    +compatible with the local project's installed platforms and plugins as well as the
    +the local Cordova CLI version. If no releases of the plugin are compatible, the CLI will
    +the user about the failed requirements and fall back to the old behavior of fetching
    +latest release.
    +This feature is intended to eventually replace the [engines element](../../../plugin_ref/spec.html#engines-and-engine)
in plugin.xml.
    +Listing dependencies is a good way to ensure that your plugin will not appear broken
or cause
    +build errors when fetched from npm. If the latest release of the plugin is not compatible
    +a project, the CLI will give the app developer a list of unmet project requirements so
    +they are aware of incompatibilites and can update their project to support your plugin.
    +allows your plugin to respond to breaking changes without fear of confusing devlopers
    +are building against old platforms and plugins.
    +To specify Cordova-related dependencies for a plugin, alter the `engines` element in
    +`package.json` to include a `cordovaDependencies` object using the following
    +engines: {
    +    cordovaDependencies: {
    +        PLUGIN_VERSION: {
    +            DEPENDENCY: SEMVER_RANGE,
    +            DEPENDENCY: SEMVER_RANGE,
    +            ...
    +        },
    +        ...
    +    }
    +* `PLUGIN_VERSION` specifies a version of your plugin. It should adhere the syntax for
a single version as defined by [npm's semver package][npm-semver] or an upper bound (see [below](#upper-bounds))
    --- End diff --
    Nit: You could as well hyper-link "upper bound"

> Update plugin add behavior to allow plugins to list engine constraints
> ----------------------------------------------------------------------
>                 Key: CB-10679
>                 URL:
>             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:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message