You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Ibrahim M. Ghazal (JIRA)" <ji...@apache.org> on 2017/07/30 10:18:02 UTC

[jira] [Created] (CB-13129) `cordova platform add` sets `~` version in config.xml and `^` version in package.json

Ibrahim M. Ghazal created CB-13129:
--------------------------------------

             Summary: `cordova platform add` sets `~` version in config.xml and `^` version in package.json
                 Key: CB-13129
                 URL: https://issues.apache.org/jira/browse/CB-13129
             Project: Apache Cordova
          Issue Type: Bug
          Components: cordova-cli
    Affects Versions: 7.0.1
         Environment: Windows 10, Cordova 7.0.1, Node.js 6.11.1
            Reporter: Ibrahim M. Ghazal


When running {{cordova platform add}}, A {{~}} version is added to config.xml, and a {{^}} version is added to package.json, regardless of what the user actually typed. The below commands all produce the same result:

{code}
cordova platform add android@6.1.0
cordova platform add android@~6.1.0
cordova platform add android@^6.1.0
{code}

The result is adding to config.xml the following line:
{code}
<engine name="android" spec="~6.1.0" />
{code}

And to package.json the following line (inside {{dependencies}}):
{code}
"cordova-android": "^6.1.0",
{code}

The versions added to config.xml/package.json should be exactly what the user typed. And if the user didn't specify a version, they should be be consistent and use the same semver modifier.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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