cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TimBarham <...@git.apache.org>
Subject [GitHub] cordova-lib pull request: CB-9147 Adding a platform via caret vers...
Date Tue, 09 Jun 2015 23:30:28 GMT
Github user TimBarham commented on a diff in the pull request:

    https://github.com/apache/cordova-lib/pull/244#discussion_r32076025
  
    --- Diff: cordova-lib/src/plugman/registry/registry.js ---
    @@ -364,6 +364,28 @@ function fetchPlugin(plugin, client, useNpmRegistry) {
         });
     }
     
    +function processPluginVersion(plugin) {
    +    // If plugin includes a version that is a caret range, the ancient version of npm
we're using won't now how to
    +    // handle it. So we'll use our current version of semver to turn it into a usable
range.
    +
    +    var parts = plugin.split('@');
    +    var version = parts[1];
    +
    +    if (!version || version.charAt(0) !== '^') {
    +        return plugin;
    +    }
    +
    +    var validRange = semver.validRange(version, /* loose */ true);
    +    if (!validRange) {
    +        return plugin;
    +    }
    +
    +    console.log('Returning processed plugin range: ' + parts[0] + '@"' + validRange +
'"');
    --- End diff --
    
    Grrr... That was actually debug code I intended to remove. Thought I caught them all.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message