[
https://issues.apache.org/jira/browse/CB-14172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601831#comment-16601831
]
ASF GitHub Bot commented on CB-14172:
-------------------------------------
raphinesse closed pull request #25: CB-14172: Disable save-exact explicitly
URL: https://github.com/apache/cordova-fetch/pull/25
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/index.js b/index.js
index dfa51f7..aa68c14 100644
--- a/index.js
+++ b/index.js
@@ -75,12 +75,17 @@ function npmArgs (target, userOptions) {
if (opts.production) {
args.push('--production');
}
+ // save-exact could be enabled through .npmrc, so make sure to disable it
+ // to match our desired behavior.
if (opts.save_exact) {
args.push('--save-exact');
- } else if (opts.save) {
- args.push('--save');
} else {
- args.push('--no-save');
+ args.push('--save-exact=false');
+ if (opts.save) {
+ args.push('--save');
+ } else {
+ args.push('--no-save');
+ }
}
return args;
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> save-exact preferences from .npmrc should be overridden
> -------------------------------------------------------
>
> Key: CB-14172
> URL: https://issues.apache.org/jira/browse/CB-14172
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-fetch
> Affects Versions: 1.3.0
> Reporter: Oliver Salzburg
> Priority: Major
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When I add `save-exact=true` to my `.npmrc` and run the test suite for
> cordova-fetch, it will fail, because the exact 5.1.1 version will be
> persisted to the `package.json` instead of the expected semver range `^5.1.1`.
> `save-exact` should be disabled explicitly by default unless the related
> option was provided.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]