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

Support --save-exact for plugins/platforms

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: cordova@7.0.0
    • Fix Version/s: None
    • Component/s: cordova-cli
    • Labels:

      Description

      Adding a plugin or platform and passing a version will still add a ^ or ~ to the config.xml/package.json when installing. Since under the hood, npm is handling things, there should be support for the --save-exact flag as well. Steve Gill

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/cordova-cli/pull/286

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/cordova-cli/pull/286
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 72ff10f0d35a79f2e9394453098c43c96ea06a58 in cordova-cli's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=72ff10f ]

          CB-13353 : added save-exact to cli and unit test

          This closes #286

          Show
          jira-bot ASF subversion and git services added a comment - Commit 72ff10f0d35a79f2e9394453098c43c96ea06a58 in cordova-cli's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;h=72ff10f ] CB-13353 : added save-exact to cli and unit test This closes #286
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/cordova-cli/pull/286#discussion_r142508791

          — Diff: src/cli.js —
          @@ -449,6 +450,10 @@ function cli (inputArgs)

          { args.save = true; }

          + if (args['save-exact']) {
          — End diff –

          @stevengill Hmm you are right, I don't think these are needed. I will take it out. The test still passes without these lines and manual tests work too.

          Show
          githubbot ASF GitHub Bot added a comment - Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/286#discussion_r142508791 — Diff: src/cli.js — @@ -449,6 +450,10 @@ function cli (inputArgs) { args.save = true; } + if (args ['save-exact'] ) { — End diff – @stevengill Hmm you are right, I don't think these are needed. I will take it out. The test still passes without these lines and manual tests work too.
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/cordova-cli/pull/286#discussion_r142484800

          — Diff: src/cli.js —
          @@ -449,6 +450,10 @@ function cli (inputArgs)

          { args.save = true; }

          + if (args['save-exact']) {
          — End diff –

          what happens if you don't have lines 453-456? Are they needed?

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/286#discussion_r142484800 — Diff: src/cli.js — @@ -449,6 +450,10 @@ function cli (inputArgs) { args.save = true; } + if (args ['save-exact'] ) { — End diff – what happens if you don't have lines 453-456? Are they needed?
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/cordova-cli/pull/286#discussion_r142480887

          — Diff: src/cli.js —
          @@ -443,12 +444,16 @@ function cli (inputArgs) {
          });
          }

          • if (args.nosave) {
            + if (args.nosave || args['save-exact']) {
              • End diff –

          kk updated! thanks!

          Show
          githubbot ASF GitHub Bot added a comment - Github user audreyso commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/286#discussion_r142480887 — Diff: src/cli.js — @@ -443,12 +444,16 @@ function cli (inputArgs) { }); } if (args.nosave) { + if (args.nosave || args ['save-exact'] ) { End diff – kk updated! thanks!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit b0fce54a3bcab52c09562a29ebbe2276f82ab51d in cordova-fetch's branch refs/heads/master from Audrey So
          [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=b0fce54 ]

          CB-13353 : added saveexact as an option and updated fetch test

          Show
          jira-bot ASF subversion and git services added a comment - Commit b0fce54a3bcab52c09562a29ebbe2276f82ab51d in cordova-fetch's branch refs/heads/master from Audrey So [ https://git-wip-us.apache.org/repos/asf?p=cordova-fetch.git;h=b0fce54 ] CB-13353 : added saveexact as an option and updated fetch test
          Hide
          githubbot ASF GitHub Bot added a comment -

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

          https://github.com/apache/cordova-cli/pull/286#discussion_r142475924

          — Diff: src/cli.js —
          @@ -443,12 +444,16 @@ function cli (inputArgs) {
          });
          }

          • if (args.nosave) {
            + if (args.nosave || args['save-exact']) {
              • End diff –

          this change is probably not needed since we handle the save or save-exact or no-save flags in cordova-fetch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-cli/pull/286#discussion_r142475924 — Diff: src/cli.js — @@ -443,12 +444,16 @@ function cli (inputArgs) { }); } if (args.nosave) { + if (args.nosave || args ['save-exact'] ) { End diff – this change is probably not needed since we handle the save or save-exact or no-save flags in cordova-fetch.
          Hide
          auso Audrey So added a comment -
          Show
          auso Audrey So added a comment - Also see --> https://github.com/apache/cordova-fetch/pull/4
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user audreyso opened a pull request:

          https://github.com/apache/cordova-cli/pull/286

          CB-13353 : added save-exact option

          <!--
          Please make sure the checklist boxes are all checked before submitting the PR. The checklist
          is intended as a quick reference, for complete details please see our Contributor Guidelines:

          http://cordova.apache.org/contribute/contribute_guidelines.html

          Thanks!
          -->

              1. Platforms affected
              1. What does this PR do?
                Added save-exact option
              1. What testing has been done on this change?
              1. Checklist
          • [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
          • [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
          • [X] Added automated test coverage as appropriate for this change.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/audreyso/cordova-cli CB-13353

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/cordova-cli/pull/286.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #286


          commit 5b742e7eb222249b16899755ffae6e1153e0ff04
          Author: Audrey So <audreyso@apache.org>
          Date: 2017-09-29T22:40:55Z

          CB-13353 : added save-exact to cli and unit test


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user audreyso opened a pull request: https://github.com/apache/cordova-cli/pull/286 CB-13353 : added save-exact option <!-- Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines: http://cordova.apache.org/contribute/contribute_guidelines.html Thanks! --> Platforms affected What does this PR do? Added save-exact option What testing has been done on this change? Checklist [X] [Reported an issue] ( http://cordova.apache.org/contribute/issues.html ) in the JIRA database [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. [X] Added automated test coverage as appropriate for this change. You can merge this pull request into a Git repository by running: $ git pull https://github.com/audreyso/cordova-cli CB-13353 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-cli/pull/286.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #286 commit 5b742e7eb222249b16899755ffae6e1153e0ff04 Author: Audrey So <audreyso@apache.org> Date: 2017-09-29T22:40:55Z CB-13353 : added save-exact to cli and unit test

            People

            • Assignee:
              auso Audrey So
              Reporter:
              mhartington Mike Hartington
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development