Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 97DA9200D33 for ; Wed, 25 Oct 2017 00:51:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9673A160BF1; Tue, 24 Oct 2017 22:51:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DDDB41609C8 for ; Wed, 25 Oct 2017 00:51:03 +0200 (CEST) Received: (qmail 11007 invoked by uid 500); 24 Oct 2017 22:51:03 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 10996 invoked by uid 99); 24 Oct 2017 22:51:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2017 22:51:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 2B2811807C5 for ; Tue, 24 Oct 2017 22:51:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 9RpI-qr7yWJd for ; Tue, 24 Oct 2017 22:51:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id D07B45F477 for ; Tue, 24 Oct 2017 22:51:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5D0F5E00A3 for ; Tue, 24 Oct 2017 22:51:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 113F1212F6 for ; Tue, 24 Oct 2017 22:51:00 +0000 (UTC) Date: Tue, 24 Oct 2017 22:51:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-13463) No way to prevent package.json update with cordova commands even with --nosave MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 24 Oct 2017 22:51:04 -0000 [ https://issues.apache.org/jira/browse/CB-13463?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D162178= 40#comment-16217840 ]=20 ASF GitHub Bot commented on CB-13463: ------------------------------------- Github user stevengill commented on the issue: https://github.com/apache/cordova-lib/pull/599 =20 LGTM, but the ci failures =F0=9F=98=A8=20 > No way to prevent package.json update with cordova commands even with --n= osave > -------------------------------------------------------------------------= ----- > > Key: CB-13463 > URL: https://issues.apache.org/jira/browse/CB-13463 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-cli > Affects Versions: cordova@7.0.0 > Reporter: Andrew Crites > Labels: reproduced, triaged > > With Cordova 7, cordova commands including {{cordova platform add}} and {= {cordova prepare}} will copy plugin information from {{config.xml}} to {{pa= ckage.json}}.=20 > According to [the saving platforms documentation|https://cordova.apache.o= rg/docs/en/latest/platform_plugin_versioning_ref/], using {{--nosave}} shou= ld prevent updating {{package.json}} or {{config.xml}}, but this does not w= ork (i.e. using {{--nosave}} still seems to update the {{package.json}}. > I want to avoid updating {{package.json}} specifically because there does= n't seem to be a way to avoid hard coding variables for plugins. An example= is the cordova fabric plugin: > {code} > > > > > {code} > Cordova doesn't seem to provide a way for you to parameterize variables i= n the configuration. To get around this, I have {{build.config.xml}} where = they are parameterized, and {{config.xml}} is created at install-time and n= ot version controlled. However, this would be much more difficult to do wit= h {{package.json}} and is practically not an option. > When running {{cordova platform add ios --nosave}} with the above plugin,= cordova still updates {{package.json}} to include the fabric plugin with t= he hard coded variables. > * Cordova 6 question (with solution): https://stackoverflow.com/questions= /37816035/using-environment-variables-parameterizing-config-xml > * Cordova 7 question (no solution yet) https://stackoverflow.com/question= s/46816928/parameterize-do-not-hard-code-variables-when-building-with-cordo= va-7 > Ideally {{--nosave}} would not update {{package.json}} as advertised. Eve= n better, there should be a way to set up a cordova project so that any cor= dova commands do not save by default. This would prevent mistakes in a larg= er team and allow use of tools that wrap cordova such as ionic. -- 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