You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/05/16 23:12:12 UTC

[jira] [Commented] (CB-11261) Cordova@nightly fails to install any plugin with

    [ https://issues.apache.org/jira/browse/CB-11261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15285614#comment-15285614 ] 

ASF GitHub Bot commented on CB-11261:
-------------------------------------

Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/440#discussion_r63441699
  
    --- Diff: cordova-lib/src/plugman/install.js ---
    @@ -134,15 +134,15 @@ function checkEngines(engines) {
             var engine = engines[i];
     
             // This is a hack to allow plugins with <engine> tag to be installed with
    -        // engine with '-dev' suffix. It is required due to new semver range logic,
    +        // engine with '-dev' or '-nightly' suffixes. It is required due to new semver range logic,
             // introduced in semver@3.x. For more details see https://github.com/npm/node-semver#prerelease-tags.
             //
             // This may lead to false-positive checks, when engine version with dropped
             // suffix is equal to one of range bounds, for example: 5.1.0-dev >= 5.1.0.
             // However this shouldn't be a problem, because this only should happen in dev workflow.
    -        engine.currentVersion = engine.currentVersion && engine.currentVersion.replace(/-dev$/, '');
    -        if ( semver.satisfies(engine.currentVersion, engine.minVersion) || engine.currentVersion === null ) {
    -            // engine ok!
    +        engine.currentVersion = engine.currentVersion && engine.currentVersion.replace(/-dev|-nightly.*$/, '');
    +        if ( semver.satisfies(engine.currentVersion, engine.minVersion, /*loose=*/true) || engine.currentVersion === null ) {
    --- End diff --
    
    This needs to be updated too: https://github.com/apache/cordova-lib/blob/f513412a30be34a1e846d1f81deb2350d435447b/cordova-lib/src/plugman/fetch.js#L295



> Cordova@nightly fails to install any plugin with <engine name="cordova">
> ------------------------------------------------------------------------
>
>                 Key: CB-11261
>                 URL: https://issues.apache.org/jira/browse/CB-11261
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaLib
>    Affects Versions: 6.2.0
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>              Labels: semver
>             Fix For: 6.2.0
>
>
> This happens due to semver@>4.x which assumes that any version with prerelease identifier (such as "-dev" or "-nightly") is not allowed to satisfy the range that does not contain version with prerelease identifier. For example {{6.2.0-nightly.2016.11.05}} does not satisfy the range {{>=4.0.0}} even though {{6.2.0-nightly.2016.11.05}} is techically greater than {{4.0.0}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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