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

    https://github.com/apache/cordova-lib/pull/518#discussion_r101877994
  
    --- Diff: cordova-lib/src/cordova/plugin.js ---
    @@ -414,13 +414,15 @@ function determinePluginTarget(projectRoot, cfg, 
target, fetchOptions) {
         // it does not satisfy.
         if(parsedSpec.version) {
             if(pkgJson && pkgJson.dependencies && 
pkgJson.dependencies[parsedSpec.package]) {
    -            var noSymbolVersion;
    +            var noSymbolVersion = parsedSpec.version;
                 if (parsedSpec.version.charAt(0) === '^' || 
parsedSpec.version.charAt(0) === '~') {
                     noSymbolVersion = parsedSpec.version.slice(1);
                 }
    -            if (!semver.satisfies(noSymbolVersion, 
pkgJson.dependencies[parsedSpec.package])) {
    +            if (pkgJson.dependencies[parsedSpec.package] === 
parsedSpec.version) {
    --- End diff --
    
    I think we still want to do the semver check too. First start with outer if 
that checks if `parsedSpec.version` is a directory or url,  if it is, do this 
check  to see if `pkgJson.dependencies[parsedSpec.package] !== 
parsedSpec.version`. If that is true, then you want to update package.json 
(assuming fetchOpts.save === true)
    
    On that outer if that checks if it is a dir or url, add a else if where you 
check for semver.satisfies


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to