You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/06/04 11:54:39 UTC
[GitHub] [cordova] fcamblor opened a new issue #119: cordova run xxx
regularly updates package.json with an empty line
fcamblor opened a new issue #119: cordova run xxx regularly updates package.json with an empty line
URL: https://github.com/apache/cordova/issues/119
# Bug Report
## Problem
Everytime I run `cordova run browser`, my `package.json` file is locally updated :
![cordova_run_browser_updates_package_json](https://user-images.githubusercontent.com/603815/58874805-0b24fd00-86ca-11e9-9b82-fc4e9dc922c4.png)
### What is expected to happen?
`package.json` is left unmodified, after any `cordova run` call (which sounds to be idempotent)
### What does actually happen?
A new line is added at the end of `package.json`
## Information
You have a reproducer script below
### Command or Code
```
cd /tmp/cordova-sample/
git init
npm init
# let everything as defaults
npm install --save-dev cordova@9.0.0
echo node_modules/ > .gitignore
git add . && git commit -m "initial commit"
npx cordova create tmp-cordova && rm tmp-cordova/package.json && mv tmp-cordova/* ./ && rm -Rf tmp-cordova/
echo platforms >> .gitignore
echo plugins >> .gitignore
git add . && git commit -m "created cordova app"
npx cordova platform add browser@6.0.0
git add . && git commit -m "added browser platform"
# installing a random npm package, resulting in changes in package.json
npm install --save-dev noop
git add . && git commit -m "added no-op package"
# running a cordova run command
npx cordova run browser
# End of line appended at the end of the package.json line
git diff
```
![cordova_run_browser_updates_package_json](https://user-images.githubusercontent.com/603815/58874805-0b24fd00-86ca-11e9-9b82-fc4e9dc922c4.png)
### Environment, Platform, Device
Mac OS X 10.14.4
### Version information
Tested on cordova cli `7.1.0`, `8.1.2` and `9.0.0`
No matter the platform and its version.
## Checklist
- [X] I searched for existing GitHub issues
- [X] I updated all Cordova tooling to most recent version
- [X] I included all the necessary information above
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org