Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14128

Cordova changes plugin version in package.json

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.0.0
    • Fix Version/s: None
    • Component/s: cordova-lib
    • Environment:

      NodeJS: v8.10.0

      npm: 5.6.0

      Cordova: 8.0.0

      Description

      I observed that Cordova changes the version of plugins in package.json. So if I set a static version for a plugin in package.json and add a platform (e.g. android), Cordova installs the correct version but updates the version of the plugin in package.json with a caret(^).

      Example:

      Before adding a platform the package.json looks like that

      [...]
      "dependencies": {
        "cordova-plugin-ble-central": "1.1.9"
      }
      [...]

      After adding a platform the package.json looks like that

      [...]
      "dependencies": {
        "cordova-plugin-ble-central": "^1.1.9"
      }
      [...]
      

      and the installed plugin has the version 1.1.9.

      The next time after removing my plugins and platforms folder Cordova will install that plugin in version 1.2.1 because of the caret(^) in package.json.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              flop Florian Pechwitz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: